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
dragengine:modules:dragonscript:guitheme [2020/04/03 10:20] – url move dragonlorddragengine:modules:dragonscript:guitheme [2024/03/14 16:43] (current) dragonlord
Line 5: 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://developer.dragondreams.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://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Widget.html|widgets]] in different states. A button for example consists of the [[http://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1Button.html|button widget]] defining the structure and functionality of the button and the [[http://developer.dragondreams.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://developer.dragondreams.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://developer.dragondreams.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1LoadSave_1_1LoadGuiTheme.html|load gui theme]] class. [[http://developer.dragondreams.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.
dragengine/modules/dragonscript/guitheme.txt · Last modified: 2024/03/14 16:43 by dragonlord