User Tools

Site Tools



gui_api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
gui_api [2020/04/23 08:49] – [Important Information] fxfiregui_api [2020/04/23 08:50] – [Important Information] fxfire
Line 40: Line 40:
 ===Important Information=== ===Important Information===
   * To get an overview what is possible with the GUI, open the ingame console (CTRL + C) and execute this command: ''ml_gui.showtestwindow = true''\\   * To get an overview what is possible with the GUI, open the ingame console (CTRL + C) and execute this command: ''ml_gui.showtestwindow = true''\\
-  * AUTOMATIC TRANSLATIONS - Wrap all your static text like: GUI:Button("I am a Label") to GUI:Button(GetString("I am a Label")), this will allow automatic translation to all languages later on.+  * **AUTOMATIC TRANSLATIONS** - Wrap all your static text like: GUI:Button("I am a Label") to GUI:Button(GetString("I am a Label")), this will allow automatic translation to all languages later on.
   * If you find something in that Testwindow but you are not sure how to code the same in LUA, have a look in the c++ source of it: [[https://github.com/ocornut/imgui/blob/master/imgui_demo.cpp]], the used function names and syntax are 99% the same, just the arguments might be slightly different due to LUA not supporting references.\\   * If you find something in that Testwindow but you are not sure how to code the same in LUA, have a look in the c++ source of it: [[https://github.com/ocornut/imgui/blob/master/imgui_demo.cpp]], the used function names and syntax are 99% the same, just the arguments might be slightly different due to LUA not supporting references.\\
  
Line 53: Line 53:
 GUI:Button("Banana###123hohoho" GUI:Button("Banana###123hohoho"
 GUI:Button("Pineapple###123hohoho") GUI:Button("Pineapple###123hohoho")
 +Example: Different name in UI, same internal identifier with auto **Translations**: 
 +GUI:Button(GetString("Banana").."###123hohoho"
 +GUI:Button(GetString("Pineapple").."###123hohoho")
 </code> </code>
  
gui_api.txt · Last modified: 2023/04/21 07:34 by kali