Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7340


Ignore:
Timestamp:
Sep 3, 2010, 4:27:16 PM (14 years ago)
Author:
dafrick
Message:

Fixed problems with hud and cursor.
Here a little summary about what has been introduced by the last three commits:
When showing a GUI one can now additionally specify whether the GUI to be shown should be treated as transparent to input (bNoInput). If this is set to true the GUI acts merely as a display layer and doesn't interfere with any kind of input.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/notifications/data/gui/scripts/SheetManager.lua

    r7339 r7340  
    6363    end
    6464
     65    -- Set bNoInput to false if it hasn't been set.
    6566    if bNoInput == nil then
    6667        bNoInput = false
    6768    end
    6869
     70    -- Count the number of sheets that don't need input till the first that does.
     71    local counter = activeMenuSheets.size
     72    while counter > 0 and activeMenuSheets[counter].bNoInput do
     73        counter = counter - 1
     74    end
    6975    -- Pause game control if this is the first menu to be displayed
    7076    -- HUGE HACK?
    71     if activeMenuSheets.size == 0 then
     77    if bNoInput == false and counter == 0 then
    7278        orxonox.HumanController:pauseControl()
    7379    end
     
    7884    end
    7985
    80     if bNoInput == false then
     86    if bNoInput == true then
    8187        menuSheet.tShowCursor = TriBool.Dontcare
    8288    end
     
    175181    end
    176182
    177     -- Resume control if the last menu is hidden
    178     if activeMenuSheets.size == 0 then
     183    -- Count the number of sheets that don't need input till the first that does.
     184    local counter = activeMenuSheets.size
     185    while counter > 0 and activeMenuSheets[counter].bNoInput do
     186        counter = counter - 1
     187    end
     188    -- Resume control if the last (non-noInput) menu is hidden
     189    if counter == 0 then
    179190        orxonox.HumanController:resumeControl()
    180191        hideCursor()
Note: See TracChangeset for help on using the changeset viewer.