Changeset 11413 for code/branches/Dialogue_FS17/data/gui/scripts
- Timestamp:
- May 4, 2017, 4:11:36 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialogue_FS17/data/gui/scripts/Dialogue.lua
r11407 r11413 93 93 P.wrapper:setSize(CEGUI.UVector2(CEGUI.UDim(1,0),CEGUI.UDim(1,0))) 94 94 root:addChildWindow(P.wrapper) 95 root:addChild(answerButton)96 95 97 96 97 local detailsButton = winMgr:createWindow("MenuWidgets/Button", "/DetailsButton") 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))) 101 detailsButton:setText(a1) 102 orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name ..".a1Button_clicked") 103 root:addChildWindow(detailsButton) 104 105 local a2Button = winMgr:createWindow("MenuWidgets/Button", "/a2Button") 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))) 109 a2Button:setText(a2) 110 orxonox.GUIManager:subscribeEventHelper(a2Button, "Clicked", P.name ..".a2Button_clicked") 111 root:addChildWindow(a2Button) 112 98 113 99 114 end … … 119 134 120 135 121 function P.InventoryBackButton_clicked(e) 122 orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialogue") 136 function P.a1Button_clicked(e) 137 orxonox.DialogueManager:getInstance():a1clicked() 138 end 139 140 function P.a2Button_clicked(e) 141 orxonox.DialogueManager:getInstance():a2clicked() 123 142 end 124 143
Note: See TracChangeset
for help on using the changeset viewer.