BRT Community

General Category => Discussion - EVE => Topic started by: slarge on October 26, 2021, 04:43:58 PM

Title: Multiline button text
Post by: slarge on October 26, 2021, 04:43:58 PM
I want to place a large button with two lines of text on it. Is there any way to include a line break in the button text to split it into multiple lines? And if not, is there another way to achieve this?
Title: Re: Multiline button text
Post by: Rudolph on October 27, 2021, 05:28:00 PM
That depends on which EVE you are using.
BT81x have OPT_FILL: "breaks the text at spaces into multiple lines, with maximum width set by CMD_FILLWiDTH."

With FT8xx however you could just use print multiple lines of text over an empty button.
Just make sure to use the same tag.

CLEAR(1, 1, 1)
COLOR_RGB(255, 255, 255)
TAG(20)
CMD_BUTTON(200, 200, 100, 100, 27, 0, "")
CMD_TEXT(250, 220, 28, OPT_CENTERX, "Text1")
CMD_TEXT(250, 250, 28, OPT_CENTERX, "Text2")

Or skip the button entirely and draw two rectangles on top of each other with different colors and
the second one smaller to get a frame and write text over it.

Or well, use a picture.