Changeset 11413 for code/branches/Dialogue_FS17/data
- Timestamp:
- May 4, 2017, 4:11:36 PM (8 years ago)
- Location:
- code/branches/Dialogue_FS17/data
- Files:
-
- 2 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 -
code/branches/Dialogue_FS17/data/levels/events.oxw
r11401 r11413 57 57 --> 58 58 59 <DistanceTrigger name="test" position="0,0,0" target="Pawn" distance=25 stayActive="true"/>59 <DistanceTrigger name="test" position="0,0,0" target="Pawn" distance=25 stayActive="true" /> 60 60 <Backlight position="0,0,0" visible=true frequency=0.6 amplitude=3 material="Flares/lensflare" colour="1,0,1"/> 61 <NextQuestion question="Hello World3"> 61 <NextQuestion question="Continue?" a1="yes" a2="no" > 62 <!-- <possibleQuestions> 63 <NextQuestion question="Are you sure?" a1="yep let me continue" a2="no actually not" /> 64 <NextQuestion question="Why?" a1="Got a dentist's appointment" a2="this sucks" /> 65 </possibleQuestions> --> 62 66 <events> 63 67 <execute>
Note: See TracChangeset
for help on using the changeset viewer.