Chili: Difference between revisions
Silentwings (talk | contribs) add links to objects, clearer text (todo: clean up examples) |
Silentwings (talk | contribs) |
||
| Line 1: | Line 1: | ||
== Chili UI == | == Chili UI == | ||
Chili is Springs very own GUI framework. It's a flexible, class based framework which allows you to create great looking GUIs quickly. | Chili is Springs very own GUI framework. It's a flexible, class based framework which allows you to create great looking GUIs very quickly. | ||
In Chili, every element of the GUI has properties that control how it looks, and functions it can call when special events (such as a double click, or mouseover) affect it. | In Chili, every element of the GUI has properties that control how it looks, and functions it can call when special events (such as a double click, or mouseover) affect it. | ||
== Getting Chili == | == Getting Chili == | ||
Revision as of 17:43, 30 August 2015
Chili UI
Chili is Springs very own GUI framework. It's a flexible, class based framework which allows you to create great looking GUIs very quickly.
In Chili, every element of the GUI has properties that control how it looks, and functions it can call when special events (such as a double click, or mouseover) affect it.
Getting Chili
The Chili repository can be found at https://github.com/jk3064/chiliui. There are two ways to add Chili to your game:
- Include the Chili repository as a git submodule in your project.
- Checkout the Chili repository, and place the files from its /luaui/chili directory into your games /luaui/widgets directory.
If you are having trouble getting Chili to run, login to the lobby and join the #moddev channel (type /j moddev). People there will help you figure it out.
Chili Component Hierachy
The Chili framework is object orientated, and each different component is a class. The hierachy of components, which is documented here, is as follows:
Object |_ Screen |_ Control |_ Button |_ Checkbox |_ ColorBars |_ ComboBox |_ EditBox |_ Font |_ Label |_ LayoutPanel |_ ImageListView |_ Grid |_ StackPanel |_ TabPanel |_ Line |_ Image |_ MultiProgressBar |_ Panel |_ ProgressBar |_ Scale |_ ScrollPanel |_ TextBox |_ TrackBar |_ TreeView |_ TreeViewNode |_ Window
Viewing the diagram as a tree, each component inherits from its parent in the tree. In practice, this means each component has the properties/functionality of its own type, and also of all components found upwards from it in the tree. For example, a Grid has it's own properties, but also has those of a LayoutPanel, Control and Object.