shuttlecrossing
0/0 Germ
Posts: 18
Favorite Card: Deadbridge Chant
Favorite Set: Rise of the Eldrazi
|
Post by shuttlecrossing on Feb 21, 2022 23:29:18 GMT
I'm looking to make a text box that starts at the bottom of the card and increases in height towards the top of the card as more lines are needed, up to a specific limit, at which point it starts to shrink the text.
I'm also looking to have a mask stretch along with the text box as it changes in size.
What I have so far works for starting at the bottom, but nothing else.
Text: top: 362 left: 2 height: 1 overflow-stretch scale up to: 177 width: 294 z index: 2 alignment: bottom left
|
|
GenevensiS
3/3 Beast
Posts: 170
Favorite Card: Baleful Strix
Favorite Set: Urza's Saga
Color Alignment: Blue, Black
|
Post by GenevensiS on Feb 22, 2022 1:47:45 GMT
Try something like:
Text: z index: 2 alignment: bottom left bottom: 362 left: 2 width: 294 height: script: max_height := 177 pixels_per_line := 20 desired_height := card_style.Text.content_lines * pixels_per_line if max_height < desired_height then max_height else desired_height font: name: Beleren Bold size: 16 scale down to: 8
|
|
shuttlecrossing
0/0 Germ
Posts: 18
Favorite Card: Deadbridge Chant
Favorite Set: Rise of the Eldrazi
|
Post by shuttlecrossing on Feb 26, 2022 7:10:39 GMT
That ended up making the field no longer appear in the program. Usually happens when something doesn't work in the code.
Do I need to initialize the script first? I haven't done any scripting in MSE before.
|
|
GenevensiS
3/3 Beast
Posts: 170
Favorite Card: Baleful Strix
Favorite Set: Urza's Saga
Color Alignment: Blue, Black
|
Post by GenevensiS on Feb 26, 2022 8:59:51 GMT
Works fine on my install... what does you console tab say?
|
|