Create
This function creates a custom widget. Set the script parameter to your own custom script.
Syntax
- static Widget* Create(const std::string& text, const int x, const int y, const int width, const int height, Widget* parent, const std::string& scriptfile)
Parameters
- text: text to display on the widget, if applicable.
- x: X position of the widget, in logical units.
- y: Y position of the widget, in logical units.
- width: width of the widget, in logical units.
- height: height of the widget, in logical units.
- scriptfile: script file to use for drawing and events.
Returns
Returns a new widget.