Difference between revisions of "LGUI2:Styles"

From Lavish Software Wiki
Jump to navigation Jump to search
 
Line 26: Line 26:
 
  }
 
  }
  
 +
{{LGUI2:Topic}}
 
[[Category:LavishGUI 2]]
 
[[Category:LavishGUI 2]]

Latest revision as of 04:33, 15 July 2018

A Style is essentially a Template that is associated with an element, which can be dynamically applied to alter the element. For example, the base Element supports a Style called "gotMouseOver" which will apply when the mouse cursor is moved within the bounds of the element.

Defining a Style

See Template

Examples

"styles": {
  "gotMouseOver": {
    "backgroundBrush": {
      "color": [ 0.0, 0.0, 0.3 ]
    },
    "font": {
      "bold": true
    },
    "color": [ 1.0,1.0,0]
  },
  "lostMouseOver": {
    "backgroundBrush": {
      "color": [ 0.0, 0.0, 0.0, 0.0 ]
    },
    "font": {
      "bold": false
    },
    "color": [ 1.0,1.0,1.0]
  }
}

LavishGUI 2 Topics