Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Hi and thanks for using the library! Hope it's useful.

You can use the .setTextFormat() method to fix it:


var _textbox = new UITextBox("Test_Textbox", 80, 30, 150, 50, grey_button08); 
_textbox.setTextFormat("[fa_left][fa_top][c_black]").setPlaceholderText("Hello World"); 
_panel.add(_textbox);

Full code for example above:

var _panel = new UIPanel("Test", 40, 40, 300, 400, yellow_panel); 
_panel.setTitleFormat("[fa_center][fa_top][c_black]").setTitle("NEW GAME"); 
var _label = new  UIText("Test_SeedText", 30, 30, "[fa_left][fa_top][c_black]Seed: ");
_panel.add(_label);
var _textbox = new UITextBox("Test_Textbox", 80, 30, 150, 50, grey_button08);
_textbox.setTextFormat("[fa_left][fa_top][c_black]").setPlaceholderText("Hello World");
_panel.add(_textbox);
var _button = new UIButton("Test_Button", 0, -20, 280, 40, "Start game", yellow_button00, UI_RELATIVE_TO.BOTTOM_CENTER);
_button.setCallback(UI_EVENT.LEFT_RELEASE, function() {     show_message(UI.get("Test_Textbox").getText()); });
_panel.add(_button);


Let me know if there's anything else I can help with!

Ah, I forgot fa_top! Thanks a lot! Now it works fine. 

It's a wonderful library, thanks for making it. :)