Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 24, 2008, 2:44:14 AM (16 years ago)
Author:
landauf
Message:
  • put hudtemplates into a separate file
  • added dedicated button to loadGUI
  • changed some parameters in some material files
File:
1 edited

Legend:

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

    r5165 r5236  
    1414quit:setText("Quit")
    1515quit:setSize(CEGUI.UVector2(CEGUI.UDim(0.15, 0), CEGUI.UDim(0.05, 0)))
    16 quit:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.6, 0)))
     16quit:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.7, 0)))
    1717quit:subscribeEvent("Clicked","button_quit_clicked")
    1818
     
    2323standalone:subscribeEvent("Clicked","button_standalone_clicked")
    2424
     25local dedicated = winMgr:createWindow("TaharezLook/Button", "orxonox/DedicatedButton")
     26dedicated:setText("Dedicated")
     27dedicated:setSize(CEGUI.UVector2(CEGUI.UDim(0.15, 0), CEGUI.UDim(0.05, 0)))
     28dedicated:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.4, 0)))
     29dedicated:subscribeEvent("Clicked","button_dedicated_clicked")
     30
    2531local server = winMgr:createWindow("TaharezLook/Button", "orxonox/ServerButton")
    2632server:setText("Server")
    2733server:setSize(CEGUI.UVector2(CEGUI.UDim(0.15, 0), CEGUI.UDim(0.05, 0)))
    28 server:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.4, 0)))
     34server:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.5, 0)))
    2935server:subscribeEvent("Clicked","button_server_clicked")
    3036
     
    3238client:setText("Client")
    3339client:setSize(CEGUI.UVector2(CEGUI.UDim(0.15, 0), CEGUI.UDim(0.05, 0)))
    34 client:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.5, 0)))
     40client:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.6, 0)))
    3541client:subscribeEvent("Clicked","button_client_clicked")
    3642
     
    4349rootSheet:addChildWindow(standalone)
    4450rootSheet:addChildWindow(server)
     51rootSheet:addChildWindow(dedicated)
    4552rootSheet:addChildWindow(client)
    4653background:addChildWindow(rootSheet)
     
    5966function button_server_clicked(e)
    6067  orxonox.CommandExecutor:execute("selectGameState server")
     68  hideGUI()
     69end
     70
     71function button_dedicated_clicked(e)
     72  orxonox.CommandExecutor:execute("selectGameState dedicated")
    6173  hideGUI()
    6274end
Note: See TracChangeset for help on using the changeset viewer.