Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5387


Ignore:
Timestamp:
Jan 6, 2009, 10:39:28 AM (16 years ago)
Author:
rgrieder
Message:

Suprise… Contact me if you don't like it.

Location:
data/media
Files:
1 added
1 edited

Legend:

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

    r5261 r5387  
    1111local rootSheet = winMgr:createWindow("DefaultGUISheet", "orxonox/Sheet")
    1212
    13 local quit = winMgr:createWindow("TaharezLook/Button", "orxonox/QuitButton")
    14 quit:setText("Quit")
    15 quit: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.7, 0)))
    17 quit:subscribeEvent("Clicked","button_quit_clicked")
     13local leftOffset = 0.11
     14local topOffset  = 0.3
     15local distance   = 0.076
     16local index      = 0
    1817
    1918local standalone = winMgr:createWindow("TaharezLook/Button", "orxonox/StandaloneButton")
    2019standalone:setText("Standalone")
    2120standalone: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)))
     21standalone:setPosition(CEGUI.UVector2(CEGUI.UDim(leftOffset, 0), CEGUI.UDim(topOffset + index * distance, 0)))
    2322standalone:subscribeEvent("Clicked","button_standalone_clicked")
     23index = index + 1
    2424
    2525local dedicated = winMgr:createWindow("TaharezLook/Button", "orxonox/DedicatedButton")
    2626dedicated:setText("Dedicated")
    2727dedicated:setSize(CEGUI.UVector2(CEGUI.UDim(0.15, 0), CEGUI.UDim(0.05, 0)))
    28 dedicated:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.4, 0)))
     28dedicated:setPosition(CEGUI.UVector2(CEGUI.UDim(leftOffset, 0), CEGUI.UDim(topOffset + index * distance, 0)))
    2929dedicated:subscribeEvent("Clicked","button_dedicated_clicked")
     30index = index + 1
    3031
    3132local server = winMgr:createWindow("TaharezLook/Button", "orxonox/ServerButton")
    3233server:setText("Server")
    3334server:setSize(CEGUI.UVector2(CEGUI.UDim(0.15, 0), CEGUI.UDim(0.05, 0)))
    34 server:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.5, 0)))
     35server:setPosition(CEGUI.UVector2(CEGUI.UDim(leftOffset, 0), CEGUI.UDim(topOffset + index * distance, 0)))
    3536server:subscribeEvent("Clicked","button_server_clicked")
     37index = index + 1
    3638
    3739local client = winMgr:createWindow("TaharezLook/Button", "orxonox/ClientButton")
    3840client:setText("Client")
    3941client:setSize(CEGUI.UVector2(CEGUI.UDim(0.15, 0), CEGUI.UDim(0.05, 0)))
    40 client:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0.6, 0)))
     42client:setPosition(CEGUI.UVector2(CEGUI.UDim(leftOffset, 0), CEGUI.UDim(topOffset + index * distance, 0)))
    4143client:subscribeEvent("Clicked","button_client_clicked")
     44index = index + 1
    4245
    43 local backgroundImage = CEGUI.ImagesetManager:getSingleton():createImagesetFromImageFile("GUI/Background", "sample_loading.jpg")
     46local quit = winMgr:createWindow("TaharezLook/Button", "orxonox/QuitButton")
     47quit:setText("Quit")
     48quit:setSize(CEGUI.UVector2(CEGUI.UDim(0.15, 0), CEGUI.UDim(0.05, 0)))
     49quit:setPosition(CEGUI.UVector2(CEGUI.UDim(leftOffset, 0), CEGUI.UDim(topOffset + index * distance, 0)))
     50quit:subscribeEvent("Clicked","button_quit_clicked")
     51index = index + 1
     52
     53local backgroundImage = CEGUI.ImagesetManager:getSingleton():createImagesetFromImageFile("GUI/Background", "main_menu_1.jpg")
    4454local background = winMgr:createWindow("TaharezLook/StaticImage", "orxonox/Background")
     55background:setProperty("FrameEnabled", "set: true")
     56background:setProperty("BackgroundEnabled", "set: false")
    4557background:setProperty("Image", "set: GUI/Background image:full_image")
    4658
Note: See TracChangeset for help on using the changeset viewer.