Changeset 11415 for code/branches
- Timestamp:
- May 11, 2017, 3:04:50 PM (8 years ago)
- Location:
- code/branches/Dialogue_FS17
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialogue_FS17/data/gui/scripts/Dialogue.lua
r11413 r11415 97 97 local detailsButton = winMgr:createWindow("MenuWidgets/Button", "/DetailsButton") 98 98 local a1 = orxonox.DialogueManager:getInstance():getanswers1() 99 detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0. 3, P.imageHeight+2*P.buttonWidth),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))100 detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))99 detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.25, 0))) 100 detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, 575), CEGUI.UDim(0, P.textHeight))) 101 101 detailsButton:setText(a1) 102 102 orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name ..".a1Button_clicked") 103 root:addChildWindow(detailsButton)103 P.wrapper:addChildWindow(detailsButton) 104 104 105 105 local a2Button = winMgr:createWindow("MenuWidgets/Button", "/a2Button") 106 106 local a2 = orxonox.DialogueManager:getInstance():getanswers2() 107 a2Button:setPosition(CEGUI.UVector2(CEGUI.UDim(0. 3, P.imageHeight+40+2*P.buttonWidth),CEGUI.UDim(0, (P.imageHeight-P.textHeight)/2)))108 a2Button:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.buttonWidth), CEGUI.UDim(0, P.textHeight)))107 a2Button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.4, 0))) 108 a2Button:setSize(CEGUI.UVector2(CEGUI.UDim(0, 575), CEGUI.UDim(0, P.textHeight))) 109 109 a2Button:setText(a2) 110 110 orxonox.GUIManager:subscribeEventHelper(a2Button, "Clicked", P.name ..".a2Button_clicked") 111 root:addChildWindow(a2Button)111 P.wrapper:addChildWindow(a2Button) 112 112 113 113 … … 139 139 140 140 function P.a2Button_clicked(e) 141 orxonox. DialogueManager:getInstance():a2clicked()141 orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialogue") 142 142 end 143 143 -
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.cc
r11413 r11415 6 6 #include "network/Host.h" 7 7 #include "network/NetworkFunctionIncludes.h" 8 #include "DialogueManager.h"9 8 #include "DialoguePrereqs.h" 10 9 #include <vector> 11 10 #include <string> 12 11 #include "core/XMLPort.h" 12 #include "NextQuestion.h" 13 13 14 14 15 15 namespace orxonox { 16 //ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false);17 RegisterAbstractClass(DialogueManager).inheritsFrom<BaseObject>();16 ManageScopedSingleton(DialogueManager, ScopeID::ROOT, false); 17 18 18 19 //DialogueManager* DialogueManager::singletonPtr_s =nullptr; 19 20 20 21 DialogueManager* DialogueManager::singletonPtr_s =nullptr; 22 23 DialogueManager::DialogueManager(Context* context): BaseObject(context){ 21 DialogueManager::DialogueManager(){ 24 22 orxout() << "Dialog Konstruktor" << endl; 25 RegisterObject(DialogueManager);23 //RegisterObject(DialogueManager); 26 24 27 25 … … 66 64 bool DialogueManager::a1clicked(void){ 67 65 orxout() << "a1 clicked" << endl; 66 68 67 return true; 69 68 } -
code/branches/Dialogue_FS17/src/modules/dialogue/DialogueManager.h
r11413 r11415 16 16 17 17 18 19 18 20 namespace orxonox //tolua_export 19 21 20 22 {//tolua_export 21 23 class _OrxonoxExport DialogueManager //tolua_export 22 : public Singleton<DialogueManager> , public BaseObject24 : public Singleton<DialogueManager> 23 25 {//tolua_export 24 26 friend class Singleton<DialogueManager>; … … 27 29 28 30 29 DialogueManager( Context* context);31 DialogueManager(); 30 32 31 33 … … 56 58 */ 57 59 private: 60 //NextQuestion currentQuestion; 58 61 std::string a1; 59 62 std::string a2; -
code/branches/Dialogue_FS17/src/modules/dialogue/NextQuestion.cc
r11413 r11415 17 17 RegisterObject(NextQuestion); 18 18 orxout() << "Klasse aufgerufen" << endl; 19 DialogueManager* d = new DialogueManager(context);19 20 20 21 21 } … … 109 109 } 110 110 111 NextQuestion NextQuestion::compare(){ 111 112 /*NextQuestion NextQuestion::compare(){ 112 113 DialogueManager& m = DialogueManager::getInstance(); 113 114 if(m.a1clicked()){ … … 118 119 return *possibleQuestions[1]; 119 120 } 120 } 121 }*/ 121 122 122 123
Note: See TracChangeset
for help on using the changeset viewer.