|
Post by jsanner2 on Jun 7, 2024 19:21:52 GMT
Hi there,
I'm working on a custom template, and I want to have the text box divisible into multiple fields (right now, five). I have my game file set up to define the five text fields (text1, text2, etc.) and a combined text field with the correct script to combine them. The style file invokes the combined text field, and all of this so far is working properly.
The question I have is whether I can instruct the program to apply masks to the individual text fields within the combined field. For example, the "top" field ("text1") would have no mask, then the next field down ("text2"), if it contains text, would apply a mask (e.g., high-transparency gray). In other words, the idea is to very clearly delineate where one field within the combined field ends and the next begins via alternating shading of the five fields within the combined field.
Is this possible? Am I approaching the problem the wrong way?
Thanks, JWS
|
|
|
Post by cajun on Jun 9, 2024 0:21:56 GMT
on MSE 2.1.2+, you can use the array card_style.(text).layout.separators to get the relative position of the dividing line in between the two fields. ex card_style.text.top + card_style.text.layout.separators[0] will get the "top" value you want to use for a backdrop image of the second field. to work around a harmless bug, you'll want to define them as variables like so:
line_height_1 := {if length(card_style.text.layout.separators) or else 0 > 0 then card_style.text.top + card_style.text.layout.separators[0] else card_style.text.bottom} line_height_2 := {if length(card_style.text.layout.separators) or else 0 > 1 then card_style.text.top + card_style.text.layout.separators[1] else card_style.text.bottom} line_height_3 := {if length(card_style.text.layout.separators) or else 0 > 2 then card_style.text.top + card_style.text.layout.separators[2] else card_style.text.bottom} line_height_4 := {if length(card_style.text.layout.separators) or else 0 > 3 then card_style.text.top + card_style.text.layout.separators[3] else card_style.text.bottom} line_height_5 := {if length(card_style.text.layout.separators) or else 0 > 4 then card_style.text.top + card_style.text.layout.separators[4] else card_style.text.bottom}
|
|