This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dev:v3:gui_api:dialog:inputgui1 [2020/07/09 06:08] – jedi18 | dev:v3:gui_api:dialog:inputgui1 [2020/07/10 03:56] (current) – jedi18 | ||
|---|---|---|---|
| Line 65: | Line 65: | ||
| === Examples === | === Examples === | ||
| - |   * <code lua> local angle1 = gui.AngleGUI(" | + |   * <code lua> local angle1 = gui.Angle(" | 
| ---- | ---- | ||
| Line 138: | Line 138: | ||
| === Examples === | === Examples === | ||
| - |   * <code lua> angle1: | + |   * <code lua> angle1: | 
| ---- | ---- | ||
| Line 163: | Line 163: | ||
| === Examples === | === Examples === | ||
| - |   * <code lua> local button1 = gui.ButtonGUI(" | + |   * <code lua> local button1 = gui.Button(" | 
| ---- | ---- | ||
| Line 178: | Line 178: | ||
|   * <code lua> button1: |   * <code lua> button1: | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== RadioButton GUI Class ===== | ||
| + | |||
| + | ---- | ||
| + | |||
| + | [[https:// | ||
| + | <code cpp-qt> namespace lc::ui::api </ | ||
| + | |||
| + | The RadioButton GUI class is used to add a RadioButton to a radio group of the dialog widget. Callbacks can be added to the button which is called when the radiobutton is checked. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Constructor ==== | ||
| + | |||
| + | ---- | ||
| + | |||
| + | === Description === | ||
| + | |||
| + | Constructs a radiobutton gui widget. | ||
| + | |||
| + | === Examples === | ||
| + | |||
| + |   * <code lua> local radio1 = gui.RadioButton(" | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Add Callback ==== | ||
| + | |||
| + | ---- | ||
| + | |||
| + | === Description === | ||
| + | |||
| + | Add a callback to be called whenever the user clicks on the button toggling it's checked state. | ||
| + | |||
| + | === Examples === | ||
| + | |||
| + |   * <code lua> radio1: | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Checked and Set Checked ==== | ||
| + | |||
| + | ---- | ||
| + | |||
| + | === Description === | ||
| + | |||
| + | Used to get and the set the value of the radio button i.e. toggle the checked state of the radio button. | ||
| + | |||
| + | |||
| + | === Examples === | ||
| + | |||
| + |   * <code lua> local val = radio1: | ||
| + |   * <code lua> radio1: | ||
| ---- | ---- | ||
| Line 202: | Line 257: | ||
| === Examples === | === Examples === | ||
| - |   * <code lua> local check1 = gui.CheckBoxGUI(" | + |   * <code lua> local check1 = gui.CheckBox(" | 
| ---- | ---- | ||
| Line 232: | Line 287: | ||
|   * <code lua> local isChecked = check1: |   * <code lua> local isChecked = check1: | ||
|   * <code lua> check1: |   * <code lua> check1: | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== ComboBox GUI Class ===== | ||
| + | |||
| + | ---- | ||
| + | |||
| + | [[https:// | ||
| + | <code cpp-qt> namespace lc::ui::api </ | ||
| + | |||
| + | The ComboBox GUI class is used to add a combobox to the dialog widget. Callbacks can be added to the checkbox which is called when a element is selected, the name of the selected element is passed as a parameter to the callback. | ||
| + | ---- | ||
| + | |||
| + | ==== Constructor ==== | ||
| + | |||
| + | ---- | ||
| + | |||
| + | === Description === | ||
| + | |||
| + | Constructs an combobox gui widget | ||
| + | |||
| + | === Examples === | ||
| + | |||
| + |   * <code lua> local combo1 = gui.ComboBox(" | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Add Callback ==== | ||
| + | |||
| + | ---- | ||
| + | |||
| + | === Description === | ||
| + | |||
| + | Add a callback to be called whenever selects an element from the combobox.Passes in a string representing the name of the selected element in the combobox. | ||
| + | |||
| + | === Examples === | ||
| + | |||
| + |   * <code lua> combo1: | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Get and Set Values ==== | ||
| + | |||
| + | ---- | ||
| + | |||
| + | === Description === | ||
| + | |||
| + | Used to get the current element string of the combobox widget or set it to a desired element. If the user attempts to set an element that does not exist in the combobox, nothing happens. | ||
| + | Element can also be set by specifying the index of the element to be selected. | ||
| + | |||
| + | |||
| + | === Examples === | ||
| + | |||
| + |   * <code lua> local val = combo1: | ||
| + |   * <code lua> combo1: | ||
| + |   * <code lua> combo1: | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ==== Add Item ==== | ||
| + | |||
| + | ---- | ||
| + | |||
| + | === Description === | ||
| + | |||
| + | Add an item to the combobox, if index is not specified it is added to the end of the combobox list. | ||
| + | |||
| + | |||
| + | === Examples === | ||
| + | |||
| + |   * <code lua> combo1: | ||
| + |   * <code lua> combo1: | ||
| ---- | ---- | ||