Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5566


Ignore:
Timestamp:
May 27, 2009, 9:42:15 PM (15 years ago)
Author:
rgrieder
Message:
  • Functionality for server, client and dedicated buttons (please note that in the code it's called startStandalone now but I left "startGame" for the lua script to avoid inconsistencies of the media repo)
  • Added missing tiled_floor.jpg for presentation_dm.oxw
Location:
data/media
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • data/media/gui/scripts/mainmenu_2.lua

    r5559 r5566  
    4040
    4141function P.button_server_clicked(e)
    42   orxonox.CommandExecutor:execute("echo Not yet supported!")
    43   hideGUI()
     42    choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem()
     43    if choice then
     44        orxonox.Game:getInstance():setLevel(choice:getText() .. ".oxw")
     45        orxonox.CommandExecutor:execute("startServer")
     46        toggleGUI()
     47    end
    4448end
    4549
    4650function P.button_dedicated_clicked(e)
    47   orxonox.CommandExecutor:execute("echo Not yet supported!")
    48   hideGUI()
     51    choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem()
     52    if choice then
     53        orxonox.Game:getInstance():setLevel(choice:getText() .. ".oxw")
     54        orxonox.CommandExecutor:execute("startDedicated")
     55        toggleGUI()
     56    end
    4957end
    5058
    5159function P.button_client_clicked(e)
    52   orxonox.CommandExecutor:execute("echo Not yet supported!")
    53   hideGUI()
     60    choice = winMgr:getWindow("orxonox/LevelListbox"):getFirstSelectedItem()
     61    if choice then
     62        orxonox.Game:getInstance():setLevel(choice:getText() .. ".oxw")
     63        orxonox.CommandExecutor:execute("startClient")
     64        toggleGUI()
     65    end
    5466end
    5567
Note: See TracChangeset for help on using the changeset viewer.