Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 5, 2010, 12:42:54 PM (14 years ago)
Author:
dafrick
Message:

Started work on edit mode. ConsoleCommand is not yet working.
Some additional cleanup. All the NotificationQueues generated by the NotificationManager now are destroyed upon destruction of the NotificationManager.
Removed NotificationQueue from level files.

Location:
code/branches/notifications/data
Files:
7 edited

Legend:

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

    r7351 r7354  
    66P.nameList = {}
    77P.visible = nil
     8P.editMode = false
     9P.editList = {}
    810
    911function P.createQueue(name, size)
    1012    local root = winMgr:getWindow("orxonox/NotificationLayer/Root")
    1113    local queue = winMgr:createWindow("MenuWidgets/Listbox", "orxonox/NotificationLayer/Root/Queue/" .. name)
    12     queue:setProperty("BackgroundColor", "66FFFFFF")
     14    queue:setProperty("BackgroundColor", "00FFFFFF")
    1315    root:addChildWindow(queue)
    1416
     
    123125end
    124126
     127function P.enterEditMode()
     128    P.editMode = true
     129
     130    local root = winMgr:getWindow("orxonox/NotificationLayer/Root")
     131    --Replace all queues with FrameWindows
     132    for k,v in pairs(P.queueList) do
     133        if v ~= nil then
     134            root:removeChildWindow(v)
     135            local frame = winMgr:createWindow("MenuWidgets/FrameWindow", "orxonox/NotificationLayer/Root/EditMode/" .. P.nameList(k))
     136            frame:setArea(v:getArea())
     137            P.editList[k] = frame
     138        end
     139    end
     140end
     141
     142function P.leaveEditMode()
     143    P.editMode = false
     144
     145    local root = winMgr:getWindow("orxonox/NotificationLayer/Root")
     146    --Replace all queues with FrameWindows
     147    for k,v in pairs(P.queueList) do
     148        if v ~= nil then
     149            root:addChildWindow(v)
     150            v:setArea(P.editList[k]:getArea())
     151            winMgr:destroyWindow(P.editList[k])
     152            P.editList[k] = nil
     153        end
     154    end
     155end
     156
     157function P.onHide()
     158    if P.editMode then
     159        P.leaveEditMode()
     160    end
     161end
     162
    125163function P.nameToQueueHelper(name)
    126164    local queue = nil
  • code/branches/notifications/data/levels/Fight in our Back.oxw

    r7163 r7354  
    77    include("templates/spaceship_Transporter.oxt")
    88?>
    9 
    10 <NotificationQueue
    11     name     = "notification"
    12     position = "0.40, 0.05"
    13     font     = "VeraMono"
    14     textsize = 0.020
    15     length   = 3
    16     width    = 50
    17 />
    189
    1910<!--*****************************************************************************************************************************************************************************************-->
  • code/branches/notifications/data/levels/Quest_PirateAttack.oxw

    r7163 r7354  
    1919    dofile("includes/CuboidSpaceStation.lua")
    2020?>
    21 
    22 <NotificationQueue
    23      name     = "notification"
    24      position = "0.40, 0.05"
    25      font     = "VeraMono"
    26      textsize = 0.020
    27      length   = 3
    28      width    = 50
    29 />
    30    
    31    
    3221   
    3322<Level
  • code/branches/notifications/data/levels/old/princessaeryn.oxw

    r6417 r7354  
    88    dofile("includes/CuboidSpaceStation.lua")
    99?>
    10 
    11 <NotificationQueue
    12  name  = "notification"
    13  position = "1.0, 1.0"
    14  targets = "questsystem"
    15 />
    1610
    1711<Level
  • code/branches/notifications/data/levels/old/questsystem.oxw

    r6417 r7354  
    44  include("templates/spaceship_assff.oxt")
    55?>
    6 
    7 <NotificationQueue
    8  name  = "notification"
    9  position = "1.0, 1.0"
    10  targets = "all"
    11 />
    126
    137<Level
  • code/branches/notifications/data/levels/princessaeryn.oxw

    r7163 r7354  
    1414 description  = "The Tale of Princess Aeryn"
    1515>
    16 
    17   <NotificationQueue
    18    name   = "notification"
    19    position = "0.55, 0.05"
    20    font   = "VeraMono"
    21    textsize = 0.020
    22    length   = 3
    23    width  = 50
    24   />
    2516
    2617  <templates>
  • code/branches/notifications/data/levels/tutorial.oxw

    r7319 r7354  
    1313    <Template link=lodtemplate_default />
    1414  </templates>
    15 
    16   <NotificationQueue
    17    name   = "notification"
    18    position = "0.05, 0.05"
    19    font   = "VeraMono"
    20    textsize = 0.020
    21    length   = 3
    22    width  = 50
    23   />
    2415
    2516  <Scene
Note: See TracChangeset for help on using the changeset viewer.