Changeset 11435 for code/branches/Dialogue_FS17/data/gui/scripts
- Timestamp:
- May 26, 2017, 3:40:04 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Dialogue_FS17/data/gui/scripts/Dialogue.lua
r11433 r11435 1 --[[local P = createMenuSheet("Dialogue Window")2 1 3 function P.onLoad()4 P.createWindow()5 P.showing = true6 end7 function function_name( ... )8 -- body9 end10 11 12 13 14 function P.createWindow()15 16 local question = orxonox.DialogueManager:getInstance():getquestion()17 local default = (winMgr:createWindow("DefaultWindow"))18 default:setText(question)19 default:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}")20 default:setProperty("UnifiedAreaRect", "{{0,0},{0,0},{1,0},{1,0}}")21 22 23 24 25 26 end27 local numOptions = DialogueManager:getnumOptions()28 local counter = 129 local offset = 030 --create and name buttons while there are still options31 while counter <= numOptions do32 33 34 end]]35 2 -- Dialogue.lua 36 3 … … 51 18 52 19 function P.onLoad() 53 54 orxout("loading")55 20 P.wrapper = nil 56 21 P.detailsWindows = {} … … 60 25 61 26 function P.onShow() 62 orxout("showing")63 27 orxonox.CommandExecutor:execute("setTimeFactor 0") 64 28 P.createInventory() … … 74 38 75 39 function P.update() 76 orxout("UPDATING")77 40 P.updateInventory() 78 41 if P.showing == false then … … 104 67 detailsButton = winMgr:createWindow("MenuWidgets/Button", "/DetailsButton") 105 68 local a1 = orxonox.DialogueManager:getInstance():getanswers1() 106 detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.25, 0)))107 detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0 , 575), CEGUI.UDim(0, P.textHeight)))69 detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.25, (P.imageHeight-P.textHeight)/2))) 70 detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0.8, 0), CEGUI.UDim(0, P.textHeight))) 108 71 detailsButton:setText(a1) 109 72 orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name ..".a1Button_clicked") … … 112 75 a2Button = winMgr:createWindow("MenuWidgets/Button", "/a2Button") 113 76 local a2 = orxonox.DialogueManager:getInstance():getanswers2() 114 a2Button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.4, 0)))115 a2Button:setSize(CEGUI.UVector2(CEGUI.UDim(0 , 575), CEGUI.UDim(0, P.textHeight)))77 a2Button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.4, (P.imageHeight-P.textHeight)/2))) 78 a2Button:setSize(CEGUI.UVector2(CEGUI.UDim(0.8, 0), CEGUI.UDim(0, P.textHeight))) 116 79 a2Button:setText(a2) 117 80 orxonox.GUIManager:subscribeEventHelper(a2Button, "Clicked", P.name ..".a2Button_clicked") … … 147 110 end 148 111 end 149 orxonox.DialogueManager:getInstance():clean()112 150 113 end 151 114
Note: See TracChangeset
for help on using the changeset viewer.