Last change
on this file since 5706 was
5695,
checked in by rgrieder, 15 years ago
|
Merged resource2 branch back to trunk.
IMPORTANT NOTE:
Upon this merge you need to specifically call your data directory "data_extern" when checking it out (when you don't provide a name, it will be just called 'trunk').
The new CMake variable is EXTERNAL_DATA_DIRECTORY. DATA_DIRECTORY now points to the one the source part of the repository.
UPDATE YOUR DATA DIRECTORY AS WELL!!!
|
-
Property svn:eol-style set to
native
|
File size:
796 bytes
|
Rev | Line | |
---|
[5491] | 1 | -- gui.lua |
---|
| 2 | |
---|
| 3 | local P = {} |
---|
| 4 | if _REQUIREDNAME == nil then |
---|
[5661] | 5 | BasicGUI = P |
---|
[5491] | 6 | else |
---|
| 7 | _G[_REQUIREDNAME] = P |
---|
| 8 | end |
---|
| 9 | |
---|
| 10 | P.overlay = nil |
---|
| 11 | |
---|
| 12 | -- constructor of the GUI |
---|
| 13 | function P:new (gui, fname) |
---|
| 14 | local newElement = { window = gui, filename = fname, visible = false } or {} |
---|
| 15 | setmetatable(newElement, self) -- connects new element with class |
---|
| 16 | self.__index = self |
---|
| 17 | return newElement |
---|
| 18 | end |
---|
| 19 | |
---|
[5523] | 20 | function P:init() |
---|
| 21 | -- this function is empty and intended for inheriting GUIs to use |
---|
| 22 | end |
---|
| 23 | |
---|
[5491] | 24 | -- hide function for the GUI |
---|
| 25 | function P:hide () |
---|
| 26 | self.window:hide() |
---|
| 27 | self.visible = false |
---|
| 28 | end |
---|
| 29 | |
---|
| 30 | -- show function for the GUI |
---|
| 31 | function P:show () |
---|
| 32 | self.window:show() |
---|
| 33 | self.visible = true |
---|
| 34 | end |
---|
| 35 | |
---|
| 36 | function P:load () |
---|
[5559] | 37 | self.window = winMgr:loadWindowLayout(self.layoutString) |
---|
| 38 | self:init() |
---|
| 39 | return self |
---|
[5491] | 40 | end |
---|
| 41 | |
---|
[5661] | 42 | return P |
---|
Note: See
TracBrowser
for help on using the repository browser.