SetTextColor

(Difference between revisions)
Jump to: navigation, search
(Created page with "Change the text color. setTextColor({r, g, b, a}) : r = Red / g = Green / b = Blue / a = Alpha Example, change text color to red and semi-transparent : Text0 = getObje...")
 
Line 13: Line 13:
 
         if isKeyPressed("SPACE") then setTextColor(Text0, {1, 0, 0, 0.50}) end
 
         if isKeyPressed("SPACE") then setTextColor(Text0, {1, 0, 0, 0.50}) end
 
     end
 
     end
 +
 +
[[Category:Lua scripting]]

Revision as of 19:13, 4 February 2014

Change the text color.

setTextColor({r, g, b, a}) : r = Red / g = Green / b = Blue / a = Alpha

Example, change text color to red and semi-transparent :

   Text0 = getObject("Text0")
   function onSceneUpdate()
       if isKeyPressed("SPACE") then setTextColor(Text0, {1, 0, 0, 0.50}) end
   end
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox