LGUI2:Skins

From Lavish Software Wiki
Revision as of 04:33, 15 July 2018 by Lax (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

A Skin is a collection of Templates that are activated together.

A "default" Skin, located at Interface\DefaultSkin.json, is loaded automatically by Inner Space.

Defining a Skin

A Skin is defined by a JSON Object.

A "name" property is required, and specifies the name of the Skin. This can be used later to identify the Skin you want to activate.

A "templates" property may be provided, and must be a JSON Object. Each value within the "templates" Object is then added to the Skin as a template, identified (named) by the key. Any number of Templates may be given.

Examples

An example originally used for testing
{
  "name": "test skin",
  "templates": {
    "window.title": {
      "verticalAlignment": "center",
      "margin": [ 2, 0, 0, 0 ]
    },
    "window.titleBar": {
      "backgroundBrush": {
        "color": [ 0, 0, 1.0 ]
      }
    },
    "contextmenu": {
      "type": "contextmenu",
      "padding": [ 1, 1, 1, 1 ]
    },
    "contextmenuitem": {
      "type": "contextmenuitem",
      "padding": [ 2, 2, 2, 2 ],
      "margin": [ 1, 1, 1, 1 ],
      "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