Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5164


Ignore:
Timestamp:
Aug 27, 2008, 10:34:55 PM (16 years ago)
Author:
rgrieder
Message:

some adjustments to the c++ code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/Media/gui/scripts/loadGUI.lua

    r5163 r5164  
    2020start:setText("Start")
    2121start:setSize(CEGUI.UVector2(CEGUI.UDim(0.15, 0), CEGUI.UDim(0.05, 0)))
    22 start:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.4, 0)))
     22start:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.3, 0)))
    2323start:subscribeEvent("Clicked","button_start_clicked")
    2424
     
    2626local background = winMgr:createWindow("TaharezLook/StaticImage", "orxonox/Background")
    2727background:setProperty("Image", "set: GUI/Background image:full_image")
     28background:subscribeEvent("CharacterKey", "key_pressed")
    2829
    2930rootSheet:addChildWindow(quit)
     
    3839
    3940function button_start_clicked(e)
    40   orxonox.CommandExecutor:execute("loadGame standalone")
     41  orxonox.CommandExecutor:execute("selectGameState standalone")
    4142  hideGUI()
    4243  --orxonox.CommandExecutor:execute("openConsole")
     44end
     45
     46function key_pressed(e)
     47  keyevent = tolua.cast(e, "CEGUI::KeyEventArgs")
     48  if keyevent.codepoint == 167 then
     49    orxonox.CommandExecutor:execute("openConsole")
     50  end
    4351end
    4452
     
    5664function hideGUI()
    5765  system:setGUISheet(nil)
    58   orxonox.GUIManager:getInstance():_hideGUI()
     66  orxonox.GUIManager:getInstance():hideGUI()
    5967end
Note: See TracChangeset for help on using the changeset viewer.