Changeset 7398 for code/branches/notifications/data/gui
- Timestamp:
- Sep 10, 2010, 7:50:06 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/notifications/data/gui/scripts/NotificationLayer.lua
r7395 r7398 40 40 winMgr:destroyWindow(queue.window) 41 41 end 42 queue= nil42 P.queueList[name] = nil 43 43 end 44 44 … … 194 194 window = winMgr:createWindow("MenuWidgets/FrameWindow", "orxonox/NotificationLayer/Root/EditMode/" .. name) 195 195 local frame = tolua.cast(window, "CEGUI::FrameWindow") 196 frame:setCloseButtonEnabled(false) 196 frame:setCloseButtonEnabled(true) 197 orxonox.GUIManager:subscribeEventHelper(frame, "CloseClicked", P.name .. ".closeQueue_clicked") 197 198 frame:setText("NotificationQueue \"" .. name .. "\"") 198 199 root:addChildWindow(window) … … 221 222 targets:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]*2+20), CEGUI.UDim(0, textHeight))) 222 223 targets:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 223 cout(0, horzOffset .. "|" .. targets:getXPosition():asAbsolute(1) .. "|" .. size[2]*2+20)224 224 horzOffset = horzOffset + size[2]*2+20 + 5 225 225 pane:addChildWindow(targets) … … 231 231 save:setSize(CEGUI.UVector2(CEGUI.UDim(0, saveTextWidth), CEGUI.UDim(0, textHeight))) 232 232 save:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 233 cout(0, horzOffset .. "|" .. save:getXPosition():asAbsolute(1))234 233 orxonox.GUIManager:subscribeEventHelper(save, "Clicked", P.name .. ".saveTargets_clicked") 235 234 pane:addChildWindow(save) … … 335 334 local window = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Targets") 336 335 local save = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Targets/Save") 337 local width = window:get XPosition():asAbsolute(1)336 local width = window:getWidth():asAbsolute(1) 338 337 339 338 local queue = orxonox.NotificationManager:getInstance():getQueue(queueName) … … 345 344 local size = getMinTextSize(P.sampleWindow) 346 345 window:setWidth(CEGUI.UDim(0, size[2]*2+20)) 347 cout(0, width .. "|" .. size[2]*2+20 .. "|" .. window:getWidth():asAbsolute(1) .. "|" .. save:getXPosition():asAbsolute(1))348 346 save:setXPosition(CEGUI.UDim(0, save:getXPosition():asAbsolute(1)-width+window:getWidth():asAbsolute(1))) 349 347 end … … 359 357 local window = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Size") 360 358 local save = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Size/Save") 361 local width = window:get XPosition():asAbsolute(1)359 local width = window:getWidth():asAbsolute(1) 362 360 363 361 local queue = orxonox.NotificationManager:getInstance():getQueue(queueName) … … 382 380 local window = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTime") 383 381 local save = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTime/Save") 384 local width = window:get XPosition():asAbsolute(1)382 local width = window:getWidth():asAbsolute(1) 385 383 386 384 local queue = orxonox.NotificationManager:getInstance():getQueue(queueName) … … 417 415 function P.leaveEditMode_clicked(e) 418 416 hideMenuSheet(P.name) 417 end 418 419 function P.closeQueue_clicked(e) 420 local we = CEGUI.toWindowEventArgs(e) 421 local name = we.window:getName() 422 423 local match = string.gmatch(name, "EditMode/.*") 424 local nameStr = match() 425 local queueName = string.sub(nameStr, 10, string.len(nameStr)) 426 427 winMgr:destroyWindow(P.queueList[queueName].edit) 428 P.queueList[queueName].edit = nil 429 orxonox.NotificationManager:getInstance():getQueue(queueName):destroy() 419 430 end 420 431
Note: See TracChangeset
for help on using the changeset viewer.