Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 3, 2010, 11:30:24 PM (14 years ago)
Author:
dafrick
Message:

Some documenting and adjustment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/notifications/data/gui/scripts/NotificationLayer.lua

    r7342 r7343  
    99    local root = winMgr:getWindow("orxonox/NotificationLayer/Root")
    1010    local queue = winMgr:createWindow("MenuWidgets/Listbox", "orxonox/NotificationLayer/Root/Queue/" .. name)
     11    queue:setProperty("Alpha", 0.3)
     12    queue:setProperty("InheritsAlpha", "setFalse")
    1113    root:addChildWindow(queue)
    1214
     
    3436        winMgr:destroyWindow(queue)
    3537    end
    36 end
    37 
    38 function P.changePosition(name, xPos, yPos)
    39     local queue = P.nameToQueueHelper(name)
    40     if queue == nil then
    41         cout(0, "Queue is nil!")
    42         return
    43     end
    44     queue:setPosition(CEGUI.UVector2(CEGUI.UDim(tonumber(xPos), 0), CEGUI.UDim(tonumber(yPos), 0)))
    4538end
    4639
     
    9083end
    9184
     85function P.changePosition(name, xPos, yPos)
     86    local queue = P.nameToQueueHelper(name)
     87    if queue == nil then
     88        cout(0, "Queue is nil!")
     89        return
     90    end
     91    queue:setPosition(CEGUI.UVector2(CEGUI.UDim(tonumber(xPos), 0), CEGUI.UDim(tonumber(yPos), 0)))
     92    queue:setWidth(CEGUI.UDim(1.0, -xPos))
     93end
     94
     95function P.changeSize(name, size)
     96    local queue = P.nameToQueueHelper(name)
     97    if queue == nil then
     98        cout(0, "Queue is nil!")
     99        return
     100    end
     101    queue:setHeight(CEGUI.UDim(0, P.queueHeightHelper(queue, size)))
     102end
     103
    92104function P.nameToQueueHelper(name)
    93105    local queue = nil
Note: See TracChangeset for help on using the changeset viewer.