Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 11, 2017, 3:04:50 PM (7 years ago)
Author:
rrogge
Message:

Singletonkram figured out

File:
1 edited

Legend:

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

    r11413 r11415  
    9797    local detailsButton = winMgr:createWindow("MenuWidgets/Button", "/DetailsButton")
    9898    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)))
     99    detailsButton:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.25, 0)))
     100    detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, 575), CEGUI.UDim(0, P.textHeight)))
    101101    detailsButton:setText(a1)
    102102    orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name ..".a1Button_clicked")
    103     root:addChildWindow(detailsButton)
     103    P.wrapper:addChildWindow(detailsButton)
    104104
    105105    local a2Button = winMgr:createWindow("MenuWidgets/Button", "/a2Button")
    106106    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)))
     107    a2Button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.1, 0),CEGUI.UDim(0.4, 0)))
     108    a2Button:setSize(CEGUI.UVector2(CEGUI.UDim(0, 575), CEGUI.UDim(0, P.textHeight)))
    109109    a2Button:setText(a2)
    110110    orxonox.GUIManager:subscribeEventHelper(a2Button, "Clicked", P.name ..".a2Button_clicked")
    111     root:addChildWindow(a2Button)
     111    P.wrapper:addChildWindow(a2Button)
    112112
    113113
     
    139139
    140140function P.a2Button_clicked(e)
    141     orxonox.DialogueManager:getInstance():a2clicked()
     141    orxonox.CommandExecutor:execute("OrxonoxOverlay toggleVisibility Dialogue")
    142142end
    143143
Note: See TracChangeset for help on using the changeset viewer.