[Orxonox-commit 6795] r11422 - code/branches/Dialogue_FS17/data/gui/scripts

rrogge at orxonox.net rrogge at orxonox.net
Thu May 18 14:55:34 CEST 2017


Author: rrogge
Date: 2017-05-18 14:55:34 +0200 (Thu, 18 May 2017)
New Revision: 11422

Modified:
   code/branches/Dialogue_FS17/data/gui/scripts/Dialogue.lua
Log:
everything updates

Modified: code/branches/Dialogue_FS17/data/gui/scripts/Dialogue.lua
===================================================================
--- code/branches/Dialogue_FS17/data/gui/scripts/Dialogue.lua	2017-05-18 12:49:13 UTC (rev 11421)
+++ code/branches/Dialogue_FS17/data/gui/scripts/Dialogue.lua	2017-05-18 12:55:34 UTC (rev 11422)
@@ -70,7 +70,7 @@
 
 function P.update()
     orxout("UPDATING")
-    P.createInventory()
+    P.updateInventory()
     if P.showing == false then
         return
     end
@@ -88,7 +88,7 @@
 function P.createInventory()
     local pickupManager = orxonox.DialogueManager:getInstance()
     
-    local root = winMgr:getWindow("orxonox/Dialogue/Inventory")
+    root = winMgr:getWindow("orxonox/Dialogue/Inventory")
     local question = orxonox.DialogueManager:getInstance():getquestion()
     root:setText(question)
     P.wrapper = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/Dialogue/Inventory/Wrapper")
@@ -96,7 +96,7 @@
     root:addChildWindow(P.wrapper)
     
     
-    local detailsButton = winMgr:createWindow("MenuWidgets/Button", "/DetailsButton")
+    detailsButton = winMgr:createWindow("MenuWidgets/Button", "/DetailsButton")
     local a1 = orxonox.DialogueManager:getInstance():getanswers1()
     detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.25, 0)))
     detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, 575), CEGUI.UDim(0, P.textHeight)))
@@ -104,7 +104,7 @@
     orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name ..".a1Button_clicked")
     P.wrapper:addChildWindow(detailsButton)
 
-    local a2Button = winMgr:createWindow("MenuWidgets/Button", "/a2Button")
+    a2Button = winMgr:createWindow("MenuWidgets/Button", "/a2Button")
     local a2 = orxonox.DialogueManager:getInstance():getanswers2()
     a2Button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.4, 0)))
     a2Button:setSize(CEGUI.UVector2(CEGUI.UDim(0, 575), CEGUI.UDim(0, P.textHeight)))
@@ -115,8 +115,17 @@
 
 end
 
+function P.updateInventory()
+    local questionn = orxonox.DialogueManager:getInstance():getquestion()
+    root:setText(questionn)
+    local a1n = orxonox.DialogueManager:getInstance():getanswers1()
+    detailsButton:setText(a1n)
+    local a2n = orxonox.DialogueManager:getInstance():getanswers2()
+    a2Button:setText(a2n)
 
+end
 
+
 function P.cleanup(destroyDetails)
     if P.wrapper ~= nil then
         winMgr:destroyWindow(P.wrapper)



More information about the Orxonox-commit mailing list