|
Last change
on this file since 5753 was
5748,
checked in by rgrieder, 16 years ago
|
|
In quest system:
- Build fix (non-void function must return a value)
- Removed some header files to reduce compile time
- svn:eol-style "native" for the added files
- removed svn:executable property from QuestNotification.cc
|
-
Property svn:eol-style set to
native
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | -- QuestGUI |
|---|
| 2 | |
|---|
| 3 | BasicGUI = require("BasicGUI") |
|---|
| 4 | local P = BasicGUI:new() --inherit everything from the gui package |
|---|
| 5 | if _REQUIREDNAME == nil then |
|---|
| 6 | QuestGUI = P |
|---|
| 7 | else |
|---|
| 8 | _G[_REQUIREDNAME] = P |
|---|
| 9 | end |
|---|
| 10 | |
|---|
| 11 | P.filename = "QuestGUI" |
|---|
| 12 | P.layoutString = "QuestGUI.layout" |
|---|
| 13 | |
|---|
| 14 | local windowManager = CEGUI.WindowManager:getSingleton() |
|---|
| 15 | -- local playerManager = orxonox.PlayerManager |
|---|
| 16 | local questManager = orxonox.QuestManager:getInstance() |
|---|
| 17 | |
|---|
| 18 | local quests = {} |
|---|
| 19 | |
|---|
| 20 | -- overwrites load function of previous load function |
|---|
| 21 | function P:load() |
|---|
| 22 | element = P.__index.load(P) -- calling load function of parent class with ourselves and do other stuff now |
|---|
| 23 | --win = winMgr:getWindow("orxonox/LevelListBox") |
|---|
| 24 | --print(win.getItemCount()) |
|---|
| 25 | --item = winMgr:createWindow("TaharezLook/ListboxItem", "orxonox/LevelListBoxItem1") |
|---|
| 26 | --item:setText("HiHo") |
|---|
| 27 | --win:addItem(item) |
|---|
| 28 | --print(win:getItemCount()) |
|---|
| 29 | return element |
|---|
| 30 | end |
|---|
| 31 | |
|---|
| 32 | function P:show() |
|---|
| 33 | self.window:show() -- TDO: Do this through parent... |
|---|
| 34 | self.visible = true |
|---|
| 35 | |
|---|
| 36 | local questsList = windowManager:getWindow("orxonox/QuestGUI/QuestsList") |
|---|
| 37 | |
|---|
| 38 | local window = questManager:getQuestGUI(P.filename) |
|---|
| 39 | |
|---|
| 40 | questsList:addChildWindow(window) |
|---|
| 41 | |
|---|
| 42 | end |
|---|
| 43 | |
|---|
| 44 | function P:button_activeQuests_clicked(e) |
|---|
| 45 | |
|---|
| 46 | end |
|---|
| 47 | |
|---|
| 48 | function P:button_completedQuests_clicked(e) |
|---|
| 49 | |
|---|
| 50 | end |
|---|
| 51 | |
|---|
| 52 | function P:button_failedQuests_clicked(e) |
|---|
| 53 | |
|---|
| 54 | end |
|---|
| 55 | |
|---|
| 56 | return P |
|---|
| 57 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.