ui EditBox

ui Editbox

Editboxes are a powerful way of allowing keyboard entry of strings.

Normally in GMStudio to get a string you would use get_async_str which is not always the ‘nicest’ way of getting a string. Using editboxes the app will appear more ‘windows’ like in getting strings from the keyboard. See demo for examples.

It support many features like mouse cursor select, backspace, delete, arrow keys and even tab-order(shift-tab) support.

uiTextLimit=999; Limits the length of the text that can be entered.
uiTextColor=c_black; Color of the text when NOT in focus (selected).
uiFocusColor=c_gray; Background of editbox when focused.
uiFocusTextColor=c_white; Color of text when in focus.
uiCursorColor=c_white; Cursor (flashing) color.
uiCursorWidth=6; Line width of cursor;
uiPopupKeyboard=true; This will determine if the ui_keyboard will be displayed when focused/pressed. If OS is brower or windows you may want to disable this by setting to false;
uiPopupOnly=false; //only accept keys from popup keyboard (limit characters); Editbox will only accept keys from the soft-popup keyboard only.
uiTabOrder=0 (set to 1,2,3,4 on individual widgets); This will allow you to move between editboxes using the tab/shift-tab. Just set taborder to a non-zero integer.
You must keep the order yourself, meaning you assign 1 to the first one, you assign 2 to the 2nd editbox…etc.

You may also like...