Changeset 6459
- Timestamp:
- Jan 24, 2010, 5:03:27 PM (15 years ago)
- Location:
- code/branches/gamestate/data/gui/scripts
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gamestate/data/gui/scripts/AudioMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("AudioMenu") 5 5 if _REQUIREDNAME == nil then 6 6 AudioMenu = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "AudioMenu"12 P.layoutString = "AudioMenu.layout"13 10 14 11 function P:init() -
code/branches/gamestate/data/gui/scripts/BasicGUI.lua
r5781 r6459 8 8 end 9 9 10 -- useless? 10 11 P.overlay = nil 11 12 12 13 -- constructor of the GUI 13 function P:new (gui, fname) 14 local newElement = { window = gui, filename = fname, visible = false } or {} 14 function P:new(_filename, _visible, _gui) 15 local newElement = { 16 filename = _filename, 17 gui = _gui, 18 visible = _visible or false 19 } or {} 15 20 setmetatable(newElement, self) -- connects new element with class 16 21 self.__index = self … … 23 28 24 29 -- hide function for the GUI 25 function P:hide 30 function P:hide() 26 31 self.window:hide() 27 32 self.visible = false … … 29 34 30 35 -- show function for the GUI 31 function P:show 36 function P:show() 32 37 self.window:show() 33 38 self.visible = true 34 39 end 35 40 36 function P:load 37 self.window = winMgr:loadWindowLayout(self. layoutString)41 function P:load() 42 self.window = winMgr:loadWindowLayout(self.filename .. ".layout") 38 43 self:init() 39 44 return self -
code/branches/gamestate/data/gui/scripts/ControlsMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("ControlsMenu") 5 5 if _REQUIREDNAME == nil then 6 6 ControlsMenu = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "ControlsMenu"12 P.layoutString = "ControlsMenu.layout"13 10 14 11 function P.ControlsMouseControlsButton_clicked(e) -
code/branches/gamestate/data/gui/scripts/CreditsMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("CreditsMenu") 5 5 if _REQUIREDNAME == nil then 6 6 CreditsMenu = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "CreditsMenu"12 P.layoutString = "CreditsMenu.layout"13 10 14 11 function P.CreditsBackButton_clicked(e) -
code/branches/gamestate/data/gui/scripts/DecisionPopup.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("DecisionPopup") 5 5 if _REQUIREDNAME == nil then 6 6 DecisionPopup = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "DecisionPopup"12 P.layoutString = "DecisionPopup.layout"13 10 14 11 function P:init() -
code/branches/gamestate/data/gui/scripts/GameplayMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("GameplayMenu") 5 5 if _REQUIREDNAME == nil then 6 6 GameplayMenu = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "GameplayMenu"12 P.layoutString = "GameplayMenu.layout"13 10 14 11 function P:init() -
code/branches/gamestate/data/gui/scripts/GraphicsMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("GraphicsMenu") 5 5 if _REQUIREDNAME == nil then 6 6 GraphicsMenu = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "GraphicsMenu"12 P.layoutString = "GraphicsMenu.layout"13 10 14 11 function P:init() -
code/branches/gamestate/data/gui/scripts/InGameMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("InGameMenu") 5 5 if _REQUIREDNAME == nil then 6 6 InGameMenu = P … … 9 9 end 10 10 11 P.filename = "InGameMenu"12 P.layoutString = "InGameMenu.layout"13 11 14 12 function P:init() -
code/branches/gamestate/data/gui/scripts/InfoPopup.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("InfoPopup") 5 5 6 6 if _REQUIREDNAME == nil then … … 9 9 _G[_REQUIREDNAME] = P 10 10 end 11 12 P.filename = "InfoPopup"13 P.layoutString = "InfoPopup.layout"14 11 15 12 function P:init() -
code/branches/gamestate/data/gui/scripts/KeyBindMenu.lua
r6427 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("KeyBindMenu") 5 5 6 6 if _REQUIREDNAME == nil then … … 9 9 _G[_REQUIREDNAME] = P 10 10 end 11 12 P.filename = "KeyBindMenu"13 P.layoutString = "KeyBindMenu.layout"14 11 15 12 function P:init() -
code/branches/gamestate/data/gui/scripts/MainMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("MainMenu") 5 5 if _REQUIREDNAME == nil then 6 6 MainMenu = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "MainMenu"12 P.layoutString = "MainMenu.layout"13 10 14 11 -- events for MainMenu -
code/branches/gamestate/data/gui/scripts/MouseControlsMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("MouseControlsMenu") 5 5 if _REQUIREDNAME == nil then 6 6 MouseControlsMenu = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "MouseControlsMenu"12 P.layoutString = "MouseControlsMenu.layout"13 10 14 11 function P:init() -
code/branches/gamestate/data/gui/scripts/MultiplayerMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("MultiplayerMenu") 5 5 if _REQUIREDNAME == nil then 6 6 MultiplayerMenu = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "MultiplayerMenu"12 P.layoutString = "MultiplayerMenu.layout"13 10 14 11 function P:init() -
code/branches/gamestate/data/gui/scripts/MultiplayerOptionsMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("MultiplayerOptionsMenu") 5 5 if _REQUIREDNAME == nil then 6 6 MultiplayerOptionsMenu = P … … 9 9 end 10 10 11 P.filename = "MultiplayerOptionsMenu"12 P.layoutString = "MultiplayerOptionsMenu.layout"13 14 11 function P.MultiplayerOptionsBackButton_clicked(e) 15 12 hideGUI(P.filename) -
code/branches/gamestate/data/gui/scripts/PickupInventory.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("PickupInventory") 5 5 if _REQUIREDNAME == nil then 6 6 PickupInventory = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "PickupInventory"12 P.layoutString = "PickupInventory.layout"13 10 14 11 P.lastEquipmentCount_ = 0 -
code/branches/gamestate/data/gui/scripts/QuestGUI.lua
r6417 r6459 1 1 gui = require("BasicGUI") 2 local P = BasicGUI:new( ) --inherit everything from the gui package2 local P = BasicGUI:new("QuestGUI") 3 3 if _REQUIREDNAME == nil then 4 4 QuestGUI = P … … 6 6 _G[_REQUIREDNAME] = P 7 7 end 8 9 P.filename = "QuestGUI"10 P.layoutString = "QuestGUI.layout"11 8 12 9 function P:show() -
code/branches/gamestate/data/gui/scripts/SettingsMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("SettingsMenu") 5 5 if _REQUIREDNAME == nil then 6 6 SettingsMenu = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "SettingsMenu"12 P.layoutString = "SettingsMenu.layout"13 10 14 11 function P.SettingsGameplayButton_clicked(e) -
code/branches/gamestate/data/gui/scripts/SingleplayerMenu.lua
r6417 r6459 2 2 3 3 BasicGUI = require("BasicGUI") 4 local P = BasicGUI:new( ) --inherit everything from the gui package4 local P = BasicGUI:new("SingleplayerMenu") 5 5 if _REQUIREDNAME == nil then 6 6 SingleplayerMenu = P … … 8 8 _G[_REQUIREDNAME] = P 9 9 end 10 11 P.filename = "SingleplayerMenu"12 P.layoutString = "SingleplayerMenu.layout"13 10 14 11 function P:init()
Note: See TracChangeset
for help on using the changeset viewer.