User Tools

Site Tools


dragengine:modules:dragonscript:xmlguitheme:canvascreator

Differences

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

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
dragengine:modules:dragonscript:xmlguitheme:canvascreator [2018/02/28 14:25] – created dragonlorddragengine:modules:dragonscript:xmlguitheme:canvascreator [2018/02/28 16:09] – [Image] dragonlord
Line 9: Line 9:
 Canvas creators are always based directly or indirectly on a type. This type is the //Canvas Creator Prototype// and defines what instance of //CanvasCreator// is used in the scripts. The choice of prototype affects the appearance of the canvas creator and the configuration possibilities. Canvas creators are always based directly or indirectly on a type. This type is the //Canvas Creator Prototype// and defines what instance of //CanvasCreator// is used in the scripts. The choice of prototype affects the appearance of the canvas creator and the configuration possibilities.
  
-The following prototypes are provided by default by the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1CanvasCreators_1_1CanvasCreators.html|CanvasCreators]] script class:+The following prototypes are provided by default by the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1CanvasCreators.html|CanvasCreators]] script class:
 ^ Name ^ Script Class ^ Description ^ ^ Name ^ Script Class ^ Description ^
-| Default | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1CanvasCreators_1_1DefaultCanvasCreator.html|DefaultCanvasCreator]] | Empty canvas creator | +| [[#default|Default]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1DefaultCanvasCreator.html|DefaultCanvasCreator]] | Empty canvas creator | 
-| Rectangle | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1CanvasCreators_1_1RectangleCanvasCreator.html|RectangleCanvasCreator]] | Filled or empty rectangle | +| [[#rectangle|Rectangle]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1RectangleCanvasCreator.html|RectangleCanvasCreator]] | Filled or empty rectangle | 
-| Bevel | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1CanvasCreators_1_1BevelCanvasCreator.html|BevelCanvasCreator]] | Filled or empty two-color bevelled border | +| [[#bevel|Bevel]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1BevelCanvasCreator.html|BevelCanvasCreator]] | Filled or empty two-color bevelled border | 
-| Image | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1CanvasCreators_1_1ImageCanvasCreator.html|ImageCanvasCreator]] | Image stretched across entire canvas | +| [[#image|Image]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1ImageCanvasCreator.html|ImageCanvasCreator]] | Image stretched across entire canvas | 
-| ImageBorder | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1CanvasCreators_1_1ImageBorderCanvasCreator.html|ImageBorderCanvasCreator]] | Up to 9 images creating size adapting border |+| [[#imageborder|ImageBorder]] | [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1ImageBorderCanvasCreator.html|ImageBorderCanvasCreator]] | Up to 9 images creating size adapting border |
  
-You can use custom prototypes by adding them to [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1CanvasCreators_1_1CanvasCreators.html|CanvasCreators]] instance before loading gui themes. This is useful if you created custom canvas creator 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_1CanvasCreators_1_1CanvasCreators.html|CanvasCreators]] instance before loading gui themes. This is useful if you created custom canvas creator subclasses requiring custom parameters.
  
 This example defines a canvas creator based on the //Image// prototype displaying //canvasImage.png// stretched across entire canvas size. This example defines a canvas creator based on the //Image// prototype displaying //canvasImage.png// stretched across entire canvas size.
 <code xml> <code xml>
 <canvasCreator parameter='ParameterName' type='Image'> <canvasCreator parameter='ParameterName' type='Image'>
-   <image paramete='image'>canvasImage.png</image>+   <image parameter='image'>canvasImage.png</image>
 </canvasCreator> </canvasCreator>
 </code> </code>
  
-If you modify an existing canvas creator the type of the original canvas creator is taken over. These examples creates a canvas creator by loading it from a file and then replaces the image used.+If you modify an existing canvas creator the type of the original canvas creator is taken over. This example creates a canvas creator by loading it from a file and then replaces the image used.
 <code xml> <code xml>
 <canvasCreator parameter='ParameterName' extend='imageCreator.ccreator.xml'> <canvasCreator parameter='ParameterName' extend='imageCreator.ccreator.xml'>
-   <image paramete='image'>anotherCanvasImage.png</image>+   <image parameter='image'>anotherCanvasImage.png</image>
 </canvasCreator> </canvasCreator>
 </code> </code>
Line 39: Line 39:
  
 ===== Default ===== ===== Default =====
-The most basic canvas creator creating no canvas creator at all (empty canvas creator). Creates an instance of the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1CanvasCreators_1_1DefaultCanvasCreator.html|DefaultCanvasCreator]] script class. This is useful to set an empty canvas creator. As such it has no parameters at all.+The most basic canvas creator creating no canvas creator at all (empty canvas creator). Creates an instance of the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1DefaultCanvasCreator.html|DefaultCanvasCreator]] script class. This is useful to set an empty canvas creator. As such it has no parameters at all.
  
  
 ===== Rectangle ===== ===== Rectangle =====
