Changeset 7608 for code/branches/menu/data/gui
- Timestamp:
- Nov 2, 2010, 11:41:52 PM (14 years ago)
- Location:
- code/branches/menu/data/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/menu/data/gui/layouts/MainMenu.layout
r7607 r7608 8 8 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1.0,0},{1.0,0}}" /> 9 9 <Property Name="BackgroundEnabled" Value="False" /> 10 <Event Name="KeyDown" Function="MainMenu.Key_clicked"/>11 10 <Window Type="MenuWidgets/Button" Name="orxonox/QuickGameTestButton" > 12 11 <Property Name="Text" Value="Quickstart" /> -
code/branches/menu/data/gui/scripts/MainMenu.lua
r7607 r7608 66 66 end 67 67 68 --[[function P.Key_clicked(e)69 local we = tolua.cast(e, "CEGUI::KeyEventArgs")70 cout(0, tostring(we.scancode))71 if tostring(we.scancode) == "15" then72 P.index = P.index + 173 local window = winMgr:getWindow("orxonox/MainMenuBackground")74 if P.index == window:getChildCount() then75 P.index = 176 end77 local child = window:getChildAtIdx(P.index-1)78 child:setProperty("NormalImageRightEdge", string.sub(child:getProperty("NormalImageRightEdge"),1,-7) .. "Highlight")79 child:setProperty("NormalImageLeftEdge", string.sub(child:getProperty("NormalImageLeftEdge"),1,-7) .. "Highlight")80 child:setProperty("NormalImageBackground", string.sub(child:getProperty("NormalImageBackground"),1,-7) .. "Highlight")81 elseif tostring(we.scancode) == "28" and P.index ~= 0 then82 if P.index == 1 then83 P.QuickGameTestButton_clicked()84 elseif P.index == 2 then85 P.SingleplayerButton_clicked()86 elseif P.index == 3 then87 P.MultiplayerButton_clicked()88 elseif P.index == 4 then89 P.SettingsButton_clicked()90 elseif P.index == 5 then91 P.CreditsButton_clicked()92 elseif P.index == 6 then93 P.ExitButton_clicked()94 end95 end96 end]]--97 98 68 return P
Note: See TracChangeset
for help on using the changeset viewer.