This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
dev:v3:gui_api:dialog:inputgui2 [2020/07/09 06:32] – created jedi18 | dev:v3:gui_api:dialog:inputgui2 [2020/07/09 12:41] (current) – jedi18 | ||
---|---|---|---|
Line 24: | Line 24: | ||
=== Examples === | === Examples === | ||
- | * <code lua> local coord1 = gui.CoordinateGUI(" | + | * <code lua> local coord1 = gui.Coordinate(" |
---- | ---- | ||
Line 70: | Line 70: | ||
* <code lua> coord1: | * <code lua> coord1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Entity Picker GUI Class ===== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | [[https:// | ||
+ | <code cpp-qt> namespace lc::ui::api </ | ||
+ | |||
+ | The entity picker gui widget allows the user to select an entity by dragging their mouse and selecting the required entities which are then added to the entity list. Selecting an entity from the list highlights it in the cadmdichild so the user can see which entity it refers to. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Constructor ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Constructs an Entity Picker GUI widget. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> local entity1 = gui.EntityPicker(" | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Get Values ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Get a list of all the entity selected using the entity picker widget. It returns a list of cadentity shared pointers. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> local entities = entity1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Set Value ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | An entity list is passed in as a parameter and all these entities are added to the list (unless entity is already added to the list). | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> entity1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Add Callback ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Add callback for when an entity is selected in the entity list. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> entity1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Add Entity ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Add an entity to the entity list. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> entity1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Number GUI Class ===== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | [[https:// | ||
+ | <code cpp-qt> namespace lc::ui::api </ | ||
+ | |||
+ | The number gui widget is used for entering a number (double). | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Constructor ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Constructs a Number GUI widget. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> local number1 = gui.Number(" | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Get Values ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Gets the value of the number widget. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> local val = number1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Set Value ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Sets the number widget value. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> number1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Add Callback ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Add callback for when the number is changed | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> number1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Slider GUI Class ===== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | [[https:// | ||
+ | <code cpp-qt> namespace lc::ui::api </ | ||
+ | |||
+ | The slider gui widget is used for values that could use a slider input. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Constructor ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Constructs a Slider GUI Widget. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> local slider1 = gui.Slider(" | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Get Values ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Gets the value of the slider widget. Returns a //double// value. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> local val = slider1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Set Value ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Sets the slider widget value. Expects a //double// parameter. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> slider1: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Add Callback ==== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Description === | ||
+ | |||
+ | Add callback for when the slider value is changed. | ||
+ | |||
+ | === Examples === | ||
+ | |||
+ | * <code lua> slider1: | ||
---- | ---- |