Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
dragengine:modules:dragonscript:xmlguitheme:widgetdesigner [2018/02/28 10:55] – [Window] dragonlord | dragengine:modules:dragonscript:xmlguitheme:widgetdesigner [2018/02/28 14:31] – [Widget Designers] dragonlord |
---|
The following prototypes are provided by default by the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1WidgetDesigners.html|WidgetDesigners]] script class: | The following prototypes are provided by default by the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1WidgetDesigners.html|WidgetDesigners]] script class: |
^ Name ^ Script Class ^ Target Widget Class ^ | ^ Name ^ Script Class ^ Target Widget Class ^ |
| Button | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultButtonDesigner.html|DefaultButtonDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Button.html|Button]] | | | [[#button|Button]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultButtonDesigner.html|DefaultButtonDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Button.html|Button]] | |
| CheckBox | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultCheckBoxDesigner.html|DefaultCheckBoxDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CheckBox.html|CheckBox]] | | | [[#checkbox|CheckBox]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultCheckBoxDesigner.html|DefaultCheckBoxDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CheckBox.html|CheckBox]] | |
| ComboBox | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultComboBoxDesigner.html|DefaultComboBoxDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ComboBox.html|ComboBox]] | | | [[#combobox|ComboBox]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultComboBoxDesigner.html|DefaultComboBoxDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ComboBox.html|ComboBox]] | |
| Desktop | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultWidgetDesigner.html|DefaultWidgetDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Desktop.html|Desktop]] | | | [[#widget|Desktop]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultWidgetDesigner.html|DefaultWidgetDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Desktop.html|Desktop]] | |
| Label | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultLabelDesigner.html|DefaultLabelDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Label.html|Label]] | | | [[#label|Label]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultLabelDesigner.html|DefaultLabelDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Label.html|Label]] | |
| ListBox | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultWidgetDesigner.html|DefaultWidgetDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ListBox.html|ListBox]] | | | [[#widget|ListBox]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultWidgetDesigner.html|DefaultWidgetDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ListBox.html|ListBox]] | |
| OptionBox | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultOptionBoxDesigner.html|DefaultOptionBoxDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1OptionBox.html|OptionBox]] | | | [[#optionbox|OptionBox]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultOptionBoxDesigner.html|DefaultOptionBoxDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1OptionBox.html|OptionBox]] | |
| PlayerChoiceEntry | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultLabelDesigner.html|DefaultLabelDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1OptionBox.html|OptionBox]] | | | [[#label|PlayerChoiceEntry]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultLabelDesigner.html|DefaultLabelDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1OptionBox.html|OptionBox]] | |
| ProgressBar | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultProgressBarDesigner.html|DefaultProgressBarDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ProgressBar.html|ProgressBar]] | | | [[#progressbar|ProgressBar]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultProgressBarDesigner.html|DefaultProgressBarDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ProgressBar.html|ProgressBar]] | |
| ScrollBar | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultScrollBarDesigner.html|DefaultScrollBarDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ScrollBar.html|ScrollBar]] | | | [[#scrollbar|ScrollBar]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultScrollBarDesigner.html|DefaultScrollBarDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ScrollBar.html|ScrollBar]] | |
| SpinButton | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultSpinButtonDesigner.html|DefaultSpinButtonDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1SpinButton.html|SpinButton]] | | | [[#spinbutton|SpinButton]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultSpinButtonDesigner.html|DefaultSpinButtonDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1SpinButton.html|SpinButton]] | |
| TextArea | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultTextAreaDesigner.html|DefaultTextAreaDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1TextArea.html|TextArea]] | | | [[#widget|TextArea]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultTextAreaDesigner.html|DefaultTextAreaDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1TextArea.html|TextArea]] | |
| TextField | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultTextFieldDesigner.html|DefaultTextFieldDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1TextField.html|TextField]] | | | [[#widget|TextField]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultTextFieldDesigner.html|DefaultTextFieldDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1TextField.html|TextField]] | |
| Widget | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultWidgetDesigner.html|DefaultWidgetDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Widget.html|Widget]] | | | [[#widget|Widget]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultWidgetDesigner.html|DefaultWidgetDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Widget.html|Widget]] | |
| Window | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultWindowDesigner.html|DefaultWindowDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Window.html|Window]] | | | [[#window|Window]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultWindowDesigner.html|DefaultWindowDesigner]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Window.html|Window]] | |
| |
You can use custom prototypes by adding them to [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1WidgetDesigners.html|WidgetDesigners]] instance before loading gui themes. This is useful if you created custom widget subclasses requiring custom parameters. | You can use custom prototypes by adding them to [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1WidgetDesigners.html|WidgetDesigners]] instance before loading gui themes. This is useful if you created custom widget subclasses requiring custom parameters. |
| {state}.buttonDropDown | [[dragengine:modules:dragonscript:xmlguitheme:parameters#canvascreator|CanvasCreator]] | Canvas creator to draw drop down button | | | {state}.buttonDropDown | [[dragengine:modules:dragonscript:xmlguitheme:parameters#canvascreator|CanvasCreator]] | Canvas creator to draw drop down button | |
| {state}.imageDropDown | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use inside dropped down button | | | {state}.imageDropDown | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use inside dropped down button | |
| |
| |
| ===== SpinButton ===== |
| Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1SpinButton.html|SpinButton]] widgets and subclasses thereof. |
| |
| These additional parameters can be used. |
| |
| ^ Parameter Name ^ Supported parameter type ^ Description ^ |
| | size | [[dragengine:modules:dragonscript:xmlguitheme:parameters#integer|int]] | Fixed width in pixels of the spin button arrow buttons | |
| | buttonUp | [[dragengine:modules:dragonscript:xmlguitheme:parameters#widgetdesigner|WidgetDesigner]] | Widget designer to use for the up arrow button | |
| | buttonDown | [[dragengine:modules:dragonscript:xmlguitheme:parameters#widgetdesigner|WidgetDesigner]] | Widget designer to use for the down arrow button | |
| | {state}.imageUp | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use for the up arrow button | |
| | {state}.imageDown | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use for the down arrow button | |
| |
| |
| ===== ScrollBar ===== |
| Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ScrollBar.html|ScrollBar]] widgets and subclasses thereof. |
| |
| These additional parameters can be used. |
| |
| ^ Parameter Name ^ Supported parameter type ^ Description ^ |
| | size | [[dragengine:modules:dragonscript:xmlguitheme:parameters#integer|int]] | Fixed width/height in pixels of the scroll bar depending on orientation | |
| | buttonUp | [[dragengine:modules:dragonscript:xmlguitheme:parameters#widgetdesigner|WidgetDesigner]] | Widget designer to use for the up arrow button | |
| | buttonDown | [[dragengine:modules:dragonscript:xmlguitheme:parameters#widgetdesigner|WidgetDesigner]] | Widget designer to use for the down arrow button | |
| | buttonLeft | [[dragengine:modules:dragonscript:xmlguitheme:parameters#widgetdesigner|WidgetDesigner]] | Widget designer to use for the left arrow button | |
| | buttonRight | [[dragengine:modules:dragonscript:xmlguitheme:parameters#widgetdesigner|WidgetDesigner]] | Widget designer to use for the right arrow button | |
| | {state}.imageUp | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use for the up arrow button | |
| | {state}.imageDown | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use for the down arrow button | |
| | {state}.imageLeft | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use for the left arrow button | |
| | {state}.imageRight | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use for the right arrow button | |
| | {state}.canvasFrame | [[dragengine:modules:dragonscript:xmlguitheme:parameters#canvascreator|CanvasCreator]] | Canvas creator to use for the scroll area frame | |
| | {state}.canvasKnob | [[dragengine:modules:dragonscript:xmlguitheme:parameters#canvascreator|CanvasCreator]] | Canvas creator to use for the scroll area knob | |
| | {state}.paddingKnobFrame | [[dragengine:modules:dragonscript:xmlguitheme:parameters#bordersize|BorderSize]] | Padding between scroll area knob and frame | |
| |