Changeset 7162 for code/branches/presentation3/data/gui/scripts
- Timestamp:
- Aug 8, 2010, 8:53:52 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/data/gui/scripts/PickupInventory.lua
r7072 r7162 54 54 useButton:setText("unuse") 55 55 orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseDetailButton_clicked") 56 if pickup:isUsable() == false then 57 useButton:setEnabled(false) 58 end 56 59 else 57 60 useButton:setText("use") 58 61 orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseDetailButton_clicked") 62 if pickup:isUnusable() == false then 63 useButton:setEnabled(false) 64 end 59 65 end 60 66 … … 130 136 useButton:setText("use") 131 137 orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseButton_clicked") 138 if pickup:isUsable() == false then 139 useButton:setEnabled(false) 140 end 132 141 else 133 142 useButton:setText("unuse") 134 143 orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseButton_clicked") 144 if pickup:isUnusable() == false then 145 useButton:setEnabled(false) 146 end 135 147 end 136 148 item:addChildWindow(useButton) … … 229 241 useButton:setText("use") 230 242 orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseDetailButton_clicked") 243 if pickup:isUsable() == false then 244 useButton:setEnabled(false) 245 end 231 246 else 232 247 useButton:setText("unuse") 233 248 orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUnuseDetailButton_clicked") 249 if pickup:isUnusable() == false then 250 useButton:setEnabled(false) 251 end 234 252 end 235 253 wrapper:addChildWindow(useButton)
Note: See TracChangeset
for help on using the changeset viewer.