Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7608


Ignore:
Timestamp:
Nov 2, 2010, 11:41:52 PM (14 years ago)
Author:
dafrick
Message:

Some adjustments.

Location:
code/branches/menu/data/gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/menu/data/gui/layouts/MainMenu.layout

    r7607 r7608  
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1.0,0},{1.0,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Event Name="KeyDown" Function="MainMenu.Key_clicked"/>
    1110        <Window Type="MenuWidgets/Button" Name="orxonox/QuickGameTestButton" >
    1211            <Property Name="Text" Value="Quickstart" />
  • code/branches/menu/data/gui/scripts/MainMenu.lua

    r7607 r7608  
    6666end
    6767
    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" then
    72         P.index = P.index + 1
    73         local window = winMgr:getWindow("orxonox/MainMenuBackground")
    74         if P.index == window:getChildCount() then
    75             P.index = 1
    76         end
    77         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 then
    82         if P.index == 1 then
    83             P.QuickGameTestButton_clicked()
    84         elseif P.index == 2 then
    85             P.SingleplayerButton_clicked()
    86         elseif P.index == 3 then
    87             P.MultiplayerButton_clicked()
    88         elseif P.index == 4 then
    89             P.SettingsButton_clicked()
    90         elseif P.index == 5 then
    91             P.CreditsButton_clicked()
    92         elseif P.index == 6 then
    93             P.ExitButton_clicked()
    94         end
    95     end
    96 end]]--
    97 
    9868return P
Note: See TracChangeset for help on using the changeset viewer.