Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 3, 2010, 9:17:51 PM (14 years ago)
Author:
dafrick
Message:

Some documenting, cleaning up. Also: Now the NotificationQueue has a height corresponding to its input size.

File:
1 edited

Legend:

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

    r7341 r7342  
    6969
    7070    -- 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
     71    local counter = noInputSheetCounter()
    7572    -- Pause game control if this is the first menu to be displayed
    7673    -- HUGE HACK?
     
    182179
    183180    -- 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
     181    local counter = noInputSheetCounter()
    188182    -- Resume control if the last (non-noInput) menu is hidden
    189183    if counter == 0 then
     
    204198
    205199    -- Count the number of sheets that don't need input till the first that does.
    206     local counter = activeMenuSheets.size
    207     while counter > 0 and activeMenuSheets[counter].bNoInput do
    208         counter = counter - 1
    209     end
     200    local counter = noInputSheetCounter()
    210201
    211202    -- If the first sheet that needs input is the MainMenu.
     
    224215end
    225216
     217function noInputSheetCounter()
     218    -- Count the number of sheets that don't need input till the first that does.
     219    local counter = activeMenuSheets.size
     220    while counter > 0 and activeMenuSheets[counter].bNoInput do
     221        counter = counter - 1
     222    end
     223    return counter
     224end
     225
    226226----------------------
    227227--- Initialisation ---
Note: See TracChangeset for help on using the changeset viewer.