Preset Browser Laf || Multi-line?
-
@Chazrox Can't be 100% sure but can't you just do "CLICK THE PLUS SIGN" + "" + "TO CREATE A PRESET" - or something like that
-
@rglides yep,just tried it. So you add as much space as you want between the "" - so for example "CLICK THE PLUS SIGN" + " " + "TO CREATE A PRESET"
-
@rglides ah well the message here removed my extra space, here -
"CLICK THE PLUS SIGN" + " " + "TO CREATE A PRESET" -
@rglides Im trying that but thats just adding space in between. I need it to break to a new line down.
-
@rglides I need to learn to properly read original questions here hahah - I think this is what you want
g.drawMultiLineText("CLICK THE PLUS SIGN\nTO CREATE A PRESET", [10, 10], 100, "left", 1.5); -
@rglides bruh thats the one...lol. Thanks!

Gottem:

-
@Chazrox Niiice!
-
C Chazrox marked this topic as a question on
-
C Chazrox has marked this topic as solved on
-
@rglides I need to learn how to read the api's before I come here.

-
-
@Chazrox how did you do that? I'm trying to change Add a Preset, Add a Category but I can't manage how I could do that
-
in your "drawPresetBrowserColumnBackground" LAF function, add this and adjust to your liking.
if (obj.text == "Select a Column") { obj.text = ""; g.setFont("Proggy", 14); g.setColour(Colours.withAlpha(obj.textColour, 0.5)); g.drawMultiLineText("SELECT A CATEGORY\r\n\TO THE LEFT", [75,86], 100, "centred", 2.0); } if (obj.text == "Add a Category") { obj.text = ""; g.setFont("Proggy", 10); g.setColour(Colours.withAlpha(obj.textColour, 0.5)); g.drawMultiLineText("SELECT A BANK\r\n\TO THE LEFT\r\n\OR CREATE A NEW\r\n\ CATEGORY BELOW\r\n\(CLICK '+' SIGN)", [a[2]/2 - 40,a[3] / 2 - 30], 80, "centred", 2.0); } if (obj.text == "Add a Preset") { obj.text = ""; g.setFont("Proggy", 10); g.setColour(Colours.withAlpha(obj.textColour, 0.5)); g.drawMultiLineText("SELECT A CATEGORY\r\n\TO THE LEFT\r\n\OR CREATE A PRESET BELOW (USE '+' SIGN)", [a[2]/2 - 40,a[3] / 2 - 30], 80, "centred", 2.0); } -
@Chazrox thank you!!!!
-
@treynterrio You're welcome!
-
@Chazrox ok, that messed up my preset browser a bit. Do you know how I can get the column lines back? I tried using the draw function, but the lines aren't aligned properly.
-
@treynterrio Did you already have a LAF going for column background? If you didnt, you will have to draw it again yourself because now you're taking over the look and feel of that section.
start with :
g.drawRect(obj.area); // or g.drawRoundedRectangle( obj.area, 6, 1.0); //etc.
