User Tools

Site Tools


dragengine:modules:dragonscript:xmlguitheme:widgetdesigner

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dragengine:modules:dragonscript:xmlguitheme:widgetdesigner [2018/02/28 15:08] – [ScrollBar] dragonlorddragengine:modules:dragonscript:xmlguitheme:widgetdesigner [2024/03/14 16:52] (current) dragonlord
Line 9: Line 9:
 Widget designers are always based directly or indirectly on a type. This type is the //Designer Prototype// and defines what instance of //WidgetDesigner// is used in the scripts. It is important to choose the right prototype for a designer since the widget type and widget designer type are closely linked. For example you can use a //Widget// type designer for all kinds of widgets but a //Button// type designer is only working on //Button// widgets or subclasses thereof. If you choose the wrong designer type a run-time invalid cast exception is likely thrown. Widget designers are always based directly or indirectly on a type. This type is the //Designer Prototype// and defines what instance of //WidgetDesigner// is used in the scripts. It is important to choose the right prototype for a designer since the widget type and widget designer type are closely linked. For example you can use a //Widget// type designer for all kinds of widgets but a //Button// type designer is only working on //Button// widgets or subclasses thereof. If you choose the wrong designer type a run-time invalid cast exception is likely thrown.
  
-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 #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1WidgetDesigners.html,WidgetDesigners~@# script class:
 ^ Name ^ Script Class ^ Target Widget Class ^ ^ Name ^ Script Class ^ Target Widget Class ^