-Creates a canvas creator drawing a rectangle with optional fill color. Creates an instance of the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1CanvasCreators_1_1RectangleCanvasCreator.html|RectangleCanvasCreator]] script class. Both the rectangle and fill color are optional.+Creates a canvas creator drawing a rectangle with optional fill color. Creates an instance of the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1RectangleCanvasCreator.html|RectangleCanvasCreator]] script class. Both the rectangle and fill color are optional.
  
 These parameters can be used: These parameters can be used:
Line 49: Line 49:
 | colorFill | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color|Color]] | Color to use to fill the rectangle. Set to null or use a color with alpha value of 0 to not fill the rectangle | | colorFill | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color|Color]] | Color to use to fill the rectangle. Set to null or use a color with alpha value of 0 to not fill the rectangle |
 | colorLine | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color|Color]] | Color to use to outline the rectangle. Set to null or use a color with alpha value of 0 to not outline the rectangle | | colorLine | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color|Color]] | Color to use to outline the rectangle. Set to null or use a color with alpha value of 0 to not outline the rectangle |
-| thickness | [[dragengine:modules:dragonscript:xmlguitheme:parameters#float|float]] | Thickness in pixels of the rectangle outline. Default is 1px width. |+| thickness | [[dragengine:modules:dragonscript:xmlguitheme:parameters#floating_point|Floating Point]] | Thickness in pixels of the rectangle outline. Default is 1px width. |
  
  
 ===== Bevel ===== ===== Bevel =====
-Creates a canvas creator drawing a bevelled rectangle with optional fill color. Creates an instance of the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1CanvasCreators_1_1BevelCanvasCreator.html|BevelCanvasCreator]] script class. Both the rectangle and fill colors are optional.+Creates a canvas creator drawing a bevelled rectangle with optional fill color. Creates an instance of the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1BevelCanvasCreator.html|BevelCanvasCreator]] script class. Both the rectangle and fill colors are optional.
  
 These parameters can be used: These parameters can be used:
Line 60: Line 60:
 | colorShadow | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color|Color]] | Color to use for the shadow part of the rectangle outline | | colorShadow | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color|Color]] | Color to use for the shadow part of the rectangle outline |
 | colorBackground | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color|Color]] | Color to use to fill the rectangle. Set to null or use a color with alpha value of 0 to not fill the rectangle | | colorBackground | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color|Color]] | Color to use to fill the rectangle. Set to null or use a color with alpha value of 0 to not fill the rectangle |
-| colorMatrix | [[dragengine:modules:dragonscript:xmlguitheme:parameters#colormatrix|ColorMatrix]] | Color matrix to use for the entire canvas. |+| colorMatrix | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color_matrix|ColorMatrix]] | Color matrix to use for the entire canvas. |
  
  
 ===== Image ===== ===== Image =====
-Creates a canvas creator stretching an image across the entire canvas size. Creates an instance of the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/interfaceDragengine_1_1Gui_1_1CanvasCreators_1_1ImageCanvasCreator.html|ImageCanvasCreator]] script class. The image is optional. If not set this is the same as the default canvas creator.+Creates a canvas creator stretching an image across the entire canvas size. Creates an instance of the [[https://dragengine.rptd.ch/docs/dragonscript/scriptapi/latest/classDragengine_1_1Gui_1_1CanvasCreators_1_1ImageCanvasCreator.html|ImageCanvasCreator]] script class. The image is optional. If not set this is the same as the default canvas creator.
  
 These parameters can be used: These parameters can be used:
 ^ Parameter Name ^ Supported parameter type ^ Description ^ ^ Parameter Name ^ Supported parameter type ^ Description ^
 | image | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to stretch across the entire canvas size | | image | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to stretch across the entire canvas size |
-| colorMatrix | [[dragengine:modules:dragonscript:xmlguitheme:parameters#colormatrix|ColorMatrix]] | Color matrix to use for the canvas. |+| colorMatrix | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color_matrix|ColorMatrix]] | Color matrix to use for the canvas. |
  
  
Line 86: Line 86:
 | cornerBottomLeft | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use as bottom-left corner of the border. Placed at original size in corner | | cornerBottomLeft | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use as bottom-left corner of the border. Placed at original size in corner |
 | cornerBottomRight | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use as bottom-right corner of the border. Placed at original size in corner | | cornerBottomRight | [[dragengine:modules:dragonscript:xmlguitheme:parameters#image|Image]] | Image to use as bottom-right corner of the border. Placed at original size in corner |
-| colorMatrix | [[dragengine:modules:dragonscript:xmlguitheme:parameters#colormatrix|ColorMatrix]] | Color matrix to use for the canvas. |+| colorMatrix | [[dragengine:modules:dragonscript:xmlguitheme:parameters#color_matrix|ColorMatrix]] | Color matrix to use for the canvas. |
  
dragengine/modules/dragonscript/xmlguitheme/canvascreator.txt · Last modified: 2024/03/14 16:36 by dragonlord