Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 13, 2010, 3:55:30 PM (15 years ago)
Author:
rgrieder
Message:

Moved BasicGUI.lua to GUISheet.lua and derived MenuSheet.lua as well as HUDSheet.lua from it.
Also, to make a new GUI sheet, use either createHUDSheet or createMenuSheet.
Also removed bShowCursor from the showGUI function. This is now always a value directed by the GUI sheet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestates2/data/gui/scripts/GUITools.lua

    r6666 r6718  
    1 function createSheet(sheetName)
    2     -- Create object of type BasicGUI and make it global
    3     local basicGUI = require("BasicGUI")
    4     if basicGUI == nil then
    5         error("Loading BasicGUI.lua failed")
    6     end
    7     local sheet = basicGUI:new(sheetName)
    8     _G[sheetName] = sheet
     1-- Returns a new menu sheet
     2-- See MenuSheet.new for details about the parameters
     3function createMenuSheet(name, bHidePrevious, tShowCursor, tUseKeyboard, bBlockJoyStick)
     4    local sheet = require("MenuSheet").new(name, bHidePrevious, tShowCursor, tUseKeyboard, bBlockJoyStick)
     5    _G[sheet.name] = sheet -- Global access required because of the event handlers
     6    return sheet
     7end
     8
     9-- Returns a new HUD sheet
     10function createHUDSheet(name)
     11    local sheet = require("HUDSheet").new(name)
     12    _G[sheet.name] = sheet -- Global access required because of the event handlers
    913    return sheet
    1014end
Note: See TracChangeset for help on using the changeset viewer.