Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
dragengine:modules:dragonscript:xmlguitheme:widgetdesigner [2018/02/28 10:51] – [Window] dragonlord | dragengine:modules:dragonscript:xmlguitheme:widgetdesigner [2018/02/28 14:35] – [SpinButton] 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. |
| |
^ Parameter Name ^ Supported parameter type ^ Description ^ | ^ Parameter Name ^ Supported parameter type ^ Description ^ |
| decoration | [[dragengine:modules:dragonscript:xmlguitheme:parameters#decoration|DecorationFactory]] | Factory used to create window Decoration instance. Can be null to create windows without decoration | | | decoration | [[dragengine:modules:dragonscript:xmlguitheme:parameters#decoration|DecorationFactory]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1Decorations_1_1Factories_1_1DecorationFactory.html|DecorationFactory]] used to create window [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1Decorations_1_1Decoration.html|Decoration]] instance. Can be null to create windows without decoration | |
| modalDarken | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color|Color]] | Color used to darken the entire window if a [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1WindowModal.html|WindowModal]] is blocking this window. The default is 35% black color | | | modalDarken | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color|Color]] | Color used to darken the entire window if a [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1WindowModal.html|WindowModal]] is blocking this window. The default is 35% black color | |
| |
| |
===== CheckBox ===== | ===== CheckBox ===== |
Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CheckBox.html|CheckBox]] widgets and subclasses thereof. Check box widgets are subclasses of Button widgets and share the pressed state. In addition they define images for the check box and tick mark. These additional parameters can be used. | Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CheckBox.html|CheckBox]] widgets and subclasses thereof. Check box widgets are subclasses of Button widgets and share the pressed state. In addition they define images for the check box and tick mark. |
| |
| These additional parameters can be used. |
| |
^ Parameter Name ^ Supported parameter type ^ Description ^ | ^ Parameter Name ^ Supported parameter type ^ Description ^ |
| |
===== OptionBox ===== | ===== OptionBox ===== |
Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1OptionBox.html|OptionBox]] widgets and subclasses thereof. Option box widgets are subclasses of Button widgets and share the pressed state. In addition they define images for the check box and selection mark. These additional parameters can be used. | Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1OptionBox.html|OptionBox]] widgets and subclasses thereof. Option box widgets are subclasses of Button widgets and share the pressed state. In addition they define images for the check box and selection mark. |
| |
| These additional parameters can be used. |
| |
^ Parameter Name ^ Supported parameter type ^ Description ^ | ^ Parameter Name ^ Supported parameter type ^ Description ^ |
Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ComboBox.html|ComboBox]] widgets and subclasses thereof. Combo box widgets support in addition the regular widget states also a dropped-down state. The list is provided in a [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1WindowPopup.html|WindowPopup]]. The list box has the selector //ListBox.ComboBox//. The drop down button is drawn using a canvas creator and is no widget itself. | Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ComboBox.html|ComboBox]] widgets and subclasses thereof. Combo box widgets support in addition the regular widget states also a dropped-down state. The list is provided in a [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1WindowPopup.html|WindowPopup]]. The list box has the selector //ListBox.ComboBox//. The drop down button is drawn using a canvas creator and is no widget itself. |
| |
The new state //droppedDown// is a new possible value for //{state}.XXX// parameters. These additional parameters can be used. | The new state //droppedDown// is a new possible value for //{state}.XXX// parameters. |
| |
| These additional parameters can be used. |
| |
^ Parameter Name ^ Supported parameter type ^ Description ^ | ^ Parameter Name ^ Supported parameter type ^ Description ^ |
| {state}.buttonDropDown | [[dragengine:modules:dragonscript:xmlguitheme:parameters#canvascreator|CanvasCreator]] | Canvas creator to draw drop down button | | | {state}.buttonDropDown | [[dragengine:modules:dragonscript:xmlguitheme:parameters#canvas_creator|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#widget_designer|WidgetDesigner]] | Widget designer to use for the up arrow button | |
| | buttonDown | [[dragengine:modules:dragonscript:xmlguitheme:parameters#widget_designer|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 | |
| |