Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 17, 2010, 1:26:59 PM (15 years ago)
Author:
dafrick
Message:

PickupInventory working again, just had to change TaharezLook to MenuWidget.
Also: made changes variable in SingleplayerMenu local.

Location:
code/trunk/data/gui/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/data/gui/scripts/PickupInventory.lua

    r6747 r6750  
    3030   
    3131    local root = winMgr:getWindow("orxonox/PickupInventory/Inventory")
    32     P.wrapper = winMgr:createWindow("TaharezLook/ScrollablePane", "orxonox/PickupInventory/Inventory/Wrapper")
     32    P.wrapper = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/PickupInventory/Inventory/Wrapper")
    3333    P.wrapper:setSize(CEGUI.UVector2(CEGUI.UDim(1,0),CEGUI.UDim(1,0)))
    3434    root:addChildWindow(P.wrapper)
     
    8383    local offset = 0
    8484
    85     local box = winMgr:createWindow("TaharezLook/ScrollablePane", name .. "/Box")
     85    local box = winMgr:createWindow("MenuWidgets/ScrollablePane", name .. "/Box")
    8686    box:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horizontalOffset), CEGUI.UDim(0, 0)))
    8787    box:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -horizontalOffset), CEGUI.UDim(1, 0)))
    8888   
    8989    offset = offset+textHeight
    90     local title = winMgr:createWindow("TaharezLook/StaticText", name .. "/Title")
     90    local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Title")
    9191    title:setText(carrier:getCarrierName())
    9292    title:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(0, offset)))
     
    9898        local pickup = orxonox.PickupManager:getInstance():getPickupRepresentation(i, carrier)
    9999       
    100         local item = winMgr:createWindow("TaharezLook/StaticText", name .. "/Box/Pickup" .. i)
     100        local item = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Box/Pickup" .. i)
    101101        item:setSize(CEGUI.UVector2(CEGUI.UDim(1, -horizontalOffset), CEGUI.UDim(0, imageHeight)))
    102102        item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horizontalOffset), CEGUI.UDim(0, offset)))
     
    104104        offset = offset + imageHeight+5
    105105       
    106         local image = winMgr:createWindow("TaharezLook/StaticImage", name .. "/Box/Pickup" .. i .. "/Image")
     106        local image = winMgr:createWindow("MenuWidgets/StaticImage", name .. "/Box/Pickup" .. i .. "/Image")
    107107        image:setProperty("Image", "set:PickupInventory image:" .. pickup:getInventoryRepresentation())
    108108        image:setProperty("BackgroundEnabled", "set:False")
     
    111111        item:addChildWindow(image)
    112112       
    113         local title = winMgr:createWindow("TaharezLook/StaticText", name .. "/Box/Pickup" .. i .. "/Title")
     113        local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Box/Pickup" .. i .. "/Title")
    114114        title:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageHeight+5), CEGUI.UDim(0, (imageHeight-textHeight)/2)))
    115115        title:setSize(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0, textHeight)))
     
    118118        item:addChildWindow(title)
    119119       
    120         local useButton = winMgr:createWindow("TaharezLook/Button", name .. "/Box/Pickup" .. i .. "/UseButton")
     120        local useButton = winMgr:createWindow("MenuWidgets/Button", name .. "/Box/Pickup" .. i .. "/UseButton")
    121121        useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, imageHeight+10),CEGUI.UDim(0, (imageHeight-textHeight)/2)))
    122122        useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight)))
     
    125125        item:addChildWindow(useButton)
    126126       
    127         local dropButton = winMgr:createWindow("TaharezLook/Button", name .. "/Box/Pickup" .. i .. "/DropButton")
     127        local dropButton = winMgr:createWindow("MenuWidgets/Button", name .. "/Box/Pickup" .. i .. "/DropButton")
    128128        dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, imageHeight+15+buttonWidth),CEGUI.UDim(0, (imageHeight-textHeight)/2)))
    129129        dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight)))
     
    132132        item:addChildWindow(dropButton)
    133133       
    134         local detailsButton = winMgr:createWindow("TaharezLook/Button", name .. "/Box/Pickup" .. i .. "/DetailsButton")
     134        local detailsButton = winMgr:createWindow("MenuWidgets/Button", name .. "/Box/Pickup" .. i .. "/DetailsButton")
    135135        detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, imageHeight+20+2*buttonWidth),CEGUI.UDim(0, (imageHeight-textHeight)/2)))
    136136        detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight)))
     
    184184    local name = "orxonox/PickupInventory/Carrier" .. carrierIndex .. "/Pickup" .. pickupIndex .. "/Details" .. P.getNewDetailNumber()
    185185   
    186     local window = winMgr:createWindow("TaharezLook/FrameWindow", name)
     186    local window = winMgr:createWindow("MenuWidgets/FrameWindow", name)
    187187    window:setSize(CEGUI.UVector2(CEGUI.UDim(0.5,0),CEGUI.UDim(0.4,0)))
    188188    orxonox.GUIManager:subscribeEventHelper(window, "CloseClicked", P.name .. ".closeDetailWindow")
     
    196196    window:addChildWindow(wrapper)
    197197   
    198     local title = winMgr:createWindow("TaharezLook/StaticText", name .. "/Title")
     198    local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Title")
    199199    title:setText(pickup:getPickupName())
    200200    title:setHeight(CEGUI.UDim(0, titleHeight))
     
    203203    wrapper:addChildWindow(title)
    204204   
    205     local image = winMgr:createWindow("TaharezLook/StaticImage", name .. "/Image")
     205    local image = winMgr:createWindow("MenuWidgets/StaticImage", name .. "/Image")
    206206    image:setProperty("Image", "set:PickupInventory image:" .. pickup:getInventoryRepresentation())
    207207    image:setProperty("BackgroundEnabled", "set:False")
     
    211211    wrapper:addChildWindow(image)
    212212   
    213     local box = winMgr:createWindow("TaharezLook/ScrollablePane", name .. "/Description")
     213    local box = winMgr:createWindow("MenuWidgets/ScrollablePane", name .. "/Description")
    214214    box:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -1*(imageSize + 10)),CEGUI.UDim(1, -(titleHeight + 5 + titleHeight + 20))))
    215215    box:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageSize + 10),CEGUI.UDim(0, titleHeight + 5)))
     
    221221    wrapper:addChildWindow(box)
    222222   
    223     local useButton = winMgr:createWindow("TaharezLook/Button", name .. "/UseButton")
     223    local useButton = winMgr:createWindow("MenuWidgets/Button", name .. "/UseButton")
    224224    useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageSize+10),CEGUI.UDim(1, -40)))
    225225    useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, titleHeight)))
     
    228228    wrapper:addChildWindow(useButton)
    229229   
    230     local dropButton = winMgr:createWindow("TaharezLook/Button", name .. "/DropButton")
     230    local dropButton = winMgr:createWindow("MenuWidgets/Button", name .. "/DropButton")
    231231    dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageSize+10+buttonWidth+10),CEGUI.UDim(1, -40)))
    232232    dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, titleHeight)))
     
    279279
    280280function P.InventoryBackButton_clicked(e)
    281     hideGUI("PickupInventory")
     281    orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility PickupInventory")
    282282end
    283283
  • code/trunk/data/gui/scripts/SingleplayerMenu.lua

    r6746 r6750  
    3030
    3131function P.SingleplayerStartButton_clicked(e)
    32     choice = winMgr:getWindow("orxonox/SingleplayerLevelListbox"):getFirstSelectedItem()
     32    local choice = winMgr:getWindow("orxonox/SingleplayerLevelListbox"):getFirstSelectedItem()
    3333    if choice then
    3434        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
Note: See TracChangeset for help on using the changeset viewer.