Changeset 8023 for code/branches/usability/data/gui
- Timestamp:
- Mar 5, 2011, 11:07:39 PM (14 years ago)
- Location:
- code/branches/usability/data/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/usability/data/gui/scripts/GraphicsMenu.lua
r8022 r8023 337 337 -- prompt for confirmation 338 338 openDecisionPopup("Do you want to keep these settings? (Settings will be reverted in 10 seconds if not accepted)", GraphicsMenu.callback_ApplyDecisionPopup) 339 if checkedFullscreen then 340 showCursor() 341 end 339 342 end 340 343 -
code/branches/usability/data/gui/scripts/SheetManager.lua
r8018 r8023 10 10 orxonox.GUIManager:subscribeEventHelper(menuSheetsRoot, "Sized", "windowResized") 11 11 12 -----------------------13 --- Local functions ---14 -----------------------15 16 local function hideCursor()17 if cursor:isVisible() then18 cursor:hide()19 end20 end21 22 local function showCursor()23 if not cursor:isVisible() and inputMgr:isMouseExclusive() then24 cursor:show()25 end26 end27 28 29 12 ------------------------ 30 13 --- Global functions --- 31 14 ------------------------ 15 16 function hideCursor() 17 if cursor:isVisible() then 18 cursor:hide() 19 end 20 end 21 22 function showCursor() 23 if not cursor:isVisible() and inputMgr:isMouseExclusive() then 24 cursor:show() 25 end 26 end 32 27 33 28 -- Loads the GUI with the specified name … … 257 252 258 253 function windowResized(e) 259 local sheet = activeMenuSheets[activeMenuSheets.size] 260 if sheet then 261 sheet.sheet:windowResized() 254 for name, sheet in pairs(loadedSheets) do 255 if orxonox.GraphicsManager:getInstance():isFullScreen() or sheet.tShowCursor == TriBool.False then 256 inputMgr:setMouseExclusive(sheet.inputState, TriBool.True) 257 else 258 inputMgr:setMouseExclusive(sheet.inputState, TriBool.False) 259 end 260 end 261 local sheetTuple = activeMenuSheets[activeMenuSheets.size] 262 if sheetTuple then 263 if orxonox.GraphicsManager:getInstance():isFullScreen() and sheetTuple.sheet.tShowCursor ~= TriBool.False then 264 showCursor() 265 else 266 hideCursor() 267 end 268 sheetTuple.sheet:windowResized() 262 269 end 263 270 end
Note: See TracChangeset
for help on using the changeset viewer.