Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11422


Ignore:
Timestamp:
May 18, 2017, 2:55:34 PM (8 years ago)
Author:
rrogge
Message:

everything updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Dialogue_FS17/data/gui/scripts/Dialogue.lua

    r11421 r11422  
    7171function P.update()
    7272    orxout("UPDATING")
    73     P.createInventory()
     73    P.updateInventory()
    7474    if P.showing == false then
    7575        return
     
    8989    local pickupManager = orxonox.DialogueManager:getInstance()
    9090   
    91     local root = winMgr:getWindow("orxonox/Dialogue/Inventory")
     91    root = winMgr:getWindow("orxonox/Dialogue/Inventory")
    9292    local question = orxonox.DialogueManager:getInstance():getquestion()
    9393    root:setText(question)
     
    9797   
    9898   
    99     local detailsButton = winMgr:createWindow("MenuWidgets/Button", "/DetailsButton")
     99    detailsButton = winMgr:createWindow("MenuWidgets/Button", "/DetailsButton")
    100100    local a1 = orxonox.DialogueManager:getInstance():getanswers1()
    101101    detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.25, 0)))
     
    105105    P.wrapper:addChildWindow(detailsButton)
    106106
    107     local a2Button = winMgr:createWindow("MenuWidgets/Button", "/a2Button")
     107    a2Button = winMgr:createWindow("MenuWidgets/Button", "/a2Button")
    108108    local a2 = orxonox.DialogueManager:getInstance():getanswers2()
    109109    a2Button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.4, 0)))
     
    116116end
    117117
     118function P.updateInventory()
     119    local questionn = orxonox.DialogueManager:getInstance():getquestion()
     120    root:setText(questionn)
     121    local a1n = orxonox.DialogueManager:getInstance():getanswers1()
     122    detailsButton:setText(a1n)
     123    local a2n = orxonox.DialogueManager:getInstance():getanswers2()
     124    a2Button:setText(a2n)
     125
     126end
    118127
    119128
Note: See TracChangeset for help on using the changeset viewer.