-| [[#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]] +| [[#button|Button]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultButtonDesigner.html,DefaultButtonDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Button.html,Button~@# 
-| [[#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]] +| [[#checkbox|CheckBox]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultCheckBoxDesigner.html,DefaultCheckBoxDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1CheckBox.html,CheckBox~@# 
-| [[#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]] +| [[#combobox|ComboBox]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultComboBoxDesigner.html,DefaultComboBoxDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1ComboBox.html,ComboBox~@# 
-| [[#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]] +| [[#widget|Desktop]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultWidgetDesigner.html,DefaultWidgetDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Desktop.html,Desktop~@# 
-| [[#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]] +| [[#label|Label]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultLabelDesigner.html,DefaultLabelDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Label.html,Label~@# 
-| [[#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]] +| [[#widget|ListBox]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultWidgetDesigner.html,DefaultWidgetDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1ListBox.html,ListBox~@# 
-| [[#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]] +| [[#optionbox|OptionBox]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultOptionBoxDesigner.html,DefaultOptionBoxDesigner~@# #@LinkApiDocDEDS2_HTML~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]] +| [[#label|PlayerChoiceEntry]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultLabelDesigner.html,DefaultLabelDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1OptionBox.html,OptionBox~@# 
-| [[#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]] +| [[#progressbar|ProgressBar]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultProgressBarDesigner.html,DefaultProgressBarDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1ProgressBar.html,ProgressBar~@# 
-| [[#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]] +| [[#scrollbar|ScrollBar]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultScrollBarDesigner.html,DefaultScrollBarDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1ScrollBar.html,ScrollBar~@# 
-| [[#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]] +| [[#spinbutton|SpinButton]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultSpinButtonDesigner.html,DefaultSpinButtonDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1SpinButton.html,SpinButton~@# 
-| [[#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]] +| [[#widget|TextArea]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultTextAreaDesigner.html,DefaultTextAreaDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1TextArea.html,TextArea~@# 
-| [[#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|TextField]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultTextFieldDesigner.html,DefaultTextFieldDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1TextField.html,TextField~@# 
-| [[#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]] +| [[#widget|Widget]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultWidgetDesigner.html,DefaultWidgetDesigner~@# #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Widget.html,Widget~@# 
-| [[#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]] |+| [[#window|Window]] | #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultWindowDesigner.html,DefaultWindowDesigner~@# #@LinkApiDocDEDS2_HTML~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 #@LinkApiDocDEDS2_HTML~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.
  
 This example defines a designer based on the //Label// prototype for use by //Label// widgets or subclasses thereof. This example defines a designer based on the //Label// prototype for use by //Label// widgets or subclasses thereof.
Line 53: Line 53:
  
 ===== Widget ===== ===== Widget =====
-The most basic widget designer suitable for all widgets. If you do not know what type to use to style your widget use this one first unless another one matches better. Using this type creates an instance of [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1DefaultWidgetDesigner.html|DefaultWidgetDesigner]] as designer. All other widget designers subclass this type and thus share these parameters defined below. All types in the list above using DefaultWidgetDesigner belong to this category here.+The most basic widget designer suitable for all widgets. If you do not know what type to use to style your widget use this one first unless another one matches better. Using this type creates an instance of #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1DefaultWidgetDesigner.html,DefaultWidgetDesigner~@# as designer. All other widget designers subclass this type and thus share these parameters defined below. All types in the list above using DefaultWidgetDesigner belong to this category here.
  
 The widget supports these display states to style individually: The widget supports these display states to style individually:
Line 75: Line 75:
  
 ===== Label ===== ===== Label =====
-Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Label.html|Label]] widgets and subclasses thereof. Label widgets support text parameters defined in the //Widget// type.+Widget designer suitable for #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Label.html,Label~@# widgets and subclasses thereof. Label widgets support text parameters defined in the //Widget// type.
  
 These additional additional parameters can be used. These additional additional parameters can be used.
Line 84: Line 84:
  
 ===== ProgressBar ===== ===== ProgressBar =====
-Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ProgressBar.html|ProgressBar]] widgets and subclasses thereof. Progress bar widgets support text parameters defined in the //Widget// type. Additional parameters are present to design the progress bar shown behind the text.+Widget designer suitable for #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1ProgressBar.html,ProgressBar~@# widgets and subclasses thereof. Progress bar widgets support text parameters defined in the //Widget// type. Additional parameters are present to design the progress bar shown behind the text.
  
 These additional parameters can be used. These additional parameters can be used.
Line 94: Line 94:
  
 ===== Window ===== ===== Window =====
-Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Window.html|Window]] widgets and subclasses thereof. Window widgets support a decoration to allow users to interact with the window.+Widget designer suitable for #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Window.html,Window~@# widgets and subclasses thereof. Window widgets support a decoration to allow users to interact with the window.
  
 These additional parameters can be used. These additional parameters can be used.
  
 ^ Parameter Name ^ Supported parameter type ^ Description ^ ^ Parameter Name ^ Supported parameter type ^ Description ^
-| 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 | +| decoration | [[dragengine:modules:dragonscript:xmlguitheme:parameters#decoration|DecorationFactory]] | #@LinkApiDocDEDS2_HTML~interfaceDragengine_1_1Gui_1_1Decorations_1_1Factories_1_1DecorationFactory.html,DecorationFactory~@# used to create window #@LinkApiDocDEDS2_HTML~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 #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1WindowModal.html,WindowModal~@# is blocking this window. The default is 35% black color |
  
  
 ===== Button ===== ===== Button =====
-Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Button.html|Button]] widgets and subclasses thereof. Button widgets support in addition to the regular widget state also a pressed button state. The label inside the button uses //Label// type with the designer selector //Label.Button//. This designer applies only to the button as a whole.+Widget designer suitable for #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Button.html,Button~@# widgets and subclasses thereof. Button widgets support in addition to the regular widget state also a pressed button state. The label inside the button uses //Label// type with the designer selector //Label.Button//. This designer applies only to the button as a whole.
  
 No additional parameters are supported except //pressed// as new possible value for //{state}.XXX// parameters. No additional parameters are supported except //pressed// as new possible value for //{state}.XXX// parameters.
Line 110: Line 110:
  
 ===== 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.+Widget designer suitable for #@LinkApiDocDEDS2_HTML~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. These additional parameters can be used.
Line 120: Line 120:
  
 ===== 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.+Widget designer suitable for #@LinkApiDocDEDS2_HTML~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. These additional parameters can be used.
Line 130: Line 130:
  
 ===== ComboBox ===== ===== ComboBox =====
-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 #@LinkApiDocDEDS2_HTML~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 #@LinkApiDocDEDS2_HTML~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. The new state //droppedDown// is a new possible value for //{state}.XXX// parameters.
Line 142: Line 142:
  
 ===== SpinButton ===== ===== SpinButton =====
-Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1SpinButton.html|SpinButton]] widgets and subclasses thereof.+Widget designer suitable for #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1SpinButton.html,SpinButton~@# widgets and subclasses thereof.
  
 These additional parameters can be used. These additional parameters can be used.
Line 155: Line 155:
  
 ===== ScrollBar ===== ===== ScrollBar =====
-Widget designer suitable for [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1ScrollBar.html|ScrollBar]] widgets and subclasses thereof.+Widget designer suitable for #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1ScrollBar.html,ScrollBar~@# widgets and subclasses thereof.
  
 These additional parameters can be used. These additional parameters can be used.
dragengine/modules/dragonscript/xmlguitheme/widgetdesigner.1519830511.txt.gz · Last modified: 2018/02/28 15:08 by dragonlord