Widget Candy. .SetTheme Color()

Widget Candy
Send Snippet To: Save this snippet to Code Collector Pro -- view all roger's snippets
language: Other
license: Other

Code for Snippet:

                
 
 
 
Applies a tint color to a theme. Every widget you create, as well as all existing widgets using this theme will be tinted automatically with the specified color.
 
Note: specifying an individual color to a widget by using the widget's color property will override the theme's tint color.
 
-- REQUIRE THE LIBRARY
_G.GUI = require("widget_candy")
 
-- LOAD A THEME
_G.GUI.LoadTheme("theme_1", "themes/theme_1/")
 
-- APPLY A TINT COLOR TO ALL WIDGETS USING THIS THEME:
_G.GUI.SetThemeColor("theme_1", { .78,1,1 } )
 
.SetThemeColor (themeName, colorArray, excludeInputTexts)
 
themeName	(String) Unique name of a loaded theme.
 
colorArray	(Array) Array with three values (red, green, blue) each one within a range from 0 to 1. Example: {1,1,.25}
 
excludeInputTexts	(Boolean) If set to true, input text fields won't be colorized (looks more natural).
 
 
comments powered by Disqus

Info

Link to this snippet:


Download to Code Collector

To use the direct link to your snippet on CodeCollector.net either copy the html from the above section or drag the Download to Code Collector to where you would like to use it.

More Info:

Times Viewed: 5
Date Added: 2018-01-10 14:27:18
Last Modified: 2018-01-10 09:54:13

Web Analytics