Changeset 7403 for code/trunk/data
- Timestamp:
- Sep 11, 2010, 10:20:44 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 11 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/notifications (added) merged: 7319,7324,7326,7338-7343,7348-7349,7351,7354-7355,7358-7360,7362,7395,7398-7400
- Property svn:mergeinfo changed
-
code/trunk/data/gui/scripts/GUISheet.lua
r6748 r7403 40 40 end 41 41 42 -- Override this function if you need to do work just after the sheet has been hidden 43 function P:afterHide() 44 end 45 42 46 function P:load() 43 47 -- Load the layout that describes the sheet -
code/trunk/data/gui/scripts/KeyBindMenu.lua
r7163 r7403 113 113 return "Joystick " .. name 114 114 elseif( string.find(group, "JoyStickAxes") ~= nil ) then 115 return "Joystick Axis " .. string.sub(name, 5, 6) .. string.sub(name, string.find(name, 'Axis%d%d(.*)')+6)115 return "Joystick Axis " .. string.sub(name, 5, 6) .. string.sub(name, string.find(name, 'Axis%d%d(.*)')+6) 116 116 elseif( group == "MouseAxes" ) then 117 117 return "Mouse " .. string.sub(name, string.find(name, '.(.*)')+1) .. " " .. string.sub(name, 1, 1) .. "-Axis" -
code/trunk/data/gui/scripts/MiscConfigMenu.lua
r7284 r7403 51 51 table.insert(P.nameList, "Number of Bots") 52 52 table.insert(P.nameList, "UnderAttack: game time") 53 table.insert(P.nameList, "TeamDeathmatch: Num er of teams")53 table.insert(P.nameList, "TeamDeathmatch: Number of teams") 54 54 table.insert(P.nameList, "Playername") 55 55 table.insert(P.nameList, "Chat: display time") -
code/trunk/data/gui/scripts/SheetManager.lua
r6746 r7403 43 43 44 44 -- ? 45 function showMenuSheet(name, bHidePrevious, ptr)46 local sheet = showMenuSheet(name, bHidePrevious )45 function showMenuSheet(name, bHidePrevious, bNoInput, ptr) 46 local sheet = showMenuSheet(name, bHidePrevious, bNoInput) 47 47 sheet.overlay = ptr 48 48 return sheet … … 50 50 51 51 -- Shows the specified menu sheet and loads it if neccessary 52 function showMenuSheet(name, bHidePrevious )52 function showMenuSheet(name, bHidePrevious, bNoInput) 53 53 if name == "" then 54 54 return nil … … 63 63 end 64 64 65 -- Set bNoInput to false if it hasn't been set. 66 if bNoInput == nil then 67 bNoInput = false 68 end 69 70 -- Count the number of sheets that don't need input till the first that does. 71 local counter = noInputSheetCounter() 65 72 -- Pause game control if this is the first menu to be displayed 66 73 -- HUGE HACK? 67 if activeMenuSheets.size== 0 then74 if bNoInput == false and counter == 0 then 68 75 orxonox.HumanController:pauseControl() 69 76 end … … 72 79 if activeMenuSheets[name] ~= nil then 73 80 hideMenuSheet(name) 81 end 82 83 if bNoInput == true then 84 menuSheet.tShowCursor = TriBool.Dontcare 74 85 end 75 86 … … 78 89 { 79 90 ["sheet"] = menuSheet, 80 ["bHidePrevious"] = bHidePrevious 91 ["bHidePrevious"] = bHidePrevious, 92 ["bNoInput"] = bNoInput 81 93 } 82 94 table.insert(activeMenuSheets, sheetTuple) -- indexed array access … … 89 101 90 102 -- Handle input distribution 91 inputMgr:enterState(menuSheet.inputState) 103 if bNoInput == false then 104 inputMgr:enterState(menuSheet.inputState) 105 end 92 106 93 107 -- Only change cursor situation if menuSheet.tShowCursor ~= TriBool.Dontcare … … 148 162 149 163 -- Leave the input state 150 inputMgr:leaveState(sheetTuple.sheet.inputState) 164 if not sheetTuple.bNoInput then 165 inputMgr:leaveState(sheetTuple.sheet.inputState) 166 end 151 167 152 168 -- CURSOR SHOWING … … 162 178 end 163 179 164 -- Resume control if the last menu is hidden 165 if activeMenuSheets.size == 0 then 180 -- Count the number of sheets that don't need input till the first that does. 181 local counter = noInputSheetCounter() 182 -- Resume control if the last (non-noInput) menu is hidden 183 if counter == 0 then 166 184 orxonox.HumanController:resumeControl() 167 185 hideCursor() 168 186 end 187 188 sheetTuple.sheet:afterHide() 169 189 end 170 190 … … 178 198 function keyESC() 179 199 -- HUGE, very HUGE hacks! 180 if activeMenuSheets.size == 1 and activeMenuSheets[1].sheet.name == "MainMenu" then 200 201 -- Count the number of sheets that don't need input till the first that does. 202 local counter = noInputSheetCounter() 203 204 -- If the first sheet that needs input is the MainMenu. 205 if counter == 1 and activeMenuSheets[1].sheet.name == "MainMenu" then 181 206 orxonox.execute("exit") 182 elseif activeMenuSheets.size > 0 then 183 orxonox.execute("hideGUI "..activeMenuSheets.topSheetTuple.sheet.name) 207 -- If there is at least one sheet that needs input. 208 elseif counter > 0 then 209 orxonox.execute("hideGUI "..activeMenuSheets[counter].sheet.name) 184 210 else 185 211 showMenuSheet("InGameMenu") … … 189 215 function setBackgroundImage(imageSet, imageName) 190 216 guiMgr:setBackgroundImage(imageSet, imageName) 217 end 218 219 function noInputSheetCounter() 220 -- Count the number of sheets that don't need input till the first that does. 221 local counter = activeMenuSheets.size 222 while counter > 0 and activeMenuSheets[counter].bNoInput do 223 counter = counter - 1 224 end 225 return counter 191 226 end 192 227 -
code/trunk/data/levels/Fight in our Back.oxw
r7163 r7403 7 7 include("templates/spaceship_Transporter.oxt") 8 8 ?> 9 10 <NotificationQueue11 name = "notification"12 position = "0.40, 0.05"13 font = "VeraMono"14 textsize = 0.02015 length = 316 width = 5017 />18 9 19 10 <!--*****************************************************************************************************************************************************************************************--> -
code/trunk/data/levels/Quest_PirateAttack.oxw
r7163 r7403 19 19 dofile("includes/CuboidSpaceStation.lua") 20 20 ?> 21 22 <NotificationQueue23 name = "notification"24 position = "0.40, 0.05"25 font = "VeraMono"26 textsize = 0.02027 length = 328 width = 5029 />30 31 32 21 33 22 <Level -
code/trunk/data/levels/old/princessaeryn.oxw
r6417 r7403 8 8 dofile("includes/CuboidSpaceStation.lua") 9 9 ?> 10 11 <NotificationQueue12 name = "notification"13 position = "1.0, 1.0"14 targets = "questsystem"15 />16 10 17 11 <Level -
code/trunk/data/levels/old/questsystem.oxw
r6417 r7403 4 4 include("templates/spaceship_assff.oxt") 5 5 ?> 6 7 <NotificationQueue8 name = "notification"9 position = "1.0, 1.0"10 targets = "all"11 />12 6 13 7 <Level -
code/trunk/data/levels/princessaeryn.oxw
r7163 r7403 14 14 description = "The Tale of Princess Aeryn" 15 15 > 16 17 <NotificationQueue18 name = "notification"19 position = "0.55, 0.05"20 font = "VeraMono"21 textsize = 0.02022 length = 323 width = 5024 />25 16 26 17 <templates> -
code/trunk/data/levels/tutorial.oxw
r7210 r7403 14 14 </templates> 15 15 16 <NotificationQueue17 name = "notification"18 position = "0.05, 0.05"19 font = "VeraMono"20 textsize = 0.02021 length = 322 width = 5023 />24 25 16 <Scene 26 17 ambientlight = "0.5, 0.5, 0.5" … … 28 19 > 29 20 30 <CommandNotification preMessage=" Press '" postMessage="' to fire your primary weapon." command="fire 0">21 <CommandNotification preMessage="Move '" postMessage="' to look left." command="scale 1 rotateYaw"> 31 22 <events> 32 23 <trigger> 33 <DistanceTrigger name=trigger position="0,0,-100" distance=10 target="Pawn"> 34 <attached> 35 <Billboard position="0,0,0" colour="1.0,1.0,0" material="Examples/Flare" /> 36 </attached> 37 </DistanceTrigger> 24 <DistanceTrigger name=trigger position="0,0,-100" distance=10 target="Pawn" /> 38 25 </trigger> 39 26 </events> 40 27 </CommandNotification> 28 <Billboard position="0,0,-100" colour="1.0,1.0,0" material="Examples/Flare" /> 41 29 42 30 <SimpleNotification message="Awesome!!!"> 43 31 <events> 44 32 <trigger> 45 <DistanceTrigger name=trigger position="0,0,100" distance=10 target="Pawn"> 46 <attached> 47 <Billboard position="0,0,0" colour="1.0,0,1.0" material="Examples/Flare" /> 48 </attached> 49 </DistanceTrigger> 33 <DistanceTrigger name=trigger position="0,0,100" distance=10 target="Pawn" /> 50 34 </trigger> 51 35 </events> 52 36 </SimpleNotification> 37 <Billboard position="0,0,100" colour="1.0,0,1.0" material="Examples/Flare" /> 53 38 54 <Drone name="meineDrohne" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">55 <attached>56 <Model scale="1" mesh="drone.mesh"/>57 </attached>58 <collisionShapes>59 <BoxCollisionShape position="0,0,0" halfExtents="10, 10, 10" />60 </collisionShapes>61 </Drone>62 39 63 <Drone name="meineDrohne" primarythrust="80" auxilarythrust="10" rotationthrust="10" mass= "50" linearDamping = "0.9" angularDamping = "0.7">64 <attached>65 <Model scale="1" mesh="rocket.mesh"/>66 </attached>67 <collisionShapes>68 <BoxCollisionShape position="0,0,0" halfExtents="10, 10, 10" />69 </collisionShapes>70 </Drone>71 40 72 41 <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" /> 73 42 74 <Model mesh="hs-w01.mesh" scale=10 position="0,0,-100" />75 <Model mesh="hs-w01s.mesh" scale=10 position="0,0,-100" />76 43 77 44 <?lua … … 81 48 <?lua end ?> 82 49 83 <GlobalShader compositor="Bloom" visible=false>84 <events>85 <visibility>86 <DistanceTrigger position="0,0,0" distance=30 target="Spectator" switch=true />87 </visibility>88 </events>89 </GlobalShader>90 <Model position="0,0,0" scale=8 mesh="ast1.mesh" />91 <StaticEntity position="0,0,0" collisionType=static>92 <collisionShapes>93 <SphereCollisionShape radius="20" />94 </collisionShapes>95 </StaticEntity>96 97 <!--98 <?lua99 for i = 1, 70, 1 do100 ?>101 <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 1000 + 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">102 <attached>103 <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />104 </attached>105 </MovableEntity>106 <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * -1000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">107 <attached>108 <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />109 </attached>110 </MovableEntity>111 112 <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * 1000 + 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">113 <attached>114 <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />115 </attached>116 </MovableEntity>117 <MovableEntity position="<?lua print(math.random() * 6000 - 3000)?>, <?lua print(math.random() * -1000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">118 <attached>119 <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />120 </attached>121 </MovableEntity>122 123 <MovableEntity position="<?lua print(math.random() * 1000 + 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">124 <attached>125 <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />126 </attached>127 </MovableEntity>128 <MovableEntity position="<?lua print(math.random() * -1000 - 3000)?>, <?lua print(math.random() * 6000 - 3000) ?>, <?lua print(math.random() * 6000 - 3000) ?>" rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>">129 <attached>130 <Model scale="<?lua print(math.random() * 30 + 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" shadow=false />131 </attached>132 </MovableEntity>133 <?lua end ?>134 -->135 50 136 51 </Scene>
Note: See TracChangeset
for help on using the changeset viewer.