Version 3 (modified by epyon, 12 years ago) (diff) |
---|
UI definitions
UI elements can be both loaded from Lua definitions or created on the fly.
UI styles
Modeled after CSS but using pure lua.
Each UI element has:
- id value, might not be set
- type value, set by type database
- class value, might be set by user
- special modifier (selected, hover, etc)
-- some_name.style.lua ["default"] = { text_color = { 0.3, 0.3, 0.3, 1.0 }, background_color = { 0.0, 0.0, 0.0, 1.0 }, background_image = "source:path/name/file.png", background_stretch = } -- class definition [".redclass"] = { text_color = { 1.0, 0.3, 0.3, 1.0 }, } -- type definition ["button"] = { border_color = SILVER, -- constant colors } -- modifier definition, with class ["button:hover"] = { border_color = RED, -- constant colors } -- id definition (no need for additional because unique! ["#mybutton"] = { border_width = 3, }