[Orxonox-commit 2891] r7594 - code/branches/menu/data/gui/scripts

dafrick at orxonox.net dafrick at orxonox.net
Wed Oct 27 22:39:48 CEST 2010


Author: dafrick
Date: 2010-10-27 22:39:48 +0200 (Wed, 27 Oct 2010)
New Revision: 7594

Modified:
   code/branches/menu/data/gui/scripts/MainMenu.lua
Log:
Small adjustment to MainMenu.lua to illustrate how to change how a button looks like.


Modified: code/branches/menu/data/gui/scripts/MainMenu.lua
===================================================================
--- code/branches/menu/data/gui/scripts/MainMenu.lua	2010-10-27 20:13:54 UTC (rev 7593)
+++ code/branches/menu/data/gui/scripts/MainMenu.lua	2010-10-27 20:39:48 UTC (rev 7594)
@@ -41,6 +41,9 @@
             P.index = 1
         end
         local child = window:getChildAtIdx(P.index-1)
+        child:setProperty("NormalImageRightEdge", string.sub(child:getProperty("NormalImageRightEdge"),1,-7) .. "Highlight")
+        child:setProperty("NormalImageLeftEdge", string.sub(child:getProperty("NormalImageLeftEdge"),1,-7) .. "Highlight")
+        child:setProperty("NormalImageBackground", string.sub(child:getProperty("NormalImageBackground"),1,-7) .. "Highlight")
     elseif tostring(we.scancode) == "28" and P.index ~= 0 then
         if P.index == 1 then
             P.QuickGameTestButton_clicked()




More information about the Orxonox-commit mailing list