Changeset 6750 for code/trunk/data
- Timestamp:
- Apr 17, 2010, 1:26:59 PM (15 years ago)
- Location:
- code/trunk/data/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/data/gui/scripts/PickupInventory.lua
r6747 r6750 30 30 31 31 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") 33 33 P.wrapper:setSize(CEGUI.UVector2(CEGUI.UDim(1,0),CEGUI.UDim(1,0))) 34 34 root:addChildWindow(P.wrapper) … … 83 83 local offset = 0 84 84 85 local box = winMgr:createWindow(" TaharezLook/ScrollablePane", name .. "/Box")85 local box = winMgr:createWindow("MenuWidgets/ScrollablePane", name .. "/Box") 86 86 box:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horizontalOffset), CEGUI.UDim(0, 0))) 87 87 box:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -horizontalOffset), CEGUI.UDim(1, 0))) 88 88 89 89 offset = offset+textHeight 90 local title = winMgr:createWindow(" TaharezLook/StaticText", name .. "/Title")90 local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Title") 91 91 title:setText(carrier:getCarrierName()) 92 92 title:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(0, offset))) … … 98 98 local pickup = orxonox.PickupManager:getInstance():getPickupRepresentation(i, carrier) 99 99 100 local item = winMgr:createWindow(" TaharezLook/StaticText", name .. "/Box/Pickup" .. i)100 local item = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Box/Pickup" .. i) 101 101 item:setSize(CEGUI.UVector2(CEGUI.UDim(1, -horizontalOffset), CEGUI.UDim(0, imageHeight))) 102 102 item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horizontalOffset), CEGUI.UDim(0, offset))) … … 104 104 offset = offset + imageHeight+5 105 105 106 local image = winMgr:createWindow(" TaharezLook/StaticImage", name .. "/Box/Pickup" .. i .. "/Image")106 local image = winMgr:createWindow("MenuWidgets/StaticImage", name .. "/Box/Pickup" .. i .. "/Image") 107 107 image:setProperty("Image", "set:PickupInventory image:" .. pickup:getInventoryRepresentation()) 108 108 image:setProperty("BackgroundEnabled", "set:False") … … 111 111 item:addChildWindow(image) 112 112 113 local title = winMgr:createWindow(" TaharezLook/StaticText", name .. "/Box/Pickup" .. i .. "/Title")113 local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Box/Pickup" .. i .. "/Title") 114 114 title:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageHeight+5), CEGUI.UDim(0, (imageHeight-textHeight)/2))) 115 115 title:setSize(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(0, textHeight))) … … 118 118 item:addChildWindow(title) 119 119 120 local useButton = winMgr:createWindow(" TaharezLook/Button", name .. "/Box/Pickup" .. i .. "/UseButton")120 local useButton = winMgr:createWindow("MenuWidgets/Button", name .. "/Box/Pickup" .. i .. "/UseButton") 121 121 useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, imageHeight+10),CEGUI.UDim(0, (imageHeight-textHeight)/2))) 122 122 useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight))) … … 125 125 item:addChildWindow(useButton) 126 126 127 local dropButton = winMgr:createWindow(" TaharezLook/Button", name .. "/Box/Pickup" .. i .. "/DropButton")127 local dropButton = winMgr:createWindow("MenuWidgets/Button", name .. "/Box/Pickup" .. i .. "/DropButton") 128 128 dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, imageHeight+15+buttonWidth),CEGUI.UDim(0, (imageHeight-textHeight)/2))) 129 129 dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight))) … … 132 132 item:addChildWindow(dropButton) 133 133 134 local detailsButton = winMgr:createWindow(" TaharezLook/Button", name .. "/Box/Pickup" .. i .. "/DetailsButton")134 local detailsButton = winMgr:createWindow("MenuWidgets/Button", name .. "/Box/Pickup" .. i .. "/DetailsButton") 135 135 detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.4, imageHeight+20+2*buttonWidth),CEGUI.UDim(0, (imageHeight-textHeight)/2))) 136 136 detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight))) … … 184 184 local name = "orxonox/PickupInventory/Carrier" .. carrierIndex .. "/Pickup" .. pickupIndex .. "/Details" .. P.getNewDetailNumber() 185 185 186 local window = winMgr:createWindow(" TaharezLook/FrameWindow", name)186 local window = winMgr:createWindow("MenuWidgets/FrameWindow", name) 187 187 window:setSize(CEGUI.UVector2(CEGUI.UDim(0.5,0),CEGUI.UDim(0.4,0))) 188 188 orxonox.GUIManager:subscribeEventHelper(window, "CloseClicked", P.name .. ".closeDetailWindow") … … 196 196 window:addChildWindow(wrapper) 197 197 198 local title = winMgr:createWindow(" TaharezLook/StaticText", name .. "/Title")198 local title = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Title") 199 199 title:setText(pickup:getPickupName()) 200 200 title:setHeight(CEGUI.UDim(0, titleHeight)) … … 203 203 wrapper:addChildWindow(title) 204 204 205 local image = winMgr:createWindow(" TaharezLook/StaticImage", name .. "/Image")205 local image = winMgr:createWindow("MenuWidgets/StaticImage", name .. "/Image") 206 206 image:setProperty("Image", "set:PickupInventory image:" .. pickup:getInventoryRepresentation()) 207 207 image:setProperty("BackgroundEnabled", "set:False") … … 211 211 wrapper:addChildWindow(image) 212 212 213 local box = winMgr:createWindow(" TaharezLook/ScrollablePane", name .. "/Description")213 local box = winMgr:createWindow("MenuWidgets/ScrollablePane", name .. "/Description") 214 214 box:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -1*(imageSize + 10)),CEGUI.UDim(1, -(titleHeight + 5 + titleHeight + 20)))) 215 215 box:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageSize + 10),CEGUI.UDim(0, titleHeight + 5))) … … 221 221 wrapper:addChildWindow(box) 222 222 223 local useButton = winMgr:createWindow(" TaharezLook/Button", name .. "/UseButton")223 local useButton = winMgr:createWindow("MenuWidgets/Button", name .. "/UseButton") 224 224 useButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageSize+10),CEGUI.UDim(1, -40))) 225 225 useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, titleHeight))) … … 228 228 wrapper:addChildWindow(useButton) 229 229 230 local dropButton = winMgr:createWindow(" TaharezLook/Button", name .. "/DropButton")230 local dropButton = winMgr:createWindow("MenuWidgets/Button", name .. "/DropButton") 231 231 dropButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0, imageSize+10+buttonWidth+10),CEGUI.UDim(1, -40))) 232 232 dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, titleHeight))) … … 279 279 280 280 function P.InventoryBackButton_clicked(e) 281 hideGUI("PickupInventory")281 orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility PickupInventory") 282 282 end 283 283 -
code/trunk/data/gui/scripts/SingleplayerMenu.lua
r6746 r6750 30 30 31 31 function P.SingleplayerStartButton_clicked(e) 32 choice = winMgr:getWindow("orxonox/SingleplayerLevelListbox"):getFirstSelectedItem()32 local choice = winMgr:getWindow("orxonox/SingleplayerLevelListbox"):getFirstSelectedItem() 33 33 if choice then 34 34 orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
Note: See TracChangeset
for help on using the changeset viewer.