Skip to content

[develop] refactor bullet point spacing#188

Open
G-e-n-e-v-e-n-s-i-S wants to merge 6 commits into
MagicSetEditorPacks:developfrom
G-e-n-e-v-e-n-s-i-S:modal-refactor
Open

[develop] refactor bullet point spacing#188
G-e-n-e-v-e-n-s-i-S wants to merge 6 commits into
MagicSetEditorPacks:developfrom
G-e-n-e-v-e-n-s-i-S:modal-refactor

Conversation

@G-e-n-e-v-e-n-s-i-S
Copy link
Copy Markdown
Collaborator

@G-e-n-e-v-e-n-s-i-S G-e-n-e-v-e-n-s-i-S commented Mar 5, 2026

looks like there's a bug in the exe that I need to address before this can work correctly

@G-e-n-e-v-e-n-s-i-S
Copy link
Copy Markdown
Collaborator Author

Bug fixed.

I also introduced a new layer in the text layout engine: clauses. Now, wrapping separates lines, soft breaks separate clauses, hard breaks separate paragraphs, and line breaks separate blocks.

Clauses use line height soft like normal lines, but they make it possible to distinguish lines that occur because of wrapping from lines that occur because of soft breaks. You can also count the number of soft breaks with length(card_style.text.layout.clauses).

Margins used to work at the paragraph level (wherever the tag was in the paragraph, the margins would be applied to the paragraph as a whole. If multiple different margins were in the same paragraph, they would just be summed). I have moved them to the clause level.

@G-e-n-e-v-e-n-s-i-S G-e-n-e-v-e-n-s-i-S marked this pull request as ready for review March 6, 2026 18:13
@CajunAvenger
Copy link
Copy Markdown
Collaborator

we should probably auto-add the s into modals? keep it working like live and idk that we need bigger-than-hard-linebreak-modal-breaks

@G-e-n-e-v-e-n-s-i-S
Copy link
Copy Markdown
Collaborator Author

I don't understand what you mean but sure go ahead

@CajunAvenger
Copy link
Copy Markdown
Collaborator

currently hard line breaks inside a bulleted list are forced into soft-line tags (i think github ate the code tag before). this version isn't, so if you don't manually soft-break you get the 1.2 line height plus the additional margin, instead of 0.9 line height line you get on live, or the 0.9 plus margin that this PR was partially made to achieve.

@G-e-n-e-v-e-n-s-i-S
Copy link
Copy Markdown
Collaborator Author

I see, yeah probably force soft breaks then, but this has to be done from the game script, not exe. Other games might want to be able to do this distinction.

@CajunAvenger
Copy link
Copy Markdown
Collaborator

ye, just wanted to clear that before pushing changes

change hard line breaks before a bullet into soft-lines
@CajunAvenger
Copy link
Copy Markdown
Collaborator

k this should be good whenever you're ready to merge it

this file will get deleted by another pr so don't change it or it will cause conflicts
@CajunAvenger
Copy link
Copy Markdown
Collaborator

CajunAvenger commented May 12, 2026

this file will get deleted by another pr so don't change it or it will cause conflicts

we'll be reinstating at least a shell of them for the update cards scripts won't we

@G-e-n-e-v-e-n-s-i-S
Copy link
Copy Markdown
Collaborator Author

if you want to do that work then fine, but I'm not sure it's worth it for seldom used templates like these

@CajunAvenger
Copy link
Copy Markdown
Collaborator

i have about 60 set files using that template I'll def spend a few minutes on an update script over the time to manual convert all of those lmao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants