Dialog UI
The onDialogRequest function uses a custom string-based syntax to build Growtopia-style dialogs.
This page lists all supported UI commands, categorized for readability.
1. Basic Dialog Controls
text
set_default_color|COLOR
set_border_color|r,g,b,a|
set_bg_color|r,g,b,a|
set_custom_spacing|x:value;y:value|
add_custom_break|
start_custom_tabs|
end_custom_tabs|
disable_resize|
reset_placement_x|Descriptions
- set_default_color — sets default text color.
- set_border_color — dialog border RGBA.
- set_bg_color — dialog background RGBA.
- set_custom_spacing — adjust spacing between UI elements.
- add_custom_break — force a new line.
- start_custom_tabs / end_custom_tabs — defines tabbed UI blocks.
- disable_resize — prevents auto dialog resizing.
- reset_placement_x — resets X alignment for elements.
2. Text & Labels
text
add_smalltext|message|
add_textbox|message|
add_label|size|message|alignment|
add_label_with_icon|size|message|alignment|iconID|
add_custom_textbox|text|size:value|
add_custom_label|option1|option2|Examples:
text
add_label|big|Welcome|left|
add_smalltext|Hello there!|
add_custom_textbox|Welcome to Atheria|size:small|3. Buttons
Standard Buttons
text
add_button|name|label|noflags|0|0|
add_button|name|label|off|0|0|
add_small_font_button|name|label|noflags|0|0|
add_small_font_button|name|label|off|0|0|
add_custom_button|name|option|
add_quick_exit|Examples:
text
add_button|btn1|Click Me|noflags|0|0|
add_small_font_button|close|Close|noflags|0|0|4. Buttons With Icons (multiple forms)
Standard icon button
text
add_button_with_icon|big/small|label|flags|iconID|hoverNumber|Variants
text
add_button_with_icon|name|text|option|itemID|unkVal|
add_button_with_icon|name|progress|itemID|
add_button_with_icon|name|underText|itemID|
add_button_with_icon|name|itemID|
add_button_with_icon|name|text|staticBlueFrame|itemID|left|Examples:
text
add_button_with_icon|btn1|Click Me|option|112|0|
add_button_with_icon|btn1|50%|112|
add_button_with_icon|btn1|Under Text|112|
add_button_with_icon|hello|Hello There|staticBlueFrame|242|left|5. Inputs & Forms
text
add_checkbox|name|message|checked|
add_text_input|name|message|defaultInput|length|
add_item_picker|name|message|placeholder|Examples:
text
add_checkbox|cb1|Enable Feature?|0|
add_text_input|username|Enter your name||20|6. Spacers & Layout Tools
text
add_spacer|size|
add_custom_spacer|x:value|Example:
text
add_custom_spacer|x:10|7. Images, Banners & Icon Labels
text
add_banner|imagePath|x|y|
add_big_banner|imagePath|x|y|text|
add_image_button|name|imagePath|flags|open|label|
add_friend_image_label_button|name|label|texture_path|size|texture_x|texture_y|
add_dual_layer_icon_label|size|text|alignment|iconID|background|foreground|size|toggle|
add_seed_color_icons|itemId|Examples:
text
add_banner|banner.png|0|0|
add_big_banner|banner.png|0|0|Welcome|
add_dual_layer_icon_label|big|Welcome|left|6016|background|foreground|32|1|
add_seed_color_icons|112|8. Progress Bars
text
add_progress_bar|name|size|text|current|max|color|Example:
text
add_progress_bar|xp|big|XP|50|100|blue|9. Tabs
text
enable_tabs|1|
add_tab_button|name|label|iconPath|x|y|Example:
text
add_tab_button|btnStats|Stats|stats_icon.png|0|0|10. Community UI Elements
text
add_community_button|button|btnName|noflags|0|0|
add_cmmnty_ft_wrld_bttn|worldName|ownerName|worldName|
add_cmmnty_wotd_bttn|top|worldName|ownerName|imagePath|x|y|worldName|
community_hub_type|hubType|Examples:
text
add_community_button|btn1|Community|noflags|0|0|
add_cmmnty_ft_wrld_bttn|WORLD|OWNER|WORLD|
add_cmmnty_wotd_bttn|1|WORLD|OWNER|image.png|0|0|WORLD|11. Advanced / Miscellaneous
text
embed_data|embed|data|Used for passing hidden data back through the dialog.
12. Searchable Item List
text
add_searchable_item_list|data|listType:iconGrid;resultLimit:N|searchFixedName|Example:
text
add_searchable_item_list|data|listType:iconGrid;resultLimit:12|searchFixedName|13. Achievements & Special Buttons
text
add_achieve_button|achName|achToGet|achID|unk|Example:
text
add_achieve_button|ach1|Get 100 points|1|0|14. Player Information Block
text
add_player_info|name|level|exp|expRequired|Example:
text
add_player_info|Skoobz|50|12345|20000|15. Summary
Dialog UI strings follow this pattern:
text
add_button|name|label|flags|0|0|
add_textbox|Hello World|
add_checkbox|cb1|Check me|0|Combine all elements into a single final string to send via:
lua
player:onDialogRequest(dialog)