LGUI2:Styles

From Lavish Software Wiki
Jump to: navigation, search

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