User Tools

Site Tools


dragengine:modules:dragonscript:guitheme

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:guitheme [2018/03/01 08:59] – [XML Gui Themeing] dragonlorddragengine:modules:dragonscript:guitheme [2024/03/14 16:43] (current) dragonlord
Line 1: Line 1:
 +{{tag>dragonscript ui theme}}
 <WRAP youarehere> <WRAP youarehere>
 [[:start|Start Page]] >> [[dragengine:modules:dragonscript:main|DragonScript Scripting Language]]  >> **Gui Themes** [[:start|Start Page]] >> [[dragengine:modules:dragonscript:main|DragonScript Scripting Language]]  >> **Gui Themes**
Line 4: Line 5:
  
 ====== Gui Themes ====== ====== Gui Themes ======
-The DragonScript module provides a Gui Toolkit based on the [[gamedev:canvassystem:introduction|canvas system]]. This is a non-mandatory implementation and can be replaced by a different or custom toolkit implementation. To customize the toolkit visually and in some cases also functionally [[http://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1GuiThemes_1_1GuiTheme.html|gui themes]] are used.+The DragonScript module provides a Gui Toolkit based on the [[gamedev:canvassystem:introduction|canvas system]]. This is a non-mandatory implementation and can be replaced by a different or custom toolkit implementation. To customize the toolkit visually and in some cases also functionally #@LinkApiDocDEDS2_HTML~interfaceDragengine_1_1Gui_1_1GuiThemes_1_1GuiTheme.html,gui themes~@# are used.
  
-A gui theme defines a set of widget designers which modify the design of [[http://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Widget.html|widgets]] in different states. A button for example consists of the [[http://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Button.html|button widget]] defining the structure and functionality of the button and the [[http://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1Designers_1_1ButtonDesigner.html|button designer]] which defines how the button looks like in all used button states.+A gui theme defines a set of widget designers which modify the design of #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Widget.html,widgets~@# in different states. A button for example consists of the #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Button.html,button widget~@# defining the structure and functionality of the button and the #@LinkApiDocDEDS2_HTML~interfaceDragengine_1_1Gui_1_1Designers_1_1ButtonDesigner.html,button designer~@# which defines how the button looks like in all used button states.
  
 Designers usually use [[gamedev:canvassystem:canvascreators|canvas creators]] to set the background, border or decoration design of widgets. For some widgets designers even create sub-widgets managing using their own widget designer. Designers are shared across gui themes and other designers to improve loading speed and reducing memory consumption. For this reason widget designers can be duplicated using the copyDesigner method.  Designers usually use [[gamedev:canvassystem:canvascreators|canvas creators]] to set the background, border or decoration design of widgets. For some widgets designers even create sub-widgets managing using their own widget designer. Designers are shared across gui themes and other designers to improve loading speed and reducing memory consumption. For this reason widget designers can be duplicated using the copyDesigner method. 
  
-You rarely need to modify the gui theme content by yourself. You fully define gui themes using XML files. Widget designers are configured in XML files by defining named parameters. The [[http://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Designers_1_1WidgetDesigners.html|widget designers]] class stores a lists of named designers used as templates . You can add your own designer template to this list if you like. You can create gui themes using script code but it highly recommended to use XML files. It makes the life of your artists much simpler. To load XML files use [[http://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1LoadSave_1_1LoadGuiTheme.html|load gui theme]] class. [[http://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1LoadSave_1_1Loaders.html|Loaders]] provides a ready to use gui theme loader.+You rarely need to modify the gui theme content by yourself. You fully define gui themes using XML files. Widget designers are configured in XML files by defining named parameters. The #@LinkApiDocDEDS2_HTML~classDragengine_1_1Gui_1_1Designers_1_1WidgetDesigners.html,widget designers~@# class stores a lists of named designers used as templates . You can add your own designer template to this list if you like. You can create gui themes using script code but it highly recommended to use XML files. It makes the life of your artists much simpler. To load XML files use #@LinkApiDocDEDS2_HTML~classDragengine_1_1LoadSave_1_1LoadGuiTheme.html,load gui theme~@# class. #@LinkApiDocDEDS2_HTML~classDragengine_1_1LoadSave_1_1Loaders.html,Loaders~@# provides a ready to use gui theme loader.
  
 The example below shows an example usage. The example below shows an example usage.
Line 41: Line 42:
 This is an example of the ready to use modern gui theme included in the DragonScript module. This is an example of the ready to use modern gui theme included in the DragonScript module.
 <WRAP center box 600px> <WRAP center box 600px>
-{{ :dragengine:modules:dragonscript:guitheme.png |Moden gui theme example}} +{{ :dragengine:modules:dragonscript:guitheming.png |XML Gui Theme Example}} 
-<WRAP centeralign>Moden gui theme example.</WRAP>+<WRAP centeralign>XML Gui Theme Example.</WRAP>
 </WRAP> </WRAP>
- 
  
 ====== XML Gui Themeing ====== ====== XML Gui Themeing ======
Line 51: Line 51:
   * [[dragengine:modules:dragonscript:xmlguitheme:guitheme|Define XML Gui Theme (*.guitheme.xml)]]   * [[dragengine:modules:dragonscript:xmlguitheme:guitheme|Define XML Gui Theme (*.guitheme.xml)]]
   * [[dragengine:modules:dragonscript:xmlguitheme:widgetdesigner|Define XML Widget Designer]]   * [[dragengine:modules:dragonscript:xmlguitheme:widgetdesigner|Define XML Widget Designer]]
 +    * [[dragengine:modules:dragonscript:xmlguitheme:parameters|Defining Parameters]]
   * [[dragengine:modules:dragonscript:xmlguitheme:canvascreator|Define XML Canvas Creator]]   * [[dragengine:modules:dragonscript:xmlguitheme:canvascreator|Define XML Canvas Creator]]
   * [[dragengine:modules:dragonscript:xmlguitheme:borderfactory|Define XML Border Factory]]   * [[dragengine:modules:dragonscript:xmlguitheme:borderfactory|Define XML Border Factory]]
   * [[dragengine:modules:dragonscript:xmlguitheme:decoration|Define XML Decoration]]   * [[dragengine:modules:dragonscript:xmlguitheme:decoration|Define XML Decoration]]
   * [[dragengine:modules:dragonscript:xmlguitheme:mousepointer|Define XML Mouse Pointer]]   * [[dragengine:modules:dragonscript:xmlguitheme:mousepointer|Define XML Mouse Pointer]]
-  * [[dragengine:modules:dragonscript:xmlguitheme:parameters|Defining Parameters]] 
  
dragengine/modules/dragonscript/guitheme.1519894799.txt.gz · Last modified: 2018/03/01 08:59 by dragonlord