Changeset 5165
- Timestamp:
- Aug 31, 2008, 10:28:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
data/Media/gui/scripts/loadGUI.lua
r5164 r5165 17 17 quit:subscribeEvent("Clicked","button_quit_clicked") 18 18 19 local start = winMgr:createWindow("TaharezLook/Button", "orxonox/StartButton") 20 start:setText("Start") 21 start: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.3, 0))) 23 start:subscribeEvent("Clicked","button_start_clicked") 19 local standalone = winMgr:createWindow("TaharezLook/Button", "orxonox/StandaloneButton") 20 standalone:setText("Standalone") 21 standalone:setSize(CEGUI.UVector2(CEGUI.UDim(0.15, 0), CEGUI.UDim(0.05, 0))) 22 standalone:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.3, 0))) 23 standalone:subscribeEvent("Clicked","button_standalone_clicked") 24 25 local server = winMgr:createWindow("TaharezLook/Button", "orxonox/ServerButton") 26 server:setText("Server") 27 server: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))) 29 server:subscribeEvent("Clicked","button_server_clicked") 30 31 local client = winMgr:createWindow("TaharezLook/Button", "orxonox/ClientButton") 32 client:setText("Client") 33 client: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))) 35 client:subscribeEvent("Clicked","button_client_clicked") 24 36 25 37 local backgroundImage = CEGUI.ImagesetManager:getSingleton():createImagesetFromImageFile("GUI/Background", "sample_loading.jpg") … … 29 41 30 42 rootSheet:addChildWindow(quit) 31 rootSheet:addChildWindow(start) 43 rootSheet:addChildWindow(standalone) 44 rootSheet:addChildWindow(server) 45 rootSheet:addChildWindow(client) 32 46 background:addChildWindow(rootSheet) 33 47 … … 38 52 end 39 53 40 function button_sta rt_clicked(e)54 function button_standalone_clicked(e) 41 55 orxonox.CommandExecutor:execute("selectGameState standalone") 42 56 hideGUI() 43 --orxonox.CommandExecutor:execute("openConsole") 57 end 58 59 function button_server_clicked(e) 60 orxonox.CommandExecutor:execute("selectGameState server") 61 hideGUI() 62 end 63 64 function button_client_clicked(e) 65 orxonox.CommandExecutor:execute("selectGameState client") 66 hideGUI() 44 67 end 45 68
Note: See TracChangeset
for help on using the changeset viewer.