Changeset 8706 for code/trunk/data
- Timestamp:
- Jun 14, 2011, 8:53:28 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 59 edited
- 18 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/data/defaultConfig/keybindings.ini
r8480 r8706 21 21 KeyDown="scale -1 moveFrontBack" 22 22 KeyE="scale -1 rotateRoll" 23 KeyEnd= boost23 KeyEnd="boost" 24 24 KeyEquals= 25 25 KeyEscape="keyESC" … … 119 119 KeySlash= 120 120 KeySleep= 121 KeySpace= boost121 KeySpace="boost" 122 122 KeyStop= 123 123 KeySystemRequest="printScreen" -
code/trunk/data/gui/layouts/QuestGUI.layout
r6746 r8706 1 1 <?xml version="1.0" ?> 2 2 <GUILayout> 3 <Window Type="MenuWidgets/StaticImage" Name="orxonox/QuestGUI/Background"> 4 <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}"/> 5 <Property Name="Image" Value="set:MainMenuBackground image:Background"/> 6 <Property Name="FrameEnabled" Value="set:true"/> 7 <Property Name="BackgroundEnabled" Value="set:false"/> 8 <Property Name="InheritsAlpha" Value="False" /> 3 <Window Type="DefaultWindow" Name="orxonox/QuestGUI/Background"> 4 <Property Name="InheritsAlpha" Value="False" /> 5 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 9 6 10 <Window Type="MenuWidgets/Titlebar" Name="orxonox/QuestGUI/Title"> 11 <Property Name="UnifiedPosition" Value="{{0.05,0},{0.05,0}}"/> 12 <Property Name="UnifiedSize" Value="{{0.9,0},{0.05,0}}"/> 13 <Property Name="Text" Value="Your Quests"/> 7 <Window Type="DefaultWindow" Name="orxonox/QuestGUI/MainWindow"> 8 <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.1,0},{0.9,0},{0.9,0}}" /> 9 10 <Window Type="MenuWidgets/Titlebar" Name="orxonox/QuestGUI/Title"> 11 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{0,30}}" /> 12 <Property Name="Text" Value="Your Quests"/> 13 </Window> 14 15 <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/MainWindow/LeftPanel"> 16 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,30},{0.5,0},{1,0}}" /> 17 18 <Window Type="MenuWidgets/TabButton" Name="orxonox/QuestGUI/ActiveQuestsButton"> 19 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0.5,0},{0,30}}" /> 20 <Property Name="Text" Value="active quests"/> 21 <Event Name="Clicked" Function="QuestGUI.showActiveQuestsButton_clicked"/> 22 </Window> 23 <Window Type="MenuWidgets/TabButton" Name="orxonox/QuestGUI/FinishedQuestsButton"> 24 <Property Name="UnifiedAreaRect" Value="{{0.5,0},{0,0},{1,0},{0,30}}" /> 25 <Property Name="Text" Value="finished quests"/> 26 <Event Name="Clicked" Function="QuestGUI.showFinishedQuestsButton_clicked"/> 27 </Window> 28 29 <Window Type="MenuWidgets/Listbox" Name="orxonox/QuestGUI/QuestsList"> 30 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,30},{1,0},{1,0}}" /> 31 <Event Name="ItemSelectionChanged" Function="QuestGUI.changeQuest_clicked"/> 32 </Window> 33 </Window> 34 35 <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/MainWindow/RightPanel"> 36 <Property Name="UnifiedAreaRect" Value="{{0.5,0},{0,30},{1,0},{1,0}}" /> 37 38 <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/Quest/Title"> 39 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{0,30}}" /> 40 <Property Name="Text" Value="Quest Title"/> 41 </Window> 42 43 <Window Type="MenuWidgets/ScrollablePane" Name="orxonox/QuestGUI/Quest/ScrollWrapper"> 44 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,30},{1,-4},{1,-4}}" /> 45 46 <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/Quest/Wrapper"> 47 <Property Name="UnifiedAreaRect" Value="{{0,5},{0,5},{1,-5},{0,0}}" /> 48 <Property Name="FrameEnabled" Value="false" /> 49 <Property Name="Alpha" Value="0" /> 50 51 <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/Quest/Description"> 52 <Property Name="UnifiedAreaRect" Value="{{0,5},{0,0},{1,-5},{0,0}}" /> 53 <Property Name="InheritsAlpha" Value="False" /> 54 <Property Name="HorzFormatting" Value="WordWrapLeftAligned" /> 55 <Property Name="VertFormatting" Value="TopAligned" /> 56 <Property Name="FrameEnabled" Value="false" /> 57 <Property Name="Text" Value="Quest Description"/> 58 </Window> 59 60 <Window Type="MenuWidgets/Listbox" Name="orxonox/QuestGUI/Quest/SubquestsList"> 61 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 62 <Property Name="InheritsAlpha" Value="False" /> 63 <Event Name="ItemSelectionChanged" Function="QuestGUI.changeToSubquest_clicked"/> 64 </Window> 65 66 <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/Quest/Hints"> 67 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{0,0}}" /> 68 <Property Name="InheritsAlpha" Value="False" /> 69 <Property Name="VertFormatting" Value="TopAligned" /> 70 <Property Name="FrameEnabled" Value="false" /> 71 <Property Name="Text" Value="Hints:" /> 72 </Window> 73 </Window> 74 </Window> 75 </Window> 14 76 </Window> 15 16 <Window Type="MenuWidgets/Listbox" Name="orxonox/QuestGUI/QuestsList">17 <Property Name="UnifiedPosition" Value="{{0.07,0},{0.18,0}}" />18 <Property Name="UnifiedSize" Value="{{0.86,0},{0.8,0}}" />19 <Property Name="Alpha" Value="0.8" />20 </Window>21 22 77 </Window> 23 78 </GUILayout> -
code/trunk/data/gui/scripts/NotificationLayer.lua
r8351 r8706 4 4 5 5 P.queueList = {} 6 P.editMode = false7 6 8 7 P.sampleWindow = nil … … 17 16 function P.createQueue(name, size) 18 17 local root = winMgr:getWindow("orxonox/NotificationLayer/Root") 19 local queue = winMgr:createWindow("MenuWidgets/Listbox", "orxonox/NotificationLayer/Root/Queue/" .. name) 20 queue:setProperty("BackgroundColor", "00FFFFFF") -- Set background to be fully transparent. 18 --local queue = winMgr:createWindow("MenuWidgets/Listbox", "orxonox/NotificationLayer/Root/Queue/" .. name) 19 --queue:setProperty("BackgroundColor", "00FFFFFF") -- Set background to be fully transparent. 20 local queue = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/NotificationLayer/Root/Queue/" .. name) 21 queue:setProperty("Alpha", 0.0) 22 --queue:setProperty("FrameEnabled", "false") 21 23 root:addChildWindow(queue) 22 23 queue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))24 queue:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, 0), CEGUI.UDim(0, P.queueHeightHelper(queue, size))))25 24 26 25 local queueTuple = 27 26 { 28 ["window"] = queue, 29 ["name"] = name, 30 ["edit"] = nil, 31 ["visible"] = false 27 ["window"] = queue, 28 ["name"] = name, 29 ["maxSize"] = size, 30 ["visible"] = false, 31 ["fontSize"] = 12, 32 ["fontColor"] = "FFFFFFFF", 33 ["alignment"] = "LeftAligned", 34 ["items"] = {}, 35 ["first"] = 1, 36 ["last"] = 1 32 37 } 38 39 queue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0))) 40 queue:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, 0), CEGUI.UDim(0, P.queueHeightHelper(queueTuple, size)))) 33 41 34 42 P.queueList[name] = queueTuple -- name access … … 41 49 42 50 if queue ~= nil then 51 queue.window:getParent():removeChildWindow(queue.window) 43 52 winMgr:destroyWindow(queue.window) 44 53 end … … 52 61 return 53 62 end 54 item = CEGUI.createListboxTextItem(notification) 55 local listbox = CEGUI.toListbox(queue.window) 56 -- Add the item to the top of the listbox. 57 if listbox:getItemCount() == 0 then 58 listbox:addItem(item) 59 else 60 listbox:insertItem(item, listbox:getListboxItemFromIndex(0)) 61 end 63 64 if not guiMgr:usingOldCEGUI() then 65 notification = string.gsub(notification, "%[", "\\%[") -- escape '[' which is used to format text since cegui 0.7 66 end 67 68 local item = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/Queue/" .. queueName .. "/" .. queue.last) 69 item:setText(notification) 70 P.setItemFontHelper(item, queue, true) 71 -- Add the item to the top of the queue. 72 local itemHeight = P.itemHeightHelper(queue) 73 if queue.last-queue.first > 0 then -- If the queue is not empty move all items down 74 for i=queue.first,queue.last-1 do 75 local item = queue.items[i] 76 item:setYPosition(CEGUI.UDim(0, itemHeight*(queue.last-i))) 77 end 78 end 79 queue.window:addChildWindow(item) 80 item:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(0, itemHeight))) 81 item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0))) 82 item:setProperty("Alpha", 1.0) 83 item:setProperty("InheritsAlpha", "false") 84 item:setProperty("BackgroundEnabled", "false") 85 item:setProperty("FrameEnabled", "false") 86 item:setProperty("HorzFormatting", queue.alignment) 87 queue.items[queue.last] = item 88 queue.last = queue.last+1 62 89 63 90 -- If the queue has been invisible, set it to visible. … … 73 100 return 74 101 end 75 local listbox = CEGUI.toListbox(queue.window) 76 -- Removes the item from the bottom of the listbox. 77 listbox:removeItem(listbox:getListboxItemFromIndex(listbox:getItemCount()-1)) 102 local item = queue.items[queue.first] 103 -- Removes the item from the bottom of the queue. 104 queue.window:removeChildWindow(item) 105 winMgr:destroyWindow(item) 106 queue.first = queue.first+1 78 107 79 108 -- Sets the queue to invisible if there are no more notifications in it. 80 if listbox:getItemCount()== 0 then109 if queue.last-queue.first == 0 then 81 110 P.setVisible(queue, false) 82 111 end 83 112 end 84 113 85 -- Removes a notification at a given index from the queue. 114 -- Removes a notification at a given index from the queue. Where the 0th item is the newest and the nth the (n+1)th newest. 86 115 function P.removeNotification(queueName, index) 87 116 local queue = P.queueList[queueName] … … 89 118 return 90 119 end 91 local listbox = CEGUI.toListbox(queue.window) 120 121 index = queue.last-tonumber(index)-1 122 --if index == queue.first then -- If we want to remove the oldest notification, we can just use pop. 123 -- P.popNotification(queueName) 124 -- return 125 --end 126 92 127 -- Removes the item. 93 listbox:removeItem(listbox:getListboxItemFromIndex(tonumber(index))) 128 local item = queue.items[index] 129 queue.window:removeChildWindow(item) 130 winMgr:destroyWindow(item) 131 queue.items[index] = nil 132 133 -- Move the items below, up. 134 local itemHeight = P.itemHeightHelper(queue) 135 local moved = false 136 if index > queue.first then -- Move all older notifications up in the list. 137 for i=index-1,-1,queue.first do 138 cout(0, i) 139 item = queue.items[i] 140 item:setYposition(CEGUI.UDim(0, itemHeight*(queue.last-i-1))) 141 queue.items[i+1] = item 142 end 143 end 144 queue.items[queue.first] = nil 145 queue.first = queue.first+1 94 146 95 147 -- Sets the queue to invisible if there are no more notifications in it. 96 if listbox:getItemCount()== 0 then148 if queue.last-queue.first == 0 then 97 149 P.setVisible(queue, false) 98 150 end … … 105 157 return 106 158 end 107 local listbox = CEGUI.toListbox(queue.window) 108 CEGUI.toListbox(queue.window):resetList() 159 for i=queue.first,queue.last-1 do 160 local item = queue.items[i] 161 queue.window:removeChildWindow(item) 162 winMgr:destroyWindow(item) 163 end 164 queue.items = {} 165 queue.first = 1 166 queue.last = 1 109 167 110 168 -- Sets the queue to invisible. … … 121 179 end 122 180 123 -- Enter the edit mode of the notification layer. 124 function P.enterEditMode() 125 P.editMode = true 126 127 local root = winMgr:getWindow("orxonox/NotificationLayer/Root") 128 129 --Add control frame window. 130 local window = winMgr:createWindow("MenuWidgets/FrameWindow", "orxonox/NotificationLayer/Root/EditMode/ControlWindow") 131 local frame = tolua.cast(window, "CEGUI::FrameWindow") 132 frame:setCloseButtonEnabled(false) 133 frame:setText("NotificationLayer Control Window") 134 frame:setSize(CEGUI.UVector2(CEGUI.UDim(0.7, 0), CEGUI.UDim(0.2, 0))) 135 root:addChildWindow(window) 136 local pane = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/NotificationLayer/Root/EditMode/ControlWindow/ScrollingPane") 137 pane:setSize(CEGUI.UVector2(CEGUI.UDim(1,-20), CEGUI.UDim(1,-30))) 138 pane:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 10), CEGUI.UDim(0, 26))) 139 window:addChildWindow(pane) 140 141 vertOffset = 0 142 horzOffset = 0 143 -- Line to be able to create a new queue. 144 local newQueueTitle = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/EditMode/ControlWindow/NewQueueTitle") 145 newQueueTitle:setText("Create a new NotificationQueue:") 146 local size = getMinTextSize(newQueueTitle) 147 local textHeight = size[1] 148 newQueueTitle:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]), CEGUI.UDim(0, textHeight))) 149 newQueueTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 150 pane:addChildWindow(newQueueTitle) 151 horzOffset = horzOffset + size[2] + 5 152 local newQueueName = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/NotificationLayer/Root/EditMode/ControlWindow/NewQueueName") 153 newQueueName:setProperty("ReadOnly", "set:False") 154 newQueueName:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]), CEGUI.UDim(0, textHeight))) 155 newQueueName:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 156 horzOffset = horzOffset + size[2] + 5 157 pane:addChildWindow(newQueueName) 158 local create = winMgr:createWindow("MenuWidgets/Button", "orxonox/NotificationLayer/Root/EditMode/ControlWindow/CreateNewQueue") 159 create:setText("create") 160 P.sampleWindow:setText("create") 161 size = getMinTextSize(P.sampleWindow) 162 create:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]+20), CEGUI.UDim(0, textHeight))) 163 create:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 164 orxonox.GUIManager:subscribeEventHelper(create, "Clicked", P.name .. ".createNewQueue_clicked") 165 pane:addChildWindow(create) 166 horzOffset = horzOffset + size[2]+20 + 5 167 vertOffset = vertOffset + textHeight + 5 168 169 horzOffset = 0 170 -- Button to leave the edit mode. 171 local leave = winMgr:createWindow("MenuWidgets/Button", "orxonox/NotificationLayer/Root/EditMode/ControlWindow/LeaveEditModeButton") 172 leave:setText("leave Edit Mode") 173 P.sampleWindow:setText("leave Edit Mode") 174 size = getMinTextSize(P.sampleWindow) 175 leave:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]+20), CEGUI.UDim(0, textHeight))) 176 leave:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 177 orxonox.GUIManager:subscribeEventHelper(leave, "Clicked", P.name .. ".leaveEditMode_clicked") 178 pane:addChildWindow(leave) 179 horzOffset = horzOffset + size[2]+20 + 5 180 vertOffset = vertOffset + textHeight + 5 181 182 --Replace all queues with FrameWindows 183 for k,v in pairs(P.queueList) do 184 if v ~= nil then 185 local queue = P.queueList[k] 186 -- Remove the window that displays the queue from the root window such that it is no longer displayed. 187 root:removeChildWindow(v.window) 188 189 -- Create the frame window, with options to edit the queue, that is displayed instead of the queue. 190 local window = P.createQueueEditFrame(v.name) 191 window:setArea(v.window:getArea()) -- Set the frame window size and position to the same as the queue. 192 193 v.edit = window 194 end 195 end 196 end 197 198 -- Helper function. Creates a frame for the input queue. 199 function P.createQueueEditFrame(queueName) 200 local root = winMgr:getWindow("orxonox/NotificationLayer/Root") 201 202 window = winMgr:createWindow("MenuWidgets/FrameWindow", "orxonox/NotificationLayer/Root/EditMode/" .. queueName) 203 local frame = tolua.cast(window, "CEGUI::FrameWindow") 204 frame:setCloseButtonEnabled(true) 205 orxonox.GUIManager:subscribeEventHelper(frame, "CloseClicked", P.name .. ".closeQueue_clicked") 206 frame:setText("NotificationQueue \"" .. queueName .. "\"") 207 root:addChildWindow(window) 208 local pane = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/ScrollingPane") 209 pane:setSize(CEGUI.UVector2(CEGUI.UDim(1,-20), CEGUI.UDim(1,-30))) 210 pane:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 10), CEGUI.UDim(0, 26))) 211 window:addChildWindow(pane) 212 213 local horzOffset = 0 214 local vertOffset = 0 215 216 -- The line that lets you edit the targets of the queue. 217 local targetsTitle = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/TargetsTitle") 218 targetsTitle:setText("Targets:") 219 local size = getMinTextSize(targetsTitle) 220 local textHeight = size[1] 221 targetsTitle:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]), CEGUI.UDim(0, textHeight))) 222 targetsTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 223 pane:addChildWindow(targetsTitle) 224 horzOffset = horzOffset + size[2] + 5 225 local targets = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Targets") 226 targets:setProperty("ReadOnly", "set:False") 227 local targetsText = orxonox.NotificationManager:getInstance():getQueue(queueName):getTargets() 228 targets:setText(targetsText) 229 P.sampleWindow:setText(targetsText) 230 size = getMinTextSize(P.sampleWindow) 231 targets:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]*2+20), CEGUI.UDim(0, textHeight))) 232 targets:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 233 horzOffset = horzOffset + size[2]*2+20 + 5 234 pane:addChildWindow(targets) 235 local save = winMgr:createWindow("MenuWidgets/Button", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Targets/Save") 236 save:setText("save") 237 P.sampleWindow:setText("save") 238 size = getMinTextSize(P.sampleWindow) 239 local saveTextWidth = size[2]+20 240 save:setSize(CEGUI.UVector2(CEGUI.UDim(0, saveTextWidth), CEGUI.UDim(0, textHeight))) 241 save:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 242 orxonox.GUIManager:subscribeEventHelper(save, "Clicked", P.name .. ".saveTargets_clicked") 243 pane:addChildWindow(save) 244 horzOffset = horzOffset + saveTextWidth 245 vertOffset = vertOffset + textHeight + 5 246 247 horzOffset = 0 248 -- The line that lets you edit the size of the queue. 249 local sizeTitle = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/SizeTitle") 250 sizeTitle:setText("Size:") 251 size = getMinTextSize(sizeTitle) 252 sizeTitle:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]), CEGUI.UDim(0, textHeight))) 253 sizeTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 254 pane:addChildWindow(sizeTitle) 255 horzOffset = horzOffset + size[2] + 5 256 local queueSize = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Size") 257 queueSize:setProperty("ReadOnly", "set:False") 258 local maxSize = orxonox.NotificationManager:getInstance():getQueue(queueName):getMaxSize() 259 queueSize:setText(maxSize) 260 P.sampleWindow:setText(maxSize) 261 size = getMinTextSize(P.sampleWindow) 262 queueSize:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]*2+20), CEGUI.UDim(0, textHeight))) 263 queueSize:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 264 horzOffset = horzOffset + size[2]*2+20 + 5 265 pane:addChildWindow(queueSize) 266 save = winMgr:createWindow("MenuWidgets/Button", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Size/Save") 267 save:setText("save") 268 P.sampleWindow:setText("save") 269 size = getMinTextSize(P.sampleWindow) 270 local saveTextWidth = size[2]+20 271 save:setSize(CEGUI.UVector2(CEGUI.UDim(0, saveTextWidth), CEGUI.UDim(0, textHeight))) 272 save:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 273 orxonox.GUIManager:subscribeEventHelper(save, "Clicked", P.name .. ".saveSize_clicked") 274 pane:addChildWindow(save) 275 horzOffset = horzOffset + saveTextWidth 276 vertOffset = vertOffset + textHeight + 5 277 278 horzOffset = 0 279 -- The line that lets you edit the display time of the queue. 280 local displayTimeTitle = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTimeTitle") 281 displayTimeTitle:setText("Display time:") 282 size = getMinTextSize(displayTimeTitle) 283 displayTimeTitle:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]), CEGUI.UDim(0, textHeight))) 284 displayTimeTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 285 pane:addChildWindow(displayTimeTitle) 286 horzOffset = horzOffset + size[2] + 5 287 local displayTime = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTime") 288 displayTime:setProperty("ReadOnly", "set:False") 289 local time = orxonox.NotificationManager:getInstance():getQueue(queueName):getDisplayTime() 290 displayTime:setText(time) 291 P.sampleWindow:setText(time) 292 size = getMinTextSize(P.sampleWindow) 293 displayTime:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]*2+20), CEGUI.UDim(0, textHeight))) 294 displayTime:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 295 horzOffset = horzOffset + size[2]*2+20 + 5 296 pane:addChildWindow(displayTime) 297 save = winMgr:createWindow("MenuWidgets/Button", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTime/Save") 298 save:setText("save") 299 P.sampleWindow:setText("save") 300 size = getMinTextSize(P.sampleWindow) 301 local saveTextWidth = size[2]+20 302 save:setSize(CEGUI.UVector2(CEGUI.UDim(0, saveTextWidth), CEGUI.UDim(0, textHeight))) 303 save:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset))) 304 orxonox.GUIManager:subscribeEventHelper(save, "Clicked", P.name .. ".saveDisplayTime_clicked") 305 pane:addChildWindow(save) 306 horzOffset = horzOffset + saveTextWidth 307 vertOffset = vertOffset + textHeight + 5 308 309 return window 310 end 311 312 -- Leave the edit mode. 313 function P.leaveEditMode() 314 P.editMode = false 315 316 local root = winMgr:getWindow("orxonox/NotificationLayer/Root") 317 --Replace all queues with FrameWindows 318 for k,v in pairs(P.queueList) do 319 if v ~= nil then 320 -- Add the queue window to the root window to have it displayed again. 321 root:addChildWindow(v.window) 322 -- Set the size and position of the queue window to the size and position of the queue edit frame. 323 v.window:setArea(v.edit:getArea()) 324 -- Destroy the edit frame. 325 winMgr:destroyWindow(v.edit) 326 v.edit = nil 327 end 328 end 329 330 --Remove control window 331 winMgr:destroyWindow(winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/ControlWindow")) 332 end 333 334 -- Is called after the sheet has been hidden. 335 function P.onQuit() 336 -- If we leave the edit mode we show the sheet again. 337 if P.editMode then 338 P.leaveEditMode() 339 showMenuSheet(P.name, false, true) 340 end 341 end 342 343 -- If the button to save the targets of a queue has been clicked. 344 function P. saveTargets_clicked(e) 345 local we = CEGUI.toWindowEventArgs(e) 346 local name = we.window:getName() 347 348 local match = string.gmatch(name, "EditMode/.*/Targets/Save") 349 local nameStr = match() 350 local queueName = string.sub(nameStr, 10, string.len(nameStr)-13) 351 352 local window = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Targets") 353 local save = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Targets/Save") 354 local width = window:getWidth():asAbsolute(1) 355 356 local queue = orxonox.NotificationManager:getInstance():getQueue(queueName) 357 -- Set the new targets. 358 queue:setTargets(window:getText()) 359 local targets = queue:getTargets() 360 361 window:setText(targets) 362 P.sampleWindow:setText(targets) 363 local size = getMinTextSize(P.sampleWindow) 364 -- Adjust the width of the targets field. 365 window:setWidth(CEGUI.UDim(0, size[2]*2+20)) 366 -- Adjust the position of the save button after the targets field. 367 save:setXPosition(CEGUI.UDim(0, save:getXPosition():asAbsolute(1)-width+window:getWidth():asAbsolute(1))) 368 end 369 370 -- If the button to save the size if a queue has been clicked. 371 function P. saveSize_clicked(e) 372 local we = CEGUI.toWindowEventArgs(e) 373 local name = we.window:getName() 374 375 local match = string.gmatch(name, "EditMode/.*/Size/Save") 376 local nameStr = match() 377 local queueName = string.sub(nameStr, 10, string.len(nameStr)-10) 378 379 local window = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Size") 380 local save = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Size/Save") 381 local width = window:getWidth():asAbsolute(1) 382 383 local queue = orxonox.NotificationManager:getInstance():getQueue(queueName) 384 -- Set the new size. 385 queue:setMaxSize(tonumber(window:getText())) 386 local maxSize = queue:getMaxSize() 387 388 window:setText(maxSize) 389 P.sampleWindow:setText(maxSize) 390 local size = getMinTextSize(P.sampleWindow) 391 -- Adjust the width of the size field. 392 window:setWidth(CEGUI.UDim(0, size[2]*2+20)) 393 -- Adjust the position of the save button after the size field. 394 save:setXPosition(CEGUI.UDim(0, save:getXPosition():asAbsolute(1)-width+window:getWidth():asAbsolute(1))) 395 end 396 397 -- If the button to save the display time if a queue has been clicked. 398 function P. saveDisplayTime_clicked(e) 399 local we = CEGUI.toWindowEventArgs(e) 400 local name = we.window:getName() 401 402 local match = string.gmatch(name, "EditMode/.*/DisplayTime/Save") 403 local nameStr = match() 404 local queueName = string.sub(nameStr, 10, string.len(nameStr)-17) 405 406 local window = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTime") 407 local save = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTime/Save") 408 local width = window:getWidth():asAbsolute(1) 409 410 local queue = orxonox.NotificationManager:getInstance():getQueue(queueName) 411 -- Set the new display time. 412 queue:setDisplayTime(tonumber(window:getText())) 413 local time = queue:getDisplayTime() 414 415 window:setText(time) 416 P.sampleWindow:setText(time) 417 local size = getMinTextSize(P.sampleWindow) 418 -- Adjust the width of the display time field. 419 window:setWidth(CEGUI.UDim(0, size[2]*2+20)) 420 -- Adjust the position of the save button after the display time field. 421 save:setXPosition(CEGUI.UDim(0, save:getXPosition():asAbsolute(1)-width+window:getWidth():asAbsolute(1))) 422 end 423 424 -- if the button to create a new queue has been clicked. 425 function P.createNewQueue_clicked(e) 426 local window = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/ControlWindow/NewQueueName") 427 local name = window:getText() 428 429 local queue = P.queueList[name] 430 -- Test if a queue with that name already exists. 431 if queue ~= nil then 432 window:setText("Queue with that name already exists.") 433 return 434 end 435 436 -- Creates the new queue. 437 orxonox.NotificationManager:getInstance():createQueue(name) 438 439 queue = P.queueList[name] 440 if queue == nil then 441 return 442 end 443 444 -- Create the frame that represents the queue in edit mode, since that's what we're in. 445 local frame = P.createQueueEditFrame(name) 446 local root = winMgr:getWindow("orxonox/NotificationLayer/Root") 447 -- Remove the queue window from the root window, since we're in edit mode. 448 root:removeChildWindow(queue.window) 449 -- Set the frame window size and position to that of the queue window. 450 frame:setArea(queue.window:getArea()) 451 queue.edit = frame 452 453 -- Reset the text to create a new queue. 454 window:setText("") 455 end 456 457 -- If the button to leave the edit mode has been clicked. 458 function P.leaveEditMode_clicked(e) 459 hideMenuSheet(P.name) 460 end 461 462 -- If the button to close the queue has been clicked. 463 function P.closeQueue_clicked(e) 464 local we = CEGUI.toWindowEventArgs(e) 465 local name = we.window:getName() 466 467 local match = string.gmatch(name, "EditMode/.*") 468 local nameStr = match() 469 local queueName = string.sub(nameStr, 10, string.len(nameStr)) 470 471 -- Destroy the frame window, 472 winMgr:destroyWindow(P.queueList[queueName].edit) 473 P.queueList[queueName].edit = nil 474 -- Destroy the queue. 475 orxonox.NotificationManager:getInstance():getQueue(queueName):destroy() 181 -- Change the position of the queue. 182 -- The parameters are (in order) 'name of the queue', 'relative x-position', 'absolute x-position in pixel', 'relative y-position', 'absolute y-position in pixel'. 183 function P.moveQueue(queueName, relativeXPos, absoluteXPos, relativeYpos, absoluteYPos) 184 local queueWindow = P.queueList[queueName].window 185 queueWindow:setPosition(CEGUI.UVector2(CEGUI.UDim(relativeXPos, absoluteXPos), CEGUI.UDim(relativeYpos, absoluteYPos))) 186 end 187 188 -- Change the size of the queue. 189 -- The parameters are (in order) 'name of the queue', 'relative width', 'absolute width in pixel', 'relative height', 'absolute heigth in pixel'. 190 -- Additionally the last two parameters can be ommitted, which leads to the height being set such that all notifications can be displayed. using the size of the queue. 191 function P.resizeQueue(queueName, relativeWidth, absoluteWidth, relativeHeight, absoluteHeigth) 192 local queue = P.queueList[queueName] 193 local queueWindow = queue.window 194 if queueWindow == nil then 195 return 196 end 197 if absoluteHeigth == nil then 198 absoluteHeigth = P.queueHeightHelper(queue, queue.maxSize) 199 relativeHeight = 0 200 end 201 queueWindow:setSize(CEGUI.UVector2(CEGUI.UDim(relativeWidth, absoluteWidth), CEGUI.UDim(relativeHeight, absoluteHeigth))) 202 end 203 204 -- Change the horizontal alignment of the displayed notifications. 205 -- The parameters are the name of the queue and the alignment parameter, 206 function P.changeQueueAlignment(queueName, alignment) 207 local queue = P.queueList[queueName] 208 local queueWindow = queue.window 209 if queueWindow == nil then 210 return 211 end 212 213 queue.alignment = alignment 214 local item = nil 215 for i=queue.first,queue.last-1 do 216 item = queue.items[i] 217 item:setProperty("HorzFormatting", queue.alignment) 218 end 219 end 220 221 -- Change the font size of all notifications in a queue. 222 -- The parameters are (in order) 'name of the queue', 'font size'. 223 function P.changeQueueFontSize(queueName, size) 224 local queue = P.queueList[queueName] 225 local queueWindow = queue.window 226 if queueWindow == nil then 227 return 228 end 229 230 queue.fontSize = size 231 for i=queue.first,queue.last-1 do 232 P.setItemFontHelper(queue.items[i], queue, false) 233 end 234 end 235 236 -- Change the font color of all notifications in a queue. 237 -- The parameters are (in order) 'name of the queue', 'ARGB of the font color in hex notation'. 238 function P.changeQueueFontColor(queueName, color) 239 local queue = P.queueList[queueName] 240 local queueWindow = queue.window 241 if queueWindow == nil then 242 return 243 end 244 245 queue.fontColor = color 246 for i=queue.first,queue.last-1 do 247 P.setItemFontHelper(queue.items[i], queue, true) 248 end 249 end 250 251 -- Helper function to set the font size and color of a item of a queue. 252 -- The parameters are (in order) 'the ListboxItem', 'the queue table', 'whether color should be changed as well' 253 function P.setItemFontHelper(item, queue, changeColor) 254 --local item = tolua.cast(item, "CEGUI::ListboxTextItem") 255 local fontMgr = CEGUI.FontManager:getSingleton() 256 if (fontMgr["isFontPresent"] and fontMgr:isFontPresent("BlueHighway-" .. queue.fontSize)) or -- cegui 0.6 257 (fontMgr["isDefined"] and fontMgr:isDefined("BlueHighway-" .. queue.fontSize)) then -- cegui 0.7 258 item:setFont("BlueHighway-" .. queue.fontSize) 259 else 260 orxonox.GUIManager:addFontHelper("BlueHighway-" .. queue.fontSize, queue.fontSize, "bluehigh.ttf") 261 item:setFont("BlueHighway-" .. queue.fontSize) 262 end 263 if changeColor then 264 item:setProperty("TextColours", "tl:" .. queue.fontColor .. " tr:" .. queue.fontColor .. " bl:" .. queue.fontColor .. " br:" .. queue.fontColor .. "") 265 end 476 266 end 477 267 478 268 -- Helper function. Returns height a queue needs to have to display 'size' items. 479 269 function P.queueHeightHelper(queue, size) 480 local listbox = CEGUI.toListbox(queue) 481 local item = CEGUI.createListboxTextItem("Text") 482 listbox:addItem(item) 483 local singleItemHeight = listbox:getTotalItemsHeight() 484 local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(queue:getLookNFeel()) 485 local formattedArea = lookAndFeel:getNamedArea("ItemRenderingArea"):getArea():getPixelRect(queue) 486 local frameHeight = queue:getUnclippedOuterRect():getHeight() - formattedArea:getHeight() 487 listbox:removeItem(item) 488 return frameHeight + singleItemHeight*size 270 --local listbox = CEGUI.toListbox(queue.window) 271 --local item = CEGUI.createListboxTextItem("Text") 272 --P.setItemFontHelper(item, queue, false) 273 --listbox:addItem(item) 274 --local singleItemHeight = listbox:getTotalItemsHeight() 275 local singleItemHeight = P.itemHeightHelper(queue) 276 --local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(queue.window:getLookNFeel()) 277 --local formattedArea = lookAndFeel:getNamedArea("ItemRenderingArea"):getArea():getPixelRect(queue.window) 278 --local frameHeight = queue.window:getUnclippedOuterRect():getHeight() - formattedArea:getHeight() 279 --listbox:removeItem(item) 280 --return frameHeight + singleItemHeight*size 281 return singleItemHeight*size + 1 282 end 283 284 function P.itemHeightHelper(queue) 285 local item = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/Test/") 286 item:setText("text") 287 P.setItemFontHelper(item, queue, true) 288 queue.window:addChildWindow(item) 289 item:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(1, 0))) 290 item:setProperty("FrameEnabled", "false") 291 local height = getStaticTextWindowHeight(item) 292 queue.window:removeChildWindow(item) 293 winMgr:destroyWindow(item) 294 return height 489 295 end 490 296 -
code/trunk/data/gui/scripts/QuestGUI.lua
r7732 r8706 3 3 local P = createMenuSheet("QuestGUI") 4 4 5 P.rootWindow = nil 6 P.detailsWindows = {} 5 P.questManager = nil -- The QuestManager. 6 P.showActive = true -- Whether the active or finished quest list is displayed. 7 P.currentQuest = nil -- The quest that is currently displayed. 8 P.player = nil -- The player the quests are displayed for. 7 9 P.quests = {} 8 P.hints = {} 9 P.player = nil 10 P.subquests = {} 10 11 11 12 -- design parameters 12 P.indentWidth = 2013 13 P.scrollbarWidth = 13 14 P.buttonHeight = 30 14 P.frameHeigth = 18 15 P.borderSize = 5 15 16 P.titleHeight = 26 16 P.borderWidth = 5 17 18 --TODO: 19 -- Highlight whether we are currently looking at active or finished quests 20 -- Distinguish completed from failed quests 21 22 function P.onLoad() 23 P.questManager = orxonox.QuestManager:getInstance() -- Store the pointer to the QuestManager as an internal variable to allow for faster access, 24 end 17 25 18 26 function P.onShow() 19 20 local questsList = winMgr:getWindow("orxonox/QuestGUI/QuestsList") 21 27 -- Get the player. 22 28 P.player = orxonox.GUIManager:getInstance():getPlayer(P.name) 23 P.rootWindow = P.createQuestGUI() 24 25 questsList:addChildWindow(P.rootWindow) 26 end 27 28 function P.onHide() 29 P.cleanup() 30 end 31 29 30 -- Load the list of quests to be displayed. 31 P.loadQuestsList(P.currentQuest) 32 end 33 34 -- Loads the list of quests, depending on P.showActive, either the active (P.showActive == true) or the finished, i.e. inactive quests are loaded. 35 -- selectQuest is a pointer to a quest that should be selected, if it is nil the first quest is selected. 36 function P.loadQuestsList(selectQuest) 37 local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList")) 38 P.clearQuestList() 39 40 local selectQuestId = nil 41 if selectQuest ~= nil then 42 selectQuestId = P.questManager:getId(selectQuest) 43 end 44 45 -- Iterate through all root-quests. 46 local numRootQuests = P.questManager:getNumRootQuests(P.player) 47 if numRootQuests > 0 then 48 local i = 0 49 while i <= numRootQuests-1 do 50 local quest = P.questManager:getRootQuest(P.player, i) 51 -- Insert the current quest into the list. 52 local item = P.insertQuest(list, quest) 53 -- If the quest was inserted in the list and is has the same id as the selectQuest (thus it is the same quest) it is selected. 54 if selectQuestId ~= nil and item ~= nil and selectQuestId == P.questManager:getId(quest) then 55 list:setItemSelectState(item, true) 56 end 57 -- Insert all subquests of this rootquest. 58 P.insertSubQuests(list, quest, selectQuestId) 59 i = i+1 60 end 61 -- If there were quests added to the list but there was no selectQuest specified (i.e. selectQuest was nil), the first item is selected. 62 if list:getItemCount() > 0 then 63 if selectQuestId == nil then 64 list:setItemSelectState(list:getListboxItemFromIndex(0), true) -- Select first quest. 65 end 66 -- If there werent any quests added the standard "no quests" message is loaded. 67 else 68 P.loadQuest() 69 end 70 end 71 end 72 73 -- Helper function, recursively inserts all the (active or inactive, depending on P.showActive) subquests of the input quest. 74 -- list is the list into which the subquests should be insterted. 75 -- quest is the quest, whose subquests should be inserted. 76 -- selectQuestId is the id of the quest that should be selected. 77 function P.insertSubQuests(list, quest, selectQuestId) 78 -- Iterate through all sub-quests. 79 local numQuests = P.questManager:getNumSubQuests(quest, P.player) 80 if numQuests > 0 then 81 local i = 0 82 while i <= numQuests-1 do 83 local subquest = P.questManager:getSubQuest(quest, P.player, i) 84 -- Insert the current quest into the list. 85 local item = P.insertQuest(list, subquest) 86 -- If the quest was inserted in the list and is has the same id as the selectQuest (thus it is the same quest) it is selected. 87 if selectQuestId ~= nil and item ~= nil and selectQuestId == P.questManager:getId(subquest) then 88 list:setItemSelectState(item, true) 89 end 90 i = i+1 91 end 92 end 93 end 94 95 -- Helper function, inserts a quest into the list (depending whether active or inactive quests are being shown). Returns nil if the quest was not inserted. 96 -- list is the list into which the quets should be inserted. 97 -- quest is the quest to be inserted. 98 function P.insertQuest(list, quest) 99 if P.showActive == quest:isActive(P.player) then 100 local item = CEGUI.createListboxTextItem(P.questManager:getDescription(quest):getTitle()) 101 item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush") 102 list:addItem(item) 103 table.insert(P.quests, quest) 104 return item 105 end 106 return nil 107 end 108 109 -- Loads the input quest. 110 -- quest the quest to be loaded. 111 function P.loadQuest(quest) 112 113 P.clearQuest() -- Clear the old quest. 114 if quest == nil then -- If quets is nil there is nothing to display. 115 return 116 else 117 local offset = 0 118 119 -- Load title and description 120 local description = P.questManager:getDescription(quest) 121 local titleWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Title") 122 titleWindow:setText(description:getTitle()) 123 local descriptionWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Description") 124 descriptionWindow:setText(description:getDescription()) 125 descriptionWindow:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(1, 0))) 126 descriptionWindow:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, P.borderSize))) 127 local height = getStaticTextWindowHeight(descriptionWindow) 128 descriptionWindow:setHeight(CEGUI.UDim(0, height)) 129 offset = offset + height 130 131 -- Load subquests 132 local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/Quest/SubquestsList")) 133 local numQuests = P.questManager:getNumSubQuests(quest, P.player) 134 local i = 0 135 while i <= numQuests-1 do 136 local quest = P.questManager:getSubQuest(quest, P.player, i) 137 local item = CEGUI.createListboxTextItem(P.questManager:getDescription(quest):getTitle()) 138 item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush") 139 list:addItem(item) 140 table.insert(P.subquests, quest) 141 i = i+1 142 end 143 height = list:getTotalItemsHeight() 144 if height > 0 then 145 height = height+P.frameHeigth 146 end 147 list:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(0, height))) 148 list:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, offset))) 149 offset = offset + height + P.borderSize 150 151 -- Load hints 152 local hintsWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Hints") 153 hintsWindow:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, offset))) 154 hintsWindow:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(0, 0))) 155 height = P.titleHeight 156 local numHints = P.questManager:getNumHints(quest, P.player) 157 local i = 0 158 while i <= numHints-1 do 159 local hint = P.questManager:getHints(quest, P.player, i) 160 height = height + P.insertHint(hintsWindow, hint, i, height) 161 i = i+1 162 end 163 if numHints == 0 then 164 height = 0 165 end 166 hintsWindow:setHeight(CEGUI.UDim(0, height)) 167 offset = offset + height 168 169 -- Set the size of the wrapper 170 local window = winMgr:getWindow("orxonox/QuestGUI/Quest/Wrapper") 171 window:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize-P.scrollbarWidth), CEGUI.UDim(0,offset+P.borderSize))) 172 end 173 174 P.currentQuest = quest 175 end 176 177 -- Clear the currently displayed quest. 178 function P.clearQuest() 179 -- clear title 180 local titleWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Title") 181 titleWindow:setText("no Quests") 182 183 -- clear description 184 local descriptionWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Description") 185 descriptionWindow:setText("There is currently no quest that can be displayed.") 186 187 -- clear list fo subquests 188 local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/Quest/SubquestsList")) 189 list:resetList() 190 list:setHeight(CEGUI.UDim(0, 0)) 191 P.subquests = {} 192 193 -- clear hints 194 local hints = winMgr:getWindow("orxonox/QuestGUI/Quest/Hints") 195 local numChildren = hints:getChildCount()-2 -- TODO: HACK 196 local i = 0 197 while i < numChildren do 198 local hint = hints:getChild("orxonox/QuestGUI/Quest/Hints/" .. i) 199 if hint ~= nil then 200 hints:removeChildWindow(hint) 201 winMgr:destroyWindow(hint) 202 end 203 i = i+1 204 end 205 hints:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.scrollbarWidth-P.borderSize), CEGUI.UDim(0, 0))) 206 207 P.currentQuest = nil 208 end 209 210 -- Clear the quests list 211 function P.clearQuestList() 212 local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList")) 213 list:resetList() 214 P.quests = {} 215 end 216 217 -- Select an input quest in the input list. 218 -- list is the list in which the input quest is to be selected. 219 -- quest is the quest to be selected. 220 function P.selectQuest(list, quest) 221 if quest == nil then -- If the input quest is nil, there is nothing to be selected, an error is output and the first quest is selected instead. 222 cout(1, "Error in QuestGUI: selectQuest(), input quest is nil. Selecting first.") 223 list:setItemSelectState(list:getListboxItemFromIndex(0), true) -- Select first 224 return 225 end 226 227 local questId = P.questManager:getId(quest) 228 local found = false 229 local index = 0 230 -- Iterate over all quests currently in the list. 231 for k,v in pairs(P.quests) do 232 -- If the id's are the same we have found the quest. 233 if P.questManager:getId(v) == questId then 234 found = true 235 index = k-1 236 end 237 end 238 239 if found then -- If the quest was found it is selected. 240 list:setItemSelectState(list:getListboxItemFromIndex(index), true) 241 else -- If the quest isn't found an error is output and the first quest is selected instead. 242 cout(1, "Error in QuestGUI: selectQuest(), input quest is not in list. Selecting first.") 243 list:setItemSelectState(list:getListboxItemFromIndex(0), true) -- Select first 244 end 245 end 246 247 -- Helper function, insert the input hint into the input hintsWindow. Returns the height of the newly inserted hint. 248 -- hintsWindow is the window in which the hint is to be inserted. 249 -- hint is the hint to be inserted. 250 -- index is the index of the hint. 251 -- offset is the current offset in the hintsWindow. 252 function P.insertHint(hintsWindow, hint, index, offset) 253 -- Create the window for the hint. 254 local window = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/QuestGUI/Quest/Hints/" .. index) 255 window:setProperty("HorzFormatting", "WordWrapLeftAligned") 256 window:setProperty("VertFormatting", "TopAligned") 257 window:setProperty("FrameEnabled", "false") 258 window:setID(index) 259 hintsWindow:addChildWindow(window) 260 local description = P.questManager:getDescription(hint) 261 window:setText(description:getDescription()) 262 window:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(1, 0))) 263 local height = getStaticTextWindowHeight(window) 264 window:setHeight(CEGUI.UDim(0, height)) 265 window:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, offset))) 266 return height 267 end 268 269 -- Show the currently active quests in the quests list. 270 function P.showActiveQuestsButton_clicked(e) 271 if P.showActive == false then 272 P.showActive = true 273 P.loadQuestsList() 274 end 275 end 276 277 -- Show the finished (i.e. inactive) quests in the quests list. 278 function P.showFinishedQuestsButton_clicked(e) 279 if P.showActive == true then 280 P.showActive = false 281 P.loadQuestsList() 282 end 283 end 284 285 -- Change to a new quest. 286 function P.changeQuest_clicked(e) 287 local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList")) 288 local choice = list:getFirstSelectedItem() 289 if choice ~= nil then 290 local index = list:getItemIndex(choice) 291 local quest = P.quests[index+1] 292 if quest ~= nil then 293 P.loadQuest(quest) 294 end 295 end 296 end 297 298 -- Change to a new subquest. 299 function P.changeToSubquest_clicked(e) 300 local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/Quest/SubquestsList")) 301 local questsList = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList")) 302 local choice = list:getFirstSelectedItem() 303 if choice ~= nil then 304 local index = list:getItemIndex(choice) 305 local quest = P.subquests[index+1] 306 if quest ~= nil then 307 -- If the P.showActive must be changed to display the quest the quests list also has to be regenerated. 308 if quest:isActive(P.player) == P.showActive then 309 P.selectQuest(questsList, quest) 310 else 311 P.showActive = quest:isActive(P.player) 312 P.loadQuestsList(quest) 313 end 314 else 315 cout(1, "Error in QuestGUI: changeToSubquest(), quest was nil. Ignoring...") 316 end 317 end 318 end 319 320 -- old: 321 --[[ 32 322 function P.createQuestGUI() 33 323 local questManager = orxonox.QuestManager:getInstance() … … 283 573 winMgr:destroyWindow(P.detailsWindows[detailsNr]) 284 574 P.detailsWindows[detailsNr] = nil 285 end 575 end --]] 286 576 287 577 return P -
code/trunk/data/gui/scripts/SingleplayerMenu.lua
r8079 r8706 54 54 index = index + 1 55 55 end 56 56 57 for k,v in pairs(P.levelList) do 57 58 local item = CEGUI.createListboxTextItem(v:getName()) -
code/trunk/data/levels/FPSTest.oxw
r8079 r8706 21 21 <Template link=lodtemplate_default /> 22 22 </templates> 23 <?lua include("includes/notifications.oxi") ?> 23 24 24 25 <Scene -
code/trunk/data/levels/asteroids.oxw
r8079 r8706 14 14 <Template link=lodtemplate_default /> 15 15 </templates> 16 <?lua include("includes/notifications.oxi") ?> 16 17 17 18 <Scene -
code/trunk/data/levels/dynamicMatch.oxw
r8079 r8706 16 16 <Template link=lodtemplate_default /> 17 17 </templates> 18 <?lua include("includes/notifications.oxi") ?> 18 19 19 20 <Scene -
code/trunk/data/levels/earth.oxw
- Property svn:eol-style set to native
r8498 r8706 19 19 <Template link="lodtemplate_default" /> 20 20 </templates> 21 <?lua include("includes/notifications.oxi") ?> 21 22 22 23 <Template name=PortalDefault> -
code/trunk/data/levels/emptyLevel.oxw
r7679 r8706 12 12 13 13 <?lua 14 include("templates/spaceshipAssff .oxt")14 include("templates/spaceshipAssff2.oxt") 15 15 include("templates/spaceshipPirate.oxt") 16 16 ?> … … 23 23 <Template link=lodtemplate_default /> 24 24 </templates> 25 <?lua include("includes/notifications.oxi") ?> 25 26 26 27 <Scene … … 30 31 31 32 <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> 32 <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />33 <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff2 /> 33 34 34 35 </Scene> -
code/trunk/data/levels/events.oxw
r7679 r8706 20 20 <Template link=lodtemplate_default /> 21 21 </templates> 22 <?lua include("includes/notifications.oxi") ?> 22 23 23 24 <Scene -
code/trunk/data/levels/fightInOurBack.oxw
r8213 r8706 68 68 <Template link=lodtemplate_default /> 69 69 </templates> 70 <?lua include("includes/notifications.oxi") ?> 70 71 71 72 <!-- Ausgang: Szene ===> ambientlight/skybox --> -
code/trunk/data/levels/includes/pickups.oxi
r7163 r8706 202 202 <PickupRepresentation 203 203 pickupName = "Drone Pickup" 204 pickupDescription = "Adds a Drone to the Player s Spaceship"204 pickupDescription = "Adds a Drone to the Player's Spaceship" 205 205 spawnerTemplate = "dronepickupRepresentation" 206 206 > … … 210 210 </PickupRepresentation> 211 211 212 <!-- Shrink Pickup --> 213 214 <PickupRepresentation 215 pickupName = "Small Shrink" 216 pickupDescription = "Shrinks the Ship by a bit" 217 spawnerTemplate = "smallshrinkpickupRepresentation" 218 > 219 <pickup> 220 <ShrinkPickup template=smallshrinkpickup /> 221 </pickup> 222 </PickupRepresentation> 223 224 <PickupRepresentation 225 pickupName = "Medium Shrink" 226 pickupDescription = "Shrinks the Ship" 227 spawnerTemplate = "mediumshrinkpickupRepresentation" 228 > 229 <pickup> 230 <ShrinkPickup template=mediumshrinkpickup /> 231 </pickup> 232 </PickupRepresentation> 233 234 <PickupRepresentation 235 pickupName = "Huge Shrink" 236 pickupDescription = "Shrinks the Ship considerably" 237 spawnerTemplate = "hugeshrinkpickupRepresentation" 238 > 239 <pickup> 240 <ShrinkPickup template=hugeshrinkpickup /> 241 </pickup> 242 </PickupRepresentation> 243 -
code/trunk/data/levels/includes/weaponSettingsAssff.oxi
r7845 r8706 26 26 <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" /> 27 27 <HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" /> 28 <LightningGun mode=1 muzzleoffset="0,0,0" damage= 23/>28 <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 /> 29 29 </Weapon> 30 30 <Weapon> … … 39 39 </Weapon> 40 40 <Weapon> 41 <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage= 50 />42 <RocketFire mode=3 muzzleoffset="0,0,0" damage= 100 />41 <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 /> 42 <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 /> 43 43 </Weapon> 44 44 </WeaponPack> -
code/trunk/data/levels/lastManStanding.oxw
r8178 r8706 23 23 <Template link=lodtemplate_default /> 24 24 </templates> 25 <?lua include("includes/notifications.oxi") ?> 25 26 26 27 <Scene -
code/trunk/data/levels/lastTeamStanding.oxw
r8179 r8706 22 22 <Template link=lodtemplate_default /> 23 23 </templates> 24 <?lua include("includes/notifications.oxi") ?> 24 25 25 26 <Scene … … 27 28 skybox = "Orxonox/skypanoramagen1" 28 29 > 30 <?lua include("includes/notifications.oxi") ?> 29 31 30 32 <?lua -
code/trunk/data/levels/lastTeamStandingII.oxw
r8351 r8706 22 22 <Template link=lodtemplate_default /> 23 23 </templates> 24 <?lua include("includes/notifications.oxi") ?> 24 25 25 26 <Scene -
code/trunk/data/levels/myTestLevel.oxw
- Property svn:eol-style set to native
r8458 r8706 23 23 <Template link=lodtemplate_default /> 24 24 </templates> 25 <?lua include("includes/notifications.oxi") ?> 25 26 26 27 <Scene … … 30 31 31 32 <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> 32 <SpawnPoint team=0 position="0,0,0" lookat="2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />33 <SpawnPoint team=0 position="0,0,0" direction="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /> 33 34 34 <SpaceBoundaries warnDistance="1" maxDistance="200" showDistance="100" healthDecrease="0.1" position="0,0,0"/> 35 <SpaceBoundaries warnDistance="1" maxDistance="200" showDistance="150" reactionMode="0" healthDecrease="0.9" position="0,0,0"/> 36 37 <Billboard position="0,0,0" colour="1.0,1.0,1.0" material="Flares/backlightflare" scale=1 /> 35 38 36 39 </Scene> -
code/trunk/data/levels/notifications.oxw
r7679 r8706 19 19 <Template link=lodtemplate_default /> 20 20 </templates> 21 <?lua include("includes/notifications.oxi") ?> 21 22 22 23 <Scene … … 24 25 skybox = "Orxonox/skypanoramagen1" 25 26 > 26 27 <Script code="showGUI NotificationLayer false true" needsGraphics="true" />28 27 29 28 <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" /> -
code/trunk/data/levels/pickups.oxw
r7679 r8706 23 23 <Template link=lodtemplate_default /> 24 24 </templates> 25 <?lua include("includes/notifications.oxi") ?> 25 26 26 27 <Scene … … 190 191 </PickupSpawner> 191 192 193 <PickupSpawner position="-25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5"> 194 <pickup> 195 <ShrinkPickup template ="smallshrinkpickup"/> 196 </pickup> 197 </PickupSpawner> 198 199 <PickupSpawner position="0,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5"> 200 <pickup> 201 <ShrinkPickup template ="mediumshrinkpickup"/> 202 </pickup> 203 </PickupSpawner> 204 205 <PickupSpawner position="25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5"> 206 <pickup> 207 <ShrinkPickup template ="hugeshrinkpickup"/> 208 </pickup> 209 </PickupSpawner> 210 211 <!--StaticEntity position="0,-200,0" direction="0,-1,0" collisionType=static mass=500 friction=0.01 > 212 <attached> 213 <Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" /> 214 </attached> 215 <collisionShapes> 216 <BoxCollisionShape position="0,0,0" halfExtents="10,10,10" /> 217 </collisionShapes> 218 </StaticEntity--> 219 192 220 </Scene> 193 221 </Level> -
code/trunk/data/levels/pirateAttack.oxw
r8213 r8706 9 9 include("stats.oxo") 10 10 include("templates/spaceshipAssff.oxt") 11 include("templates/spaceshipHXYSL.oxt")12 11 include("templates/spaceshipPirate.oxt") 13 12 include("templates/lodInformation.oxt") … … 35 34 <Template link=lodtemplate_default /> 36 35 </templates> 36 <?lua include("includes/notifications.oxi") ?> 37 37 38 38 <Scene -
code/trunk/data/levels/planets.oxw
r8498 r8706 19 19 <Template link="lodtemplate_default" /> 20 20 </templates> 21 <?lua include("includes/notifications.oxi") ?> 21 22 22 23 <Scene -
code/trunk/data/levels/pong.oxw
r7865 r8706 15 15 <PongBat> 16 16 <camerapositions> 17 <CameraPosition position="0, 200,0" pitch=-90 absolute=true />17 <CameraPosition position="0,150,0" pitch=-90 absolute=true /> 18 18 <CameraPosition position="0,50,160" drag=true mouselook=true /> 19 19 <CameraPosition position="0,40,125" drag=true mouselook=true /> … … 56 56 <Template link=lodtemplate_default /> 57 57 </templates> 58 59 <WorldAmbientSound source="mainmenu.ogg" playOnLoad=true /> 58 <?lua include("includes/notifications.oxi") ?> 59 60 <WorldAmbientSound source="Ganymede.ogg" playOnLoad=true looping=true /> 60 61 61 62 <PongBot /> … … 67 68 <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" /> 68 69 69 <?lua 70 for i = 1, 10, 1 do 71 ?> 72 <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" /> 73 <?lua end ?> 70 <SpawnPoint position="991.729, -110.11, 435.404" orientation="0.534038, 0.563456, 0.212168, 0.593553" /> 74 71 75 72 <MovableEntity rotationrate=5 rotationaxis="0,0,1"> -
code/trunk/data/levels/portals.oxw
- Property svn:eol-style set to native
r8457 r8706 21 21 <Template link=lodtemplate_default /> 22 22 </templates> 23 <?lua include("includes/notifications.oxi") ?> 23 24 24 25 <Scene … … 35 36 </Template> 36 37 37 <PortalEndPoint position="0,0,0" id="1" distance="40" target="MobileEntity" design="PortalDefault" />38 <PortalEndPoint position="- 100,0,0" id="2" distance="40" target="MobileEntity" design="PortalDefault"/>38 <PortalEndPoint position="0,0,0" id="1" distance="40" target="MobileEntity" design="PortalDefault" reenterDelay="0"/> 39 <PortalEndPoint position="-300,0,0" id="2" distance="40" target="MobileEntity" design="PortalDefault" reenterDelay="0"/> 39 40 <PortalLink fromID="1" toID="2" /> 40 41 <PortalLink fromID="2" toID="1" /> -
code/trunk/data/levels/presentation.oxw
r7679 r8706 19 19 <Template link=lodtemplate_default /> 20 20 </templates> 21 <?lua include("includes/notifications.oxi") ?> 21 22 22 23 <Scene -
code/trunk/data/levels/presentation09.oxw
r8079 r8706 21 21 <Template link=lodtemplate_default /> 22 22 </templates> 23 <?lua include("includes/notifications.oxi") ?> 23 24 24 25 <Scene -
code/trunk/data/levels/presentation09b.oxw
r8079 r8706 23 23 <Template link=lodtemplate_default /> 24 24 </templates> 25 <?lua include("includes/notifications.oxi") ?> 25 26 26 27 <Scene -
code/trunk/data/levels/presentationDM.oxw
r8079 r8706 20 20 <Template link=lodtemplate_default /> 21 21 </templates> 22 <?lua include("includes/notifications.oxi") ?> 22 23 23 24 <Scene -
code/trunk/data/levels/presentationFS10.oxw
r7679 r8706 26 26 <Template link=lodtemplate_default /> 27 27 </templates> 28 <?lua include("includes/notifications.oxi") ?> 28 29 29 30 <Scene -
code/trunk/data/levels/presentationFS102.oxw
r8079 r8706 21 21 <Template link=lodtemplate_default /> 22 22 </templates> 23 <?lua include("includes/notifications.oxi") ?> 23 24 24 25 <Scene -
code/trunk/data/levels/presentationFS10Ed.oxw
r8079 r8706 21 21 <Template link=lodtemplate_default /> 22 22 </templates> 23 <?lua include("includes/notifications.oxi") ?> 23 24 24 25 <Scene -
code/trunk/data/levels/presentationFS11.oxw
- Property svn:eol-style set to native
r8465 r8706 13 13 <?lua 14 14 include("templates/spaceshipAssff.oxt") 15 include("templates/spaceshipAssff2.oxt") 15 16 include("templates/spaceshipPirate.oxt") 16 17 ?> … … 27 28 <Template link=lodtemplate_default /> 28 29 </templates> 30 <?lua include("includes/notifications.oxi") ?> 31 32 <NotificationQueueCEGUI 33 name="narrative" 34 targets="simpleNotification" 35 size=1 36 displayTime=30 37 position="0.2, 0, 0.1, 0" 38 fontSize="24" 39 fontColor="0.3, 1, 0.2, 0.8" 40 alignment="HorzCentred" 41 displaySize="0.6, 0, 0, 0" 42 /> 29 43 30 44 <Scene 31 45 ambientlight = "0.8, 0.8, 0.8" 32 skybox = "Orxonox/ Starbox"46 skybox = "Orxonox/skyboxempty" 33 47 > 34 48 … … 38 52 39 53 <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/> 40 <SpawnPoint team=0 position="0,0,0" lookat="2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff /> 41 42 43 <!-- PICKUPS --> 44 <PickupSpawner position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10"> 45 <pickup> 46 <DronePickup template=dronepickup /> 47 </pickup> 48 </PickupSpawner> 49 54 55 <!-- SOUND --> 56 <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" /> 57 <WorldAmbientSound source="Mars.ogg" looping="true"> 58 <events> 59 <activity> 60 <DistanceTrigger position="-72369,803,2" distance=1700 target="Camera" /> 61 </activity> 62 </events> 63 </WorldAmbientSound> 64 <WorldAmbientSound source="Jupiter.ogg" looping="true"> 65 <events> 66 <activity> 67 <DistanceTrigger position="-73450,5067,-351" distance=800 target="Camera" /> 68 </activity> 69 </events> 70 </WorldAmbientSound> 71 72 <!-- EARTH ORBIT --> 73 74 <DistanceTrigger name="spawntrigger" position="0,0,0" target="Pawn" distance=10 stayActive="true" /> 75 <DistanceTrigger name="spawndelaytrigger1" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=1 /> 76 <DistanceTrigger name="spawndelaytrigger2" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=7 /> 77 <DistanceTrigger name="spawndelaytrigger3" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=12 /> 78 <DistanceTrigger name="spawndelaytrigger4" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=15 /> 79 <DistanceTrigger name="spawndelaytrigger5" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=25 /> 80 <DistanceTrigger name="spawndelaytrigger6" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=35 /> 81 <DistanceTrigger name="spawndelaytrigger7" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=40 /> 82 83 <SpawnPoint position="0,0,0" lookat="-2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff> 84 <events> 85 <activity> 86 <EventTrigger invert="true"> 87 <events> 88 <trigger> 89 <EventListener event="spawndelaytrigger1" /> 90 </trigger> 91 </events> 92 </EventTrigger> 93 </activity> 94 </events> 95 </SpawnPoint> 96 97 <SimpleNotification message="Welcome to Earth Orbit" > 98 <events> 99 <trigger> 100 <EventListener event=spawntrigger /> 101 </trigger> 102 </events> 103 </SimpleNotification> 104 <SimpleNotification message="Turn right to witness an explosion" > 105 <events> 106 <trigger> 107 <EventListener event=spawndelaytrigger1 /> 108 </trigger> 109 </events> 110 </SimpleNotification> 111 112 <!-- EARTH --> 113 <Planet 114 position="80500,0,0" 115 scale="63000" 116 collisionType="dynamic" 117 linearDamping="0.8" 118 angularDamping="0" 119 mass="5.9e21" 120 pitch="-90" 121 yaw="50" 122 mesh="planets/earth.mesh" 123 atmosphere="atmosphere1" 124 rotationaxis="0,1,0" 125 rotationrate="0.2" 126 atmospheresize="80.0f" 127 imagesize="1024.0f" 128 collisiondamage = 2 129 enablecollisiondamage = true 130 > 131 <attached> 132 <ForceField position="0,0,0" mode="newtonianGravity" diameter="140000" massDiameter="126000" mass="5.9e21" /> 133 </attached> 134 <collisionShapes> 135 <SphereCollisionShape radius="63000" position="0,0,0" /> 136 </collisionShapes> 137 </Planet> 138 139 <!-- PARTICLE EFFECT --> 140 141 <ParticleSpawner position="-50,50,-125" source="Orxonox/RingExp" autostart="false" lifetime=500 loop=1 startdelay=2.5> 142 <events> 143 <spawn> 144 <EventListener event=spawndelaytrigger1 /> 145 </spawn> 146 </events> 147 </ParticleSpawner> 148 <ParticleSpawner position="-50,50,-125" source="Orxonox/RingExp2" autostart="false" lifetime=500 loop=1 startdelay=2> 149 <events> 150 <spawn> 151 <EventListener event=spawndelaytrigger1 /> 152 </spawn> 153 </events> 154 </ParticleSpawner> 155 <ParticleSpawner position="-50,50,-125" source="Orxonox/RingExp3" autostart="false" lifetime=500 loop=1 startdelay=2> 156 <events> 157 <spawn> 158 <EventListener event=spawndelaytrigger1 /> 159 </spawn> 160 </events> 161 </ParticleSpawner> 162 <StaticEntity collisionType = "static" position = "-50,50,-125" scale=1 > 163 <attached> 164 <Model position="0,0,0" scale="2" mesh="ast1.mesh" /> 165 </attached> 166 <collisionShapes> 167 <SphereCollisionShape radius="8" /> 168 </collisionShapes> 169 </StaticEntity> 170 171 <SimpleNotification message="A particle effect by Tibor" > 172 <events> 173 <trigger> 174 <EventListener event=spawndelaytrigger2 /> 175 </trigger> 176 </events> 177 </SimpleNotification> 178 179 <!-- ENEMIES 1st ROUND --> 180 181 <SimpleNotification message="Enemies attacking" > 182 <events> 183 <trigger> 184 <EventListener event=spawndelaytrigger3 /> 185 </trigger> 186 </events> 187 </SimpleNotification> 188 189 <Script code="addBots 3" onLoad="false"> 190 <events> 191 <trigger> 192 <EventListener event=spawndelaytrigger3 /> 193 </trigger> 194 </events> 195 </Script> 196 197 <SpawnPoint position="100,0,0" lookat="-2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 198 <events> 199 <activity> 200 <EventListener event=spawnpointtrigger /> 201 </activity> 202 </events> 203 </SpawnPoint> 204 205 <SpawnPoint position="0,-100,0" lookat="-2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 206 <events> 207 <activity> 208 <EventListener event=spawnpointtrigger /> 209 </activity> 210 </events> 211 </SpawnPoint> 212 213 <SpawnPoint position="0,0,100" lookat="-2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" > 214 <events> 215 <activity> 216 <EventListener event=spawnpointtrigger /> 217 </activity> 218 </events> 219 </SpawnPoint> 220 221 <Trigger name="spawnpointtrigger" mode="xor" invert="true" > 222 <EventTrigger> 223 <events> 224 <trigger> 225 <EventListener event=spawndelaytrigger1 /> 226 </trigger> 227 </events> 228 </EventTrigger> 229 <EventTrigger invert="true"> 230 <events> 231 <trigger> 232 <EventListener event=portaltrigger /> 233 </trigger> 234 </events> 235 </EventTrigger> 236 </Trigger> 237 238 <!-- SPACE BOUNDARY --> 239 240 <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="-90000,0,0"/> 241 <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="0,10000,0"/> 242 <SpaceBoundaries warnDistance="1" maxDistance="450" showDistance="300" healthDecrease="0.1" position="0,0,0"/> 243 <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="-30000,0,0"/> 244 245 <SimpleNotification message="Notice the shields by Simon" > 246 <events> 247 <trigger> 248 <EventListener event=spawndelaytrigger4 /> 249 </trigger> 250 </events> 251 </SimpleNotification> 252 253 <SimpleNotification message="and space boundaries by Maurus" > 254 <events> 255 <trigger> 256 <EventListener event=spawndelaytrigger5 /> 257 </trigger> 258 </events> 259 </SimpleNotification> 260 261 <SimpleNotification message="Let's get out of here" > 262 <events> 263 <trigger> 264 <EventListener event=spawndelaytrigger6 /> 265 </trigger> 266 </events> 267 </SimpleNotification> 268 269 <Script code="killBots" onLoad="false"> 270 <events> 271 <trigger> 272 <EventListener event=spawndelaytrigger6 /> 273 </trigger> 274 </events> 275 </Script> 276 277 <SimpleNotification message="Boost enhancement by Dominik" > 278 <events> 279 <trigger> 280 <EventListener event=spawndelaytrigger7 /> 281 </trigger> 282 </events> 283 </SimpleNotification> 50 284 51 <!-- BOUNDARIES AND PORTALS --> 52 53 <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="0,0,0"/> 54 <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="-10000,0,0"/> 285 <!-- PORTALS --> 55 286 56 287 <Template name=PortalDefault> … … 62 293 </Template> 63 294 64 <PortalEndPoint position="350,0,0" id="1" distance="40" target="MobileEntity" design="PortalDefault"/> 65 <PortalEndPoint position="-10300,0,0" id="2" distance="40" target="MobileEntity" design="PortalDefault"/> 66 <PortalLink fromID="1" toID="2" /> 67 <PortalLink fromID="2" toID="1" /> 68 69 70 71 <!-- MODELS, DEBRIS, ETC --> 72 295 <PortalEndPoint position="-350,0,0" id="3" distance="40" target="MobileEntity" design="PortalDefault" active="false"> 296 <events> 297 <activity> 298 <EventListener event=spawndelaytrigger6 /> 299 </activity> 300 </events> 301 </PortalEndPoint> 302 <PortalEndPoint position="-72000,0,0" id="4" distance="40" target="MobileEntity" design="PortalDefault" /> 303 <PortalLink fromID="3" toID="4" /> 304 <PortalLink fromID="4" toID="3" /> 305 306 <DistanceTrigger name="portaltrigger" position="-72000,0,0" target="Pawn" distance=10 stayActive="true" /> 307 <DistanceTrigger name="portaldelaytrigger1" position="-72000,0,0" target="Pawn" distance=10 stayActive="true" delay=5 /> 308 <DistanceTrigger name="portaldelaytrigger2" position="-72000,0,0" target="Pawn" distance=10 stayActive="true" delay=10 /> 309 <DistanceTrigger name="portaldelaytrigger3" position="-72000,0,0" target="Pawn" distance=10 stayActive="true" delay=15 /> 310 <DistanceTrigger name="portaldelaytrigger4" position="-72000,0,0" target="Pawn" distance=10 stayActive="true" delay=17 /> 311 312 <SimpleNotification message="Welcome to Moon Orbit" > 313 <events> 314 <trigger> 315 <EventListener event=portaltrigger /> 316 </trigger> 317 </events> 318 </SimpleNotification> 319 320 <SimpleNotification message="Portals by Andreas" > 321 <events> 322 <trigger> 323 <EventListener event=portaldelaytrigger1 /> 324 </trigger> 325 </events> 326 </SimpleNotification> 327 328 <!-- MOON AREA --> 329 330 <!-- MOON --> 73 331 <Planet 74 position="- 5000,0,0"75 scale="400 "332 position="-80000,0,0" 333 scale="4000" 76 334 collisionType="dynamic" 77 335 linearDamping="0.8" 78 336 angularDamping="0" 79 mass=" 10000000"337 mass="7.36e19" 80 338 pitch="0" 81 mesh="planets/m uunilinst.mesh"339 mesh="planets/moon.mesh" 82 340 atmosphere="atmosphere1" 83 rotationaxis=" 1,0,0"84 rotationrate=" 1.0"85 atmospheresize=" 300.0f"341 rotationaxis="0,1,0" 342 rotationrate="0.2" 343 atmospheresize="0.0f" 86 344 imagesize="1024.0f" 345 collisiondamage = 2 346 enablecollisiondamage = true 87 347 > 348 <attached> 349 <ForceField position="0,0,0" mode="newtonianGravity" diameter="40000" massDiameter="34740" mass="7.36e19" /> 350 </attached> 88 351 <collisionShapes> 89 <SphereCollisionShape radius="400 " position="0,0,0" />352 <SphereCollisionShape radius="4000" position="0,0,0" /> 90 353 </collisionShapes> 91 354 </Planet> 92 355 93 <MovableEntity position="0,0,0"> 94 <attached> 95 <Billboard position="-5000,0,0" material="Examples/Flare" colour="0, 0, 1" scale=10/> 96 </attached> 97 </MovableEntity> 98 356 <SimpleNotification message="Hydrogen farmer/space station by Hans" > 357 <events> 358 <trigger> 359 <EventListener event=portaldelaytrigger2 /> 360 </trigger> 361 </events> 362 </SimpleNotification> 363 364 <!-- HYDROGEN FARMER & DOCKING --> 365 <SpaceShip position="-74000,2500,0" roll=90 yaw=180 pitch=20 mass=10000 health=100000 > 366 <attached> 367 <!-- Docking --> 368 <DistanceTriggerBeacon name="bcnDestroyer" /> 369 <DockingTarget name="destroyer" /> 370 371 <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=100 /> 372 <!-- <Model mesh="cube.mesh" mass=10 position="-1120,0,0" scale3D="230,200,490" /> --> 373 <!-- <Model mesh="cube.mesh" mass=10 position="580,0,-960" scale3D="230,200,490" yaw=-120 /> --> 374 <!-- <Model mesh="cube.mesh" mass=10 position="580,0,960" scale3D="230,200,490" yaw=-240 /> --> 375 <!-- <Model mesh="cube.mesh" mass=10 position="0,0,0" scale3D="600,200,100" /> --> 376 </attached> 377 <collisionShapes> 378 <BoxCollisionShape position="-1120,0,0" halfExtents="230,200,490" /> 379 <BoxCollisionShape position="580,0,-960" halfExtents="230,200,490" yaw=-120 /> 380 <BoxCollisionShape position="580,0,960" halfExtents="230,200,490" yaw=-240 /> 381 </collisionShapes> 382 </SpaceShip> 383 384 <Dock position="-73942, 1288, -255" roll=90 yaw=180 > 385 <animations> 386 <MoveToDockingTarget target="destroyer" /> 387 </animations> 388 <effects> 389 <DockToShip target="spaceShip" /> 390 </effects> 391 <events> 392 <execute> 393 <EventListener event="dockMe" /> 394 </execute> 395 </events> 396 <attached> 397 <DistanceTrigger position="10,-202, -42" distance="800" target="Pawn" 398 beaconMode="exclude" targetname="bcnDestroyer" name="dockMe" 399 /> 400 </attached> 401 </Dock> 402 403 <SpaceShip template="spaceshipassff2" position="-73915,3786,67" orientation="-0.14045, 0.68254, 0.68144, 0.223774" > 404 <attached> 405 <DockingTarget name="spaceShip" /> 406 </attached> 407 </SpaceShip> 408 409 <!-- PICKUPS --> 410 <SimpleNotification message="Oh, what have we here?" > 411 <events> 412 <trigger> 413 <EventListener event=portaldelaytrigger3 /> 414 </trigger> 415 </events> 416 </SimpleNotification> 417 418 <SimpleNotification message="Shrink pickup by Sandro" > 419 <events> 420 <trigger> 421 <EventListener event=portaldelaytrigger4 /> 422 </trigger> 423 </events> 424 </SimpleNotification> 425 426 <PickupSpawner position="-72487,420,-63" respawnTime="10" triggerDistance="20" maxSpawnedItems="5" active="false"> 427 <pickup> 428 <ShrinkPickup template ="smallshrinkpickup"/> 429 </pickup> 430 <events> 431 <activity> 432 <EventListener event=portaldelaytrigger3 /> 433 </activity> 434 </events> 435 <attached> 436 <ParticleSpawner position="0,0,0" source="Orxonox/Shield" autostart="false" lifetime=500 loop=0 > 437 <events> 438 <spawn> 439 <EventListener event=portaldelaytrigger3 /> 440 </spawn> 441 </events> 442 </ParticleSpawner> 443 </attached> 444 </PickupSpawner> 445 446 <SpaceBoundaries warnDistance="1" maxDistance="1700" showDistance="500" healthDecrease="0.1" position="-72369,803,2"/> 447 <SpaceBoundaries warnDistance="1" maxDistance="800" showDistance="300" healthDecrease="0.1" position="-73450,5067,-351"/> 448 449 <!-- FINISH --> 450 451 <DistanceTrigger name="dockingtrigger" position="-73942, 1288, -255" target="Pawn" distance=20 stayActive="true" /> 452 <DistanceTrigger name="dockingdelaytrigger1" position="-73942, 1288, -255" target="Pawn" distance=20 stayActive="true" delay=3 /> 453 <DistanceTrigger name="dockingdelaytrigger2" position="-73942, 1288, -255" target="Pawn" distance=20 stayActive="true" delay=10 /> 454 455 <SimpleNotification message="Docking by Sven" > 456 <events> 457 <trigger> 458 <EventListener event=dockingtrigger /> 459 </trigger> 460 </events> 461 </SimpleNotification> 462 463 <SimpleNotification message="Weapons by Jonas" > 464 <events> 465 <trigger> 466 <EventListener event=dockingdelaytrigger1 /> 467 </trigger> 468 </events> 469 </SimpleNotification> 470 471 <SimpleNotification message="Steering enhancement by Manuel" > 472 <events> 473 <trigger> 474 <EventListener event=dockingdelaytrigger2 /> 475 </trigger> 476 </events> 477 </SimpleNotification> 99 478 100 479 </Scene> -
code/trunk/data/levels/presentationHS09.oxw
r8079 r8706 24 24 <Template link=lodtemplate_default /> 25 25 </templates> 26 <?lua include("includes/notifications.oxi") ?> 26 27 27 28 <Scene -
code/trunk/data/levels/presentationHS09b.oxw
r8079 r8706 29 29 <Template link=lodtemplate_default /> 30 30 </templates> 31 <?lua include("includes/notifications.oxi") ?> 31 32 32 33 <Scene -
code/trunk/data/levels/princessAeryn.oxw
r7679 r8706 24 24 <Template link=lodtemplate_default /> 25 25 </templates> 26 <?lua include("includes/notifications.oxi") ?> 26 27 27 28 <Scene -
code/trunk/data/levels/screenshot.oxw
r7679 r8706 22 22 <Template link=lodtemplate_default /> 23 23 </templates> 24 <?lua include("includes/notifications.oxi") ?> 24 25 25 26 <Scene -
code/trunk/data/levels/sound.oxw
r7854 r8706 23 23 <Template link=lodtemplate_default /> 24 24 </templates> 25 <?lua include("includes/notifications.oxi") ?> 25 26 26 27 <Scene -
code/trunk/data/levels/teamBaseMatch.oxw
r8079 r8706 23 23 <Template link=lodtemplate_default /> 24 24 </templates> 25 <?lua include("includes/notifications.oxi") ?> 25 26 26 27 <Scene -
code/trunk/data/levels/teamDeathMatch.oxw
r7679 r8706 22 22 <Template link=lodtemplate_default /> 23 23 </templates> 24 <?lua include("includes/notifications.oxi") ?> 24 25 25 26 <Scene -
code/trunk/data/levels/templates/lodInformation.oxt
r8528 r8706 14 14 <MeshLodInformation mesh=SolarPanel.mesh enabled=false/> 15 15 <MeshLodInformation mesh=CuboidLandingZone.mesh enabled=false/> 16 <MeshLodInformation mesh=HydroHarvester.mesh enabled=false /> 16 17 17 18 <!-- disable LOD for some debris meshes which caused a crash (fixed in Ogre 1.7.3) --> -
code/trunk/data/levels/templates/pickupRepresentationTemplates.oxt
r7679 r8706 391 391 <InvisiblePickup 392 392 duration = 20.0 393 activaionType = "immediate" 394 durationType = "continuous" 395 /> 396 </Template> 397 398 <Template name=smallshrinkpickupRepresentation> 399 <PickupRepresentation> 400 <spawner-representation> 401 <StaticEntity> 402 <attached> 403 <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1> 404 <attached> 405 <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.4 /> 406 </attached> 407 </Billboard> 408 </attached> 409 </StaticEntity> 410 </spawner-representation> 411 </PickupRepresentation> 412 </Template> 413 414 <Template name=smallshrinkpickup> 415 <InvisiblePickup 416 duration = 10.0 417 shrinkFactor = 2.5 418 activaionType = "immediate" 419 durationType = "continuous" 420 /> 421 </Template> 422 423 <Template name=mediumshrinkpickupRepresentation> 424 <PickupRepresentation> 425 <spawner-representation> 426 <StaticEntity> 427 <attached> 428 <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1> 429 <attached> 430 <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.7 /> 431 </attached> 432 </Billboard> 433 </attached> 434 </StaticEntity> 435 </spawner-representation> 436 </PickupRepresentation> 437 </Template> 438 439 <Template name=mediumshrinkpickup> 440 <InvisiblePickup 441 duration = 30.0 442 shrinkFactor = 5.0 443 activaionType = "immediate" 444 durationType = "continuous" 445 /> 446 </Template> 447 448 <Template name=hugeshrinkpickupRepresentation> 449 <PickupRepresentation> 450 <spawner-representation> 451 <StaticEntity> 452 <attached> 453 <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1> 454 <attached> 455 <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=1.0 /> 456 </attached> 457 </Billboard> 458 </attached> 459 </StaticEntity> 460 </spawner-representation> 461 </PickupRepresentation> 462 </Template> 463 464 <Template name=hugeshrinkpickup> 465 <InvisiblePickup 466 duration = 60.0 467 shrinkFactor = 10.0 393 468 activaionType = "immediate" 394 469 durationType = "continuous" -
code/trunk/data/levels/templates/spaceshipAssff.oxt
r7845 r8706 3 3 hudtemplate = spaceshiphud 4 4 camerapositiontemplate = spaceshipassffcameras 5 engine = spaceshipassffengine6 5 spawnparticlesource = "Orxonox/fairytwirl" 7 6 spawnparticleduration = 3 … … 12 11 initialhealth = 100 13 12 14 primaryThrust = 100; 15 auxilaryThrust = 30; 16 rotationThrust = 25; 13 shieldhealth = 30 14 initialshieldhealth = 30 15 maxshieldhealth = 50 16 shieldabsorption = 0.8 17 reloadrate = 1 18 reloadwaittime = 1 19 20 primaryThrust = 100 21 auxilaryThrust = 30 22 rotationThrust = 50 23 24 lift = 1; 25 stallSpeed = 220; 26 27 boostPower = 15 28 boostPowerRate = 1 29 boostRate = 5 30 boostCooldownDuration = 10 31 32 shakeFrequency = 15 33 shakeAmplitude = 9 17 34 18 35 collisionType = "dynamic" … … 21 38 angularDamping = 0.9999999 22 39 > 40 <engines> 41 <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipassffengine /> 42 <MultiStateEngine position="-7.6, 0, 0" template=spaceshipassffengine /> 43 </engines> 23 44 <attached> 24 45 <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" /> … … 77 98 </EffectContainer> 78 99 <EffectContainer condition="not idle"> 79 <FadingBillboard mainstate=activity active=false scale=0.1 position="0, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 /> 80 <!-- 81 <Light mainstate=visibility position=" 8, 0, 8" diffuse="0.3, 0.6, 1.0" specular="0.3, 0.6, 1.0" attenuation="600, 1.0, 0.007, 0.0002" type=point /> 82 <Light mainstate=visibility position="-8, 0, 8" diffuse="0.3, 0.6, 1.0" specular="0.3, 0.6, 1.0" attenuation="600, 1.0, 0.007, 0.0002" type=point /> 83 --> 100 <FadingBillboard mainstate=activity active=false scale=0.1 position="7.6, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 /> 101 <FadingBillboard mainstate=activity active=false scale=0.1 position="-7.6, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 /> 84 102 </EffectContainer> 85 103 <EffectContainer condition="normal or brake"> … … 87 105 </EffectContainer> 88 106 <EffectContainer condition="normal or boost"> 89 <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />90 <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />107 <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 0" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" /> 108 <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 0" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" /> 91 109 </EffectContainer> 92 110 <EffectContainer condition="boost"> … … 94 112 <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" /> 95 113 </EffectContainer> 96 <EffectContainer condition="brake">114 <!-- <EffectContainer condition="brake"> 97 115 <FadingBillboard mainstate=activity active=false scale=0.3 position=" 8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 /> 98 116 <FadingBillboard mainstate=activity active=false scale=0.3 position="-8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 /> … … 100 118 <FadingBillboard mainstate=activity active=false scale=0.15 position="-8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 /> 101 119 </EffectContainer> 120 --> 102 121 </MultiStateEngine> 103 122 </Template> -
code/trunk/data/levels/templates/spaceshipGhost.oxt
r7679 r8706 3 3 hudtemplate = spaceshiphud 4 4 camerapositiontemplate = spaceshipghostcameras 5 engine = spaceshipghostengine 5 6 6 spawnparticlesource = "Orxonox/fairytwirl" 7 7 spawnparticleduration = 3 … … 21 21 angularDamping = 0.9999999 22 22 > 23 23 <engines> 24 <MultiStateEngine position="0,0,0" template=spaceshipghostengine/> 25 </engines> 24 26 <attached> 25 27 <Model position="0,0,0" scale=2 yaw=90 pitch=-90 roll=0 mesh="ghost.mesh" /> -
code/trunk/data/levels/templates/spaceshipH2.oxt
r7679 r8706 3 3 hudtemplate = spaceshiphud 4 4 camerapositiontemplate = spaceshipHtwocameras 5 engine = spaceshipHtwoengine6 5 spawnparticlesource = "Orxonox/fairytwirl" 7 6 spawnparticleduration = 3 … … 25 24 include("includes/weaponSettingsH2.oxi") 26 25 ?> 26 <engines> 27 <MultiStateEngine position="0,0,0" template=spaceshipHtwoengine /> 27 28 29 </engines> 28 30 <attached> 29 31 <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale3D="3,0.833,0.833" mesh="h2_green.mesh" /> -
code/trunk/data/levels/templates/spaceshipHXY.oxt
r7679 r8706 21 21 angularDamping = 0.9999999 22 22 > 23 <engines> 24 <MultiStateEngine position=" 0, 0, 0" template=spaceshipHXYengine /> 25 </engines> 23 26 <attached> 24 27 <Model position="0,0,0" yaw=180 pitch=-90 roll=0 scale=4 mesh="HXY.mesh" /> -
code/trunk/data/levels/templates/spaceshipHXYSL.oxt
r8398 r8706 3 3 hudtemplate = spaceshiphud 4 4 camerapositiontemplate = spaceshipHXYcameras 5 engine = spaceshipHXYengine6 5 spawnparticlesource = "Orxonox/fairytwirl" 7 6 spawnparticleduration = 3 … … 21 20 angularDamping = 0.9999999 22 21 > 22 <engines> 23 <MultiStateEngine position=" 0, 0, 0" template=spaceshipHXYengine /> 24 </engines> 23 25 <attached> 24 26 <Model position="0,0,0" yaw=180 pitch=-90 roll=0 scale=4 mesh="HXY.mesh" /> … … 38 40 </SpaceShip> 39 41 </Template> 40 41 <Template name=spaceshipHXYcameras defaults=0>42 <SpaceShip>43 <camerapositions>44 <CameraPosition position="0,8, 60" drag=true mouselook=true />45 <CameraPosition position="0,16, 120" drag=true mouselook=true />46 <CameraPosition position="0,24,180" drag=true mouselook=true />47 <CameraPosition position="0,60,10" pitch="-80" drag=true mouselook=true />48 </camerapositions>49 </SpaceShip>50 </Template>51 52 <Template name=spaceshipHXYengine baseclass=MultiStateEngine>53 <MultiStateEngine54 boostfactor = 655 56 speedfront = 15057 speedback = 5058 speedleftright = 5059 speedupdown = 5060 61 accelerationfront = 50062 accelerationbrake = 50063 accelerationback = 12564 accelerationleftright = 12565 accelerationupdown = 12566 >67 <EffectContainer condition="idle">68 </EffectContainer>69 <EffectContainer condition="not idle">70 71 </EffectContainer>72 <EffectContainer condition="normal or brake">73 74 </EffectContainer>75 <EffectContainer condition="normal or boost">76 <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 2, 0, 20" colour="1, 0.7, 0.1, 1.0" width=10 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />77 <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-2, 0, 20" colour="1, 0.7, 0.1, 1.0" width=10 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />78 </EffectContainer>79 <EffectContainer condition="boost">80 <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 2, 0, 20" colour="1, 0.7, 0.1, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />81 <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-2, 0, 20" colour="1, 0.7, 0.1, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />82 </EffectContainer>83 <EffectContainer condition="brake">84 <FadingBillboard mainstate=activity active=false scale=0.3 position=" 2, 0, 20" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />85 <FadingBillboard mainstate=activity active=false scale=0.3 position="-2, 0, 20" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />86 <FadingBillboard mainstate=activity active=false scale=0.15 position=" 2, 0, 20" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />87 <FadingBillboard mainstate=activity active=false scale=0.15 position="-2, 0, 20" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />88 </EffectContainer>89 </MultiStateEngine>90 </Template> -
code/trunk/data/levels/templates/spaceshipPirate.oxt
r7679 r8706 3 3 hudtemplate = spaceshiphud 4 4 camerapositiontemplate = spaceshippiratecameras 5 engine = spaceshippirateengine6 5 spawnparticlesource = "Orxonox/fairytwirl" 7 6 spawnparticleduration = 3 … … 21 20 angularDamping = 0.9999999 22 21 > 22 <engines> 23 <MultiStateEngine position=" 0, 0, 0" template=spaceshippirateengine /> 24 </engines> 23 25 <attached> 24 26 <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="pirate.mesh" /> -
code/trunk/data/levels/templates/spaceshipSwallow.oxt
r7679 r8706 3 3 hudtemplate = spaceshiphud 4 4 camerapositiontemplate = spaceshipswallowcameras 5 engine = spaceshipswallowengine6 5 spawnparticlesource = "Orxonox/fairytwirl" 7 6 spawnparticleduration = 3 … … 21 20 angularDamping = 0.9999999 22 21 > 23 22 <engines> 23 <MultiStateEngine position=" 0, 0, 0" template=spaceshipswallowengine /> 24 </engines> 24 25 <attached> 25 26 <Model position="0,0,0" scale=2 yaw=90 pitch=-90 roll=0 mesh="swallow_mat.mesh" /> -
code/trunk/data/levels/templates/spaceshipTransporter.oxt
r7679 r8706 3 3 hudtemplate = spaceshiphud 4 4 camerapositiontemplate = spaceshipTransportercameras 5 engine = spaceshipTransporterengine6 5 spawnparticlesource = "Orxonox/fairytwirl" 7 6 spawnparticleduration = 3 … … 21 20 angularDamping = 0.9999999 22 21 > 22 <engines> 23 <MultiStateEngine position=" 0, 0, 0" template=spaceshipTransporterengine /> 24 </engines> 23 25 <attached> 24 26 <Model position="0,0,0" yaw=0 pitch=0 roll=0 scale=10 mesh="Transporter.mesh" /> -
code/trunk/data/levels/templates/spaceshipTransporterSL.oxt
r7679 r8706 3 3 hudtemplate = spaceshiphud 4 4 camerapositiontemplate = spaceshipTransportercameras 5 engine = spaceshipTransporterengine6 5 spawnparticlesource = "Orxonox/fairytwirl" 7 6 spawnparticleduration = 3 … … 21 20 angularDamping = 0.9999999 22 21 > 22 <engines> 23 <MultiStateEngine position=" 0, 0, 0" template=spaceshipTransporterengine /> 24 </engines> 23 25 <attached> 24 26 <Model position="0,0,0" yaw=0 pitch=0 roll=0 scale=10 mesh="Transporter.mesh" /> … … 38 40 </SpaceShip> 39 41 </Template> 40 41 <Template name=spaceshipTransportercameras defaults=0>42 <SpaceShip>43 <camerapositions>44 <CameraPosition position="0,90,350" drag=true mouselook=true />45 <CameraPosition position="0,150, 400" drag=true mouselook=true />46 <CameraPosition position="0,200,550" drag=true mouselook=true />47 <CameraPosition position="0,120,200" pitch="-80" drag=true mouselook=true />48 </camerapositions>49 </SpaceShip>50 </Template>51 52 <Template name=spaceshipTransporterengine baseclass=MultiStateEngine>53 <MultiStateEngine54 boostfactor = 255 56 speedfront = 5057 speedback = 1058 speedleftright = 1059 speedupdown = 1060 61 62 accelerationfront = 2063 accelerationbrake = 2064 accelerationback = 1065 accelerationleftright = 1066 accelerationupdown = 1067 >68 <EffectContainer condition="idle">69 </EffectContainer>70 <EffectContainer condition="not idle">71 72 </EffectContainer>73 <EffectContainer condition="normal or brake">74 75 </EffectContainer>76 <EffectContainer condition="normal or boost">77 <Backlight mainstate=activity active=false scale=2 name=bltest position=" 22, -10, 87" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />78 <Backlight mainstate=activity active=false scale=2 name=bltest position="-22, -10, 87" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />79 </EffectContainer>80 <EffectContainer condition="boost">81 <Backlight mainstate=activity active=false scale=3 name=bltest position=" 22, -10, 87" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />82 <Backlight mainstate=activity active=false scale=3 name=bltest position="-22, -10, 87" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />83 </EffectContainer>84 <EffectContainer condition="brake">85 <FadingBillboard mainstate=activity active=false scale=2 position=" 22, -10, 87" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />86 <FadingBillboard mainstate=activity active=false scale=2 position="-22, -10, 87" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />87 <FadingBillboard mainstate=activity active=false scale=1 position="22, -10, 87" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />88 <FadingBillboard mainstate=activity active=false scale=1 position="-22, -10, 87" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />89 </EffectContainer>90 </MultiStateEngine>91 </Template> -
code/trunk/data/levels/testStars.oxw
r7679 r8706 23 23 <Template link=lodtemplate_default /> 24 24 </templates> 25 <?lua include("includes/notifications.oxi") ?> 25 26 26 27 <Scene -
code/trunk/data/levels/testSwallow.oxw
r8079 r8706 22 22 <Template link=lodtemplate_default /> 23 23 </templates> 24 <?lua include("includes/notifications.oxi") ?> 24 25 25 26 <Scene -
code/trunk/data/levels/theTimeMachine.oxw
r8213 r8706 68 68 <Template link=lodtemplate_default /> 69 69 </templates> 70 <?lua include("includes/notifications.oxi") ?> 71 70 72 <Scene 71 73 ambientlight="0.8,0.8,0.8" -
code/trunk/data/levels/tutorial.oxw
r7679 r8706 19 19 <Template link=lodtemplate_default /> 20 20 </templates> 21 <?lua include("includes/notifications.oxi") ?> 21 22 22 23 <Scene -
code/trunk/data/levels/underAttack.oxw
r8079 r8706 15 15 <Template link=lodtemplate_default /> 16 16 </templates> 17 <?lua include("includes/notifications.oxi") ?> 17 18 18 19 <Scene -
code/trunk/data/levels/waypoints.oxw
r7679 r8706 21 21 <Template link=lodtemplate_default /> 22 22 </templates> 23 <?lua include("includes/notifications.oxi") ?> 23 24 24 25 <Scene -
code/trunk/data/overlays/HUDTemplates3.oxo
r7679 r8706 35 35 background = "Orxonox/HealthBarBackground" 36 36 size = "0.35, 0.0875" 37 position = "0.0 , 0.9 5"37 position = "0.0 , 0.9 " 38 38 pickpoint = "0, 1" 39 39 bartexture = "healthbar_bar.png" … … 56 56 background = "Orxonox/BarBackground" 57 57 size = "0.35, 0.05" 58 position = "0.0 , 1.0"58 position = "0.0 , 0.95 " 59 59 pickpoint = "0, 1" 60 60 correctaspect = false … … 64 64 <BarColour position = 1.0 colour = "0.7,0.2,0.2" /> 65 65 </HUDSpeedBar> 66 67 <HUDBoostBar 68 name = "BoostBar1" 69 backgroundtex = "bar1.png" 70 size = "0.35, 0.05" 71 position = "0.0 , 1.0 " 72 pickpoint = "0, 1" 73 correctaspect = false 74 > 75 <BarColour position = 0.0 colour = "0.7,0.2,0.2" /> 76 <BarColour position = 0.5 colour = "0.7,0.7,0.2" /> 77 <BarColour position = 1.0 colour = "0.2,0.7,0.2" /> 78 </HUDBoostBar> 66 79 67 80 <HUDNavigation -
code/trunk/data/overlays/debug.oxo
r8079 r8706 84 84 /> 85 85 86 <GametypeStatus87 name = "state"88 position = "0.5, 0.85"89 font = "VeraMono"90 textsize = 0.0591 colour = "1.0, 1.0, 0.0, 0.8"92 align = "center"93 />94 86 </OverlayGroup> 95 87 </Template>
Note: See TracChangeset
for help on using the changeset viewer.