[Orxonox-commit 6728] r11356 - in code/trunk: . data/gui/layouts data/gui/scripts src/modules/dodgerace src/modules/invader src/modules/jump src/modules/tetris src/modules/towerdefense src/orxonox
patricwi at orxonox.net
patricwi at orxonox.net
Thu Mar 9 15:38:58 CET 2017
Author: patricwi
Date: 2017-03-09 15:38:58 +0100 (Thu, 09 Mar 2017)
New Revision: 11356
Added:
code/trunk/data/gui/layouts/HighscoreMenu.layout
code/trunk/data/gui/scripts/HighscoreMenu.lua
code/trunk/src/orxonox/Highscore.cc
code/trunk/src/orxonox/Highscore.h
Modified:
code/trunk/
code/trunk/data/gui/layouts/MainMenu.layout
code/trunk/data/gui/scripts/MainMenu.lua
code/trunk/data/gui/scripts/MiscConfigMenu.lua
code/trunk/src/modules/dodgerace/DodgeRace.cc
code/trunk/src/modules/invader/Invader.cc
code/trunk/src/modules/jump/Jump.cc
code/trunk/src/modules/tetris/Tetris.cc
code/trunk/src/modules/towerdefense/TowerDefense.cc
code/trunk/src/orxonox/CMakeLists.txt
code/trunk/src/orxonox/LevelInfo.cc
code/trunk/src/orxonox/LevelInfo.h
Log:
merged space race with trunk
Property changes on: code/trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /code/branches/AI_HS15:10640-10832
/code/branches/HUD_HS16:11212-11353
/code/branches/ParticleEffectsFS15:10309-10612
/code/branches/Racingbot:9388-9513
/code/branches/SciptableControllerFS15:10308-10613
/code/branches/ScriptableController:9999-10075
/code/branches/ai:6592-7033
/code/branches/ai2:8721-8880
/code/branches/bigships:8137-8588
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/campaignHS15:10639-10973
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/clangenb:10385-10609
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/core6:9552-9666
/code/branches/core7:10328-10623
/code/branches/cpp11:10439-10732
/code/branches/cpp11_v2:10732-11067
/code/branches/cpp11_v3:11053-11070
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/environment3:8887-8975
/code/branches/explosionChunksHS15:10641-10961
/code/branches/fabienHS15:10685-11033
/code/branches/formation:8885-8991
/code/branches/formationFS15:10320-10610
/code/branches/formationupdate:9580-9624
/code/branches/fps:6591-7072
/code/branches/gamecontent:8893-8968
/code/branches/gameimmersion:8102-8577
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hoverHS15:10633-10959
/code/branches/hud:8883-8986
/code/branches/hudHS14:10083-10241
/code/branches/hudelements:6584-6941
/code/branches/hudimprovements:7920-8672
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/invaders:9694-9896
/code/branches/ipv6:7293-7458
/code/branches/keckslevelHS14:10082-10222
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/largeShip1:9384-9515
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/levelElias:9697-9921
/code/branches/levelKaan:9695-9921
/code/branches/levelMichael:9696-9921
/code/branches/leveljoemeHS14:10087-10223
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/libs:9668-9674
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/masterserverfix:8933-8936
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/menue:8884-8976
/code/branches/minigame4DHS14:10081-10230
/code/branches/miniprojects:2754-2824
/code/branches/modularships:9994-10071
/code/branches/multiplayerFS15:10324-10611
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/newlevel2012:9033-9244
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/output:8739-8857
/code/branches/overlay:2117-2385
/code/branches/pCuts:9023-9284
/code/branches/particleEffectsHS15:10644-10962
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup2012:9029-9189
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/pickupsFS14:10000-10259
/code/branches/planetLevelHS15:10637-10966
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/portals2:8460-8602
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786,8500-8705
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation2011:8974-9015
/code/branches/presentation2012:9189-9268
/code/branches/presentation2012merge:9266-9347
/code/branches/presentation3:6913-7162
/code/branches/presentationFS14:10069-10215
/code/branches/presentationFS15:10499
/code/branches/presentationFS15merge:10595-10621
/code/branches/presentationHS12:9481-9525
/code/branches/presentationHS13:9891-9938
/code/branches/presentationHS14merge:10222-10257
/code/branches/presentationHS15:10959-11055
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/radarDreiD:9690-9901
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/sfxThilo:9691-9917
/code/branches/shaders:9379-11072
/code/branches/shaders_merge:11072-11079
/code/branches/shipSelection:9038-9206
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound2012:9205-9214
/code/branches/sound3:5941-6102
/code/branches/soundEffects:9382-11020
/code/branches/spaceNavigation:9381-9497
/code/branches/spaceboundaries:8085-8457
/code/branches/spaceboundaries2:8460-8613
/code/branches/spacerace:8182-8630
/code/branches/spaceraceTwo:8881-8996
/code/branches/spacestationentry:9699-9905
/code/branches/steering:5949-6091,8140-8595
/code/branches/storymodeHS14:10085-10254
/code/branches/surfaceRace:9028-9199
/code/branches/surfaceraceHS14:10080-10236
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/towerdefenseFS15:10283-10614
/code/branches/towerdefenseHS14:10086-10247
/code/branches/turret:9380-9501
/code/branches/turretFS14:9998-10070
/code/branches/tutoriallevel:7827-8370
/code/branches/tutoriallevel2:8370-8452
/code/branches/tutoriallevel3:8453-8636
/code/branches/unity_build:8440-8716
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weaponFS15:10302-10615
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
/code/branches/weaponupdateHS14:10084-10237
+ /code/branches/AI_HS15:10640-10832
/code/branches/HUD_HS16:11212-11353
/code/branches/Highscore_HS16:11226-11355
/code/branches/ParticleEffectsFS15:10309-10612
/code/branches/Racingbot:9388-9513
/code/branches/SciptableControllerFS15:10308-10613
/code/branches/ScriptableController:9999-10075
/code/branches/ai:6592-7033
/code/branches/ai2:8721-8880
/code/branches/bigships:8137-8588
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/campaignHS15:10639-10973
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/clangenb:10385-10609
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/core6:9552-9666
/code/branches/core7:10328-10623
/code/branches/cpp11:10439-10732
/code/branches/cpp11_v2:10732-11067
/code/branches/cpp11_v3:11053-11070
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/environment3:8887-8975
/code/branches/explosionChunksHS15:10641-10961
/code/branches/fabienHS15:10685-11033
/code/branches/formation:8885-8991
/code/branches/formationFS15:10320-10610
/code/branches/formationupdate:9580-9624
/code/branches/fps:6591-7072
/code/branches/gamecontent:8893-8968
/code/branches/gameimmersion:8102-8577
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hoverHS15:10633-10959
/code/branches/hud:8883-8986
/code/branches/hudHS14:10083-10241
/code/branches/hudelements:6584-6941
/code/branches/hudimprovements:7920-8672
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/invaders:9694-9896
/code/branches/ipv6:7293-7458
/code/branches/keckslevelHS14:10082-10222
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/largeShip1:9384-9515
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/levelElias:9697-9921
/code/branches/levelKaan:9695-9921
/code/branches/levelMichael:9696-9921
/code/branches/leveljoemeHS14:10087-10223
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/libs:9668-9674
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/masterserverfix:8933-8936
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/menue:8884-8976
/code/branches/minigame4DHS14:10081-10230
/code/branches/miniprojects:2754-2824
/code/branches/modularships:9994-10071
/code/branches/multiplayerFS15:10324-10611
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/newlevel2012:9033-9244
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/output:8739-8857
/code/branches/overlay:2117-2385
/code/branches/pCuts:9023-9284
/code/branches/particleEffectsHS15:10644-10962
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup2012:9029-9189
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/pickupsFS14:10000-10259
/code/branches/planetLevelHS15:10637-10966
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/portals2:8460-8602
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786,8500-8705
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation2011:8974-9015
/code/branches/presentation2012:9189-9268
/code/branches/presentation2012merge:9266-9347
/code/branches/presentation3:6913-7162
/code/branches/presentationFS14:10069-10215
/code/branches/presentationFS15:10499
/code/branches/presentationFS15merge:10595-10621
/code/branches/presentationHS12:9481-9525
/code/branches/presentationHS13:9891-9938
/code/branches/presentationHS14merge:10222-10257
/code/branches/presentationHS15:10959-11055
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/radarDreiD:9690-9901
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/sfxThilo:9691-9917
/code/branches/shaders:9379-11072
/code/branches/shaders_merge:11072-11079
/code/branches/shipSelection:9038-9206
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound2012:9205-9214
/code/branches/sound3:5941-6102
/code/branches/soundEffects:9382-11020
/code/branches/spaceNavigation:9381-9497
/code/branches/spaceboundaries:8085-8457
/code/branches/spaceboundaries2:8460-8613
/code/branches/spacerace:8182-8630
/code/branches/spaceraceTwo:8881-8996
/code/branches/spacestationentry:9699-9905
/code/branches/steering:5949-6091,8140-8595
/code/branches/storymodeHS14:10085-10254
/code/branches/surfaceRace:9028-9199
/code/branches/surfaceraceHS14:10080-10236
/code/branches/testing:9015-9549
/code/branches/tetris:8100-8563
/code/branches/towerdefenseFS15:10283-10614
/code/branches/towerdefenseHS14:10086-10247
/code/branches/turret:9380-9501
/code/branches/turretFS14:9998-10070
/code/branches/tutoriallevel:7827-8370
/code/branches/tutoriallevel2:8370-8452
/code/branches/tutoriallevel3:8453-8636
/code/branches/unity_build:8440-8716
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weaponFS15:10302-10615
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
/code/branches/weaponupdateHS14:10084-10237
Copied: code/trunk/data/gui/layouts/HighscoreMenu.layout (from rev 11355, code/branches/Highscore_HS16/data/gui/layouts/HighscoreMenu.layout)
===================================================================
--- code/trunk/data/gui/layouts/HighscoreMenu.layout (rev 0)
+++ code/trunk/data/gui/layouts/HighscoreMenu.layout 2017-03-09 14:38:58 UTC (rev 11356)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+ <Window Type="DefaultWindow" Name="orxonox/HighscoreMenu/Background" >
+ <Property Name="InheritsAlpha" Value="False" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+ <Window Type="MenuWidgets/StaticText" Name="orxonox/HighscoreWindow" >
+ <Property Name="Text" Value="Highscore" />
+ <Property Name="Alpha" Value="0.8" />
+ <Property Name="InheritsAlpha" Value="False" />
+ <Property Name="HorzFormatting" Value="HorzCentred" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="VertFormatting" Value="TopAligned" />
+ <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.1,0},{0.85,0},{0.85,0}}" />
+ <Window Type="MenuWidgets/TabControl" Name="orxonox/HighscoreTabControl" >
+ <Property Name="TabHeight" Value="{0,30}" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="TabPanePosition" Value="Top" />
+ <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.105,0},{0.95,0},{0.99,0}}" />
+ </Window>
+ <!--<Window Type="MenuWidgets/StaticText" Name="orxonox/HighscoreMenuWrapper" >
+ <Property Name="InheritsAlpha" Value="False" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="HorzFormatting" Value="HorzCentred" />
+ <Property Name="VertFormatting" Value="TopAligned" />
+ <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" />
+ <Window Type="MenuWidgets/ScrollablePane" Name="orxonox/HighscoreMenuPane" >
+ <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" />
+ <Property Name="HorzStepSize" Value="0.005" />
+ <Property Name="VertStepSize" Value="0.005" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="HorzOverlapSize" Value="0.01" />
+ <Property Name="UnifiedAreaRect" Value="{{0.005,0},{0.01,0},{0.995,0},{0.99,0}}" />
+ <Property Name="VertOverlapSize" Value="0.01" />
+ <Property Name="HorzScrollPosition" Value="0" />
+ <Property Name="VertScrollPosition" Value="0" />
+ </Window>
+
+ </Window>
+ -->
+ </Window>
+ <Window Type="MenuWidgets/Button" Name="orxonox/HighscoreBackButton" >
+ <Property Name="Text" Value="Back" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.8625,0},{0.6,0},{0.9125,0}}" />
+ <Event Name="Clicked" Function="HighscoreMenu.HighscoreBackButton_clicked"/>
+ </Window>
+ </Window>
+</GUILayout>
Modified: code/trunk/data/gui/layouts/MainMenu.layout
===================================================================
--- code/trunk/data/gui/layouts/MainMenu.layout 2017-03-09 14:02:38 UTC (rev 11355)
+++ code/trunk/data/gui/layouts/MainMenu.layout 2017-03-09 14:38:58 UTC (rev 11356)
@@ -10,37 +10,43 @@
<Window Type="MenuWidgets/Button" Name="orxonox/QuickGameTestButton" >
<Property Name="Text" Value="Quickstart" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2875,0},{0.6,0},{0.3375,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.25,0},{0.6,0},{0.3,0}}" />
<Event Name="Clicked" Function="MainMenu.QuickGameTestButton_clicked"/>
</Window>
<Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerButton" >
<Property Name="Text" Value="Singleplayer" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.325,0},{0.6,0},{0.375,0}}" />
<Event Name="Clicked" Function="MainMenu.SingleplayerButton_clicked"/>
</Window>
<Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerButton" >
<Property Name="Text" Value="Multiplayer" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4375,0},{0.6,0},{0.4875,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4,0},{0.6,0},{0.45,0}}" />
<Event Name="Clicked" Function="MainMenu.MultiplayerButton_clicked"/>
</Window>
+ <Window Type="MenuWidgets/Button" Name="orxonox/HighscoreButton" >
+ <Property Name="Text" Value="Highscore" />
+ <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.475,0},{0.6,0},{0.525,0}}" />
+ <Event Name="Clicked" Function="MainMenu.HighscoreButton_clicked"/>
+ </Window>
<Window Type="MenuWidgets/Button" Name="orxonox/SettingsButton" >
<Property Name="Text" Value="Settings" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5125,0},{0.6,0},{0.5625,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.55,0},{0.6,0},{0.6,0}}" />
<Event Name="Clicked" Function="MainMenu.SettingsButton_clicked"/>
</Window>
<Window Type="MenuWidgets/Button" Name="orxonox/CreditsButton" >
<Property Name="Text" Value="Credits" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5875,0},{0.6,0},{0.6375,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
<Event Name="Clicked" Function="MainMenu.CreditsButton_clicked"/>
</Window>
<Window Type="MenuWidgets/Button" Name="orxonox/ExitButton" >
<Property Name="Text" Value="Exit" />
<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
- <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
+ <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.7,0},{0.6,0},{0.75,0}}" />
<Event Name="Clicked" Function="MainMenu.ExitButton_clicked"/>
</Window>
</Window>
Copied: code/trunk/data/gui/scripts/HighscoreMenu.lua (from rev 11355, code/branches/Highscore_HS16/data/gui/scripts/HighscoreMenu.lua)
===================================================================
--- code/trunk/data/gui/scripts/HighscoreMenu.lua (rev 0)
+++ code/trunk/data/gui/scripts/HighscoreMenu.lua 2017-03-09 14:38:58 UTC (rev 11356)
@@ -0,0 +1,169 @@
+-- HighscoreMenu.lua
+
+local P = createMenuSheet("HighscoreMenu")
+
+P.highscoreList = {}
+P.tabList = {}
+P.linesList = {}
+P.levelList = {}
+
+
+P.imageHeight = 50
+
+function P.onLoad()
+ P.createLevelList()
+end
+
+function P.onShow()
+
+ -- reset tables
+ P.highscoreList = {}
+ P.tabList = {}
+ P.linesList = {}
+
+ -- fetch save scores and write it into the list
+ for i=orxonox.Highscore:getInstance():getNumberOfHighscores()-1,0,-1 do
+ table.insert(P.highscoreList, orxonox.Highscore:getInstance():getHighscore(i))
+
+ end
+
+ -- read minigames out of the levelList
+ for k,v in pairs(P.levelList) do
+ if(v:getName() ~= "Hover level" and v:getName() ~= "Pong") then -- hover and pong dont contain relevant scores
+ P.createFilterTab(v:getName(), v:getName())
+ end
+ end
+
+end
+function P.onHide()
+
+ -- delete old windows to reload them on show
+ local tabControl = winMgr:getWindow("orxonox/HighscoreTabControl")
+ for k,v in pairs(P.tabList) do
+ local default = winMgr:getWindow(v)
+ tabControl:removeChildWindow(default)
+ winMgr:destroyWindow(default)
+ end
+end
+function P.createLevelList()
+ P.levelList = {}
+ local size = orxonox.LevelManager:getInstance():getNumberOfLevels()
+ local index = 0
+ local level = nil
+ while index < size do
+ level = orxonox.LevelManager:getInstance():getAvailableLevelListItem(index)
+ if (level ~= nil and level:getXMLFilename() ~= "_temp.oxw" and level:hasTag("minigame")) then
+ table.insert(P.levelList, level)
+ end
+ index = index + 1
+ end
+end
+function P.createFilterTab(name, tag)
+ -- create unique tab window name
+ local tabName = "orxonox/HighscoreLevelTab"
+ if tag ~= nil then
+ tabName = tabName..tag
+ end
+
+ table.insert(P.tabList, tabName)
+ -- create new tab window with desired name
+ local default = (winMgr:createWindow("DefaultWindow", tabName))
+ default:setText(name)
+ default:setProperty("UnifiedMaxSize", "{{1,0},{1,0}}")
+ default:setProperty("UnifiedAreaRect", "{{0,0},{0,0},{1,0},{1,0}}")
+ local pane = winMgr:createWindow("MenuWidgets/ScrollablePane", tabName .. "pane")
+ pane:setSize(CEGUI.UVector2(CEGUI.UDim(1,0),CEGUI.UDim(1,0)))
+ default:addChildWindow(pane)
+
+
+ local offset = 2
+ for k,v in pairs(P.highscoreList) do
+ -- split the score ("Playername./.game./.score")
+ local splitlist = P.Split(v,"./.")
+ if(splitlist[2] == name)then
+ local line = P.createPickupEntry(tabName .. k,k,tag)
+ table.insert(P.linesList, line)
+ line:setYPosition(CEGUI.UDim(0,offset))
+ offset = offset + line:getHeight():asAbsolute(1)+2
+ pane:addChildWindow(line)
+ end
+
+ end
+
+ local tabControl = winMgr:getWindow("orxonox/HighscoreTabControl")
+ tabControl:addChildWindow(default)
+
+
+
+end
+function P.createPickupEntry(parent,k,tag)
+
+ local name = "orxonox/HiscoreEntry" .. parent
+ local splitlist = P.Split(P.highscoreList[k],"./.")
+ local item = winMgr:createWindow("DefaultWindow", name)
+ item:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(0, P.imageHeight)))
+ item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))
+
+ local player = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Player")
+ player:setText(splitlist[1])
+ player:setPosition(CEGUI.UVector2(CEGUI.UDim(0.005,0), CEGUI.UDim(0,0)))
+ player:setSize(CEGUI.UVector2(CEGUI.UDim(0.49, 0), CEGUI.UDim(0, P.imageHeight)))
+
+ item:addChildWindow(player)
+
+ local score = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Score")
+ score:setText(splitlist[3])
+ score:setPosition(CEGUI.UVector2(CEGUI.UDim(0.5,0), CEGUI.UDim(0,0)))
+ score:setSize(CEGUI.UVector2(CEGUI.UDim(0.495, 0), CEGUI.UDim(0, P.imageHeight)))
+
+ item:addChildWindow(score)
+
+ return item
+end
+function P.HighscoreGetSelectedLevel()
+ -- choose the active listbox
+ local tabControl = CEGUI.toTabControl(winMgr:getWindow("orxonox/HighscoreTabControl"))
+ local listbox = CEGUI.toListbox(tabControl:getTabContentsAtIndex(tabControl:getSelectedTabIndex()))
+ local choice = listbox:getFirstSelectedItem()
+ if choice ~= nil then
+ -- get the right tab and the right index
+ local tabIndexes = P.activeTabIndexes[tabControl:getSelectedTabIndex()+1]
+ local index = tabIndexes[listbox:getItemIndex(choice)+1]
+ return P.levelList[index]
+ else
+ return nil
+ end
+end
+function P.Split(str, delim, maxNb)
+ -- Eliminate bad cases...
+ if string.find(str, delim) == nil then
+ return { str }
+ end
+ if maxNb == nil or maxNb < 1 then
+ maxNb = 0 -- No limit
+ end
+ local result = {}
+ local pat = "(.-)" .. delim .. "()"
+ local nb = 0
+ local lastPos
+ for part, pos in string.gfind(str, pat) do
+ nb = nb + 1
+ result[nb] = part
+ lastPos = pos
+ if nb == maxNb then break end
+ end
+ -- Handle the last field
+ if nb ~= maxNb then
+ result[nb + 1] = string.sub(str, lastPos)
+ end
+ return result
+end
+
+
+
+function P.HighscoreBackButton_clicked(e)
+ hideMenuSheet(P.name)
+end
+
+return P
+
Modified: code/trunk/data/gui/scripts/MainMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/MainMenu.lua 2017-03-09 14:02:38 UTC (rev 11355)
+++ code/trunk/data/gui/scripts/MainMenu.lua 2017-03-09 14:38:58 UTC (rev 11356)
@@ -1,7 +1,7 @@
-- MainMenu.lua
local P = createMenuSheet("MainMenu")
-P.loadAlong = { "SingleplayerMenu", "MultiplayerMenu", "SettingsMenu", "CreditsMenu" }
+P.loadAlong = { "SingleplayerMenu", "MultiplayerMenu", "HighscoreMenu", "SettingsMenu", "CreditsMenu" }
function P.onLoad()
--buttons are arranged in a 6x1 Matrix (list)
@@ -21,16 +21,21 @@
})
P:setButton(4, 1, {
+ ["button"] = winMgr:getWindow("orxonox/HighscoreButton"),
+ ["callback"] = P.MultiplayerButton_clicked
+ })
+
+ P:setButton(5, 1, {
["button"] = winMgr:getWindow("orxonox/SettingsButton"),
["callback"] = P.SettingsButton_clicked
})
- P:setButton(5, 1, {
+ P:setButton(6, 1, {
["button"] = winMgr:getWindow("orxonox/CreditsButton"),
["callback"] = P.CreditsButton_clicked
})
- P:setButton(6, 1, {
+ P:setButton(7, 1, {
["button"] = winMgr:getWindow("orxonox/ExitButton"),
["callback"] = P.ExitButton_clicked
})
@@ -50,6 +55,10 @@
showMenuSheet("MultiplayerMenu", true)
end
+function P.HighscoreButton_clicked(e)
+ showMenuSheet("HighscoreMenu", true)
+end
+
function P.SettingsButton_clicked(e)
showMenuSheet("SettingsMenu", true)
end
Modified: code/trunk/data/gui/scripts/MiscConfigMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/MiscConfigMenu.lua 2017-03-09 14:02:38 UTC (rev 11355)
+++ code/trunk/data/gui/scripts/MiscConfigMenu.lua 2017-03-09 14:38:58 UTC (rev 11356)
@@ -17,6 +17,7 @@
function P.onLoad()
P.commandList = {}
+ table.insert(P.commandList, "Highscore playerName_")
table.insert(P.commandList, "KeyBinder mouseSensitivity_")
table.insert(P.commandList, "KeyBinder mouseSensitivityDerived_")
table.insert(P.commandList, "KeyBinder bDeriveMouseInput_")
@@ -42,6 +43,7 @@
table.insert(P.commandList, "HUDRadar RadarMode_")
P.nameList = {}
+ table.insert(P.nameList, "Playername")
table.insert(P.nameList, "Mouse sensitivity")
table.insert(P.nameList, "Mouse acceleration")
table.insert(P.nameList, "Derive mouse input")
Modified: code/trunk/src/modules/dodgerace/DodgeRace.cc
===================================================================
--- code/trunk/src/modules/dodgerace/DodgeRace.cc 2017-03-09 14:02:38 UTC (rev 11355)
+++ code/trunk/src/modules/dodgerace/DodgeRace.cc 2017-03-09 14:38:58 UTC (rev 11356)
@@ -35,6 +35,7 @@
#include "DodgeRaceShip.h" // Necessary for getPlayer function. Do NOT include this in Header!
#include "DodgeRaceCube.h"
#include "core/CoreIncludes.h"
+#include "Highscore.h"
namespace orxonox
{
@@ -223,6 +224,12 @@
// Deathmatch::end();
// It will misteriously crash the game!
// Instead startMainMenu, this won't crash.
+ if (Highscore::exists()){
+ int score = this->getPoints();
+ if(score > Highscore::getInstance().getHighestScoreOfGame("Dodge Race"))
+ Highscore::getInstance().storeHighscore("Dodge Race",score);
+
+ }
GSLevel::startMainMenu();
}
}
Modified: code/trunk/src/modules/invader/Invader.cc
===================================================================
--- code/trunk/src/modules/invader/Invader.cc 2017-03-09 14:02:38 UTC (rev 11355)
+++ code/trunk/src/modules/invader/Invader.cc 2017-03-09 14:38:58 UTC (rev 11356)
@@ -32,7 +32,7 @@
*/
#include "Invader.h"
-
+#include "Highscore.h"
#include "core/CoreIncludes.h"
#include "core/EventIncludes.h"
#include "core/command/Executor.h"
@@ -188,6 +188,12 @@
// Deathmatch::end();
// It will misteriously crash the game!
// Instead startMainMenu, this won't crash.
+ if (Highscore::exists()){
+ int score = this->getPoints();
+ if(score > Highscore::getInstance().getHighestScoreOfGame("Orxonox Arcade"))
+ Highscore::getInstance().storeHighscore("Orxonox Arcade",score);
+
+ }
GSLevel::startMainMenu();
}
}
Modified: code/trunk/src/modules/jump/Jump.cc
===================================================================
--- code/trunk/src/modules/jump/Jump.cc 2017-03-09 14:02:38 UTC (rev 11355)
+++ code/trunk/src/modules/jump/Jump.cc 2017-03-09 14:38:58 UTC (rev 11356)
@@ -33,6 +33,7 @@
#include "Jump.h"
#include "core/CoreIncludes.h"
+#include "Highscore.h"
#include "JumpCenterpoint.h"
#include "JumpPlatform.h"
@@ -310,7 +311,12 @@
{
cleanup();
GSLevel::startMainMenu();
+ if (Highscore::exists()){
+ int score = this->getScore(this->getPlayer());
+ if(score > Highscore::getInstance().getHighestScoreOfGame("Jump"))
+ Highscore::getInstance().storeHighscore("Jump",score);
+ }
Deathmatch::end();
}
Modified: code/trunk/src/modules/tetris/Tetris.cc
===================================================================
--- code/trunk/src/modules/tetris/Tetris.cc 2017-03-09 14:02:38 UTC (rev 11355)
+++ code/trunk/src/modules/tetris/Tetris.cc 2017-03-09 14:38:58 UTC (rev 11356)
@@ -38,6 +38,7 @@
*/
#include "Tetris.h"
+#include "Highscore.h"
#include "core/CoreIncludes.h"
#include "core/EventIncludes.h"
@@ -326,7 +327,12 @@
{
this->player_->stopControl();
}
+ if (Highscore::exists()){
+ int score = this->getScore(this->getPlayer());
+ if(score > Highscore::getInstance().getHighestScoreOfGame("Tetris"))
+ Highscore::getInstance().storeHighscore("Tetris",score);
+ }
this->cleanup();
// Call end for the parent class.
Modified: code/trunk/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/trunk/src/modules/towerdefense/TowerDefense.cc 2017-03-09 14:02:38 UTC (rev 11355)
+++ code/trunk/src/modules/towerdefense/TowerDefense.cc 2017-03-09 14:38:58 UTC (rev 11356)
@@ -80,6 +80,7 @@
#include "infos/PlayerInfo.h"
#include "chat/ChatManager.h"
#include "core/CoreIncludes.h"
+#include "Highscore.h"
namespace orxonox
{
@@ -196,7 +197,12 @@
void TowerDefense::end()
{
+ if (Highscore::exists()){
+ int score = this->getWaveNumber();
+ if(score > Highscore::getInstance().getHighestScoreOfGame("Tower Defense"))
+ Highscore::getInstance().storeHighscore("Tower Defense",score);
+ }
TeamDeathmatch::end();
ChatManager::message("Match is over! Gameover!");
Modified: code/trunk/src/orxonox/CMakeLists.txt
===================================================================
--- code/trunk/src/orxonox/CMakeLists.txt 2017-03-09 14:02:38 UTC (rev 11355)
+++ code/trunk/src/orxonox/CMakeLists.txt 2017-03-09 14:38:58 UTC (rev 11356)
@@ -27,6 +27,7 @@
Level.cc
LevelInfo.cc
LevelManager.cc
+ Highscore.cc
Main.cc
MoodManager.cc
PlayerManager.cc
@@ -60,6 +61,7 @@
chat/ChatInputHandler.h
LevelInfo.h
LevelManager.h
+ Highscore.h
MoodManager.h
controllers/HumanController.h
infos/PlayerInfo.h
Copied: code/trunk/src/orxonox/Highscore.cc (from rev 11355, code/branches/Highscore_HS16/src/orxonox/Highscore.cc)
===================================================================
--- code/trunk/src/orxonox/Highscore.cc (rev 0)
+++ code/trunk/src/orxonox/Highscore.cc 2017-03-09 14:38:58 UTC (rev 11356)
@@ -0,0 +1,58 @@
+#include "Highscore.h"
+
+#include <vector>
+#include "core/CoreIncludes.h"
+#include "core/config/ConfigValueIncludes.h"
+#include "core/singleton/ScopedSingletonIncludes.h"
+
+namespace orxonox
+{
+
+ ManageScopedSingleton(Highscore, ScopeID::ROOT, false);
+ RegisterClassNoArgs(Highscore);
+
+ Highscore::Highscore()
+ {
+ RegisterObject(Highscore);
+ this->setConfigValues();
+ }
+ /**
+ * @brief set the config values in the orxonox.ini file
+ */
+ void Highscore::setConfigValues()
+ {
+ SetConfigValue(highscores_, std::vector<std::string>()).description("Highscores saved as vector");
+ SetConfigValue(playerName_, "Player").description("Name of the player");
+ }
+ /**
+ * @brief Returns highest score of given game, if exists.
+ * Else returns -1.
+ */
+ int Highscore::getHighestScoreOfGame(std::string game){
+ std::string delimiter = "./."; //score save as "Playername./.game./.score"
+ int best = -1;
+ //check for the highest Score of given game
+ for (std::string score : this->highscores_)
+ {
+ //filter the game string from given highscore
+ score.erase(0, score.find(delimiter) + delimiter.length());
+ if(game.compare(score.substr(0,score.find(delimiter))) == 0){
+ score.erase(0, score.find(delimiter) + delimiter.length());
+ int possibleBest = std::stoi(score);
+ if(possibleBest > best) best = possibleBest;
+ }
+
+
+ }
+
+ return best;
+
+ }
+ /**
+ * @brief stores a new highscore in the orxonox.ini file
+ */
+ void Highscore::storeHighscore(std::string level, int points){
+ ModifyConfigValue(highscores_, add, playerName_+"./."+level+"./."+std::to_string(points));
+ }
+
+}
Copied: code/trunk/src/orxonox/Highscore.h (from rev 11355, code/branches/Highscore_HS16/src/orxonox/Highscore.h)
===================================================================
--- code/trunk/src/orxonox/Highscore.h (rev 0)
+++ code/trunk/src/orxonox/Highscore.h 2017-03-09 14:38:58 UTC (rev 11356)
@@ -0,0 +1,39 @@
+#include <string>
+#include "core/config/Configurable.h"
+#include "OrxonoxPrereqs.h"
+#include "util/Singleton.h"
+// tolua_begin
+namespace orxonox
+{
+class _OrxonoxExport Highscore
+// tolua_end
+ : public Singleton<Highscore>, public Configurable
+{ //tolua_export
+ friend class Singleton<Highscore>;
+ public:
+ Highscore(); // Constructor
+ void setConfigValues(); // Inherited function
+ void storeHighscore(std::string level, int points);
+
+ int getHighestScoreOfGame(std::string game);
+ // tolua_begin
+ inline unsigned int getNumberOfHighscores()
+ { return this->highscores_.size(); }
+ inline const std::string& getHighscore(unsigned int index)
+ { return this->highscores_[index]; }
+
+ static Highscore& getInstance()
+ { return Singleton<Highscore>::getInstance(); }
+
+ // tolua_end
+
+
+ private:
+ std::vector<std::string> highscores_;
+ float version_;
+ std::string playerName_;
+ static Highscore* singletonPtr_s;
+}; //tolua_export
+
+
+} //tolua_export
\ No newline at end of file
Modified: code/trunk/src/orxonox/LevelInfo.cc
===================================================================
--- code/trunk/src/orxonox/LevelInfo.cc 2017-03-09 14:02:38 UTC (rev 11355)
+++ code/trunk/src/orxonox/LevelInfo.cc 2017-03-09 14:38:58 UTC (rev 11356)
@@ -150,6 +150,16 @@
return success;
}
+ bool LevelInfoItem::addHighscore(const std::string& name, const int score)
+ {
+ std::stringstream stream;
+ stream << name << "/:/" << score;
+ bool success = this->highscores_.insert(stream.str()).second;
+ if(success)
+ this->highscoresUpdated();
+ return success;
+ }
+
/**
@brief
Add a ship model to allowed models for the shipselection
@@ -190,6 +200,21 @@
this->tagsString_ = std::string(stream.str());
}
+ void LevelInfoItem::highscoresUpdated(void)
+ {
+ std::stringstream stream;
+ std::set<std::string>::iterator temp;
+ for(std::set<std::string>::iterator it = this->highscores_.begin(); it != this->highscores_.end(); )
+ {
+ temp = it;
+ if(++it == this->highscores_.end()) // If this is the last tag we don't add a comma.
+ stream << *temp;
+ else
+ stream << *temp << ", ";
+ }
+
+ this->highscoresString_ = std::string(stream.str());
+ }
/**
@brief
Updates the comma-seperated string of all ships, if the set of tags has changed.
Modified: code/trunk/src/orxonox/LevelInfo.h
===================================================================
--- code/trunk/src/orxonox/LevelInfo.h 2017-03-09 14:02:38 UTC (rev 11355)
+++ code/trunk/src/orxonox/LevelInfo.h 2017-03-09 14:38:58 UTC (rev 11356)
@@ -117,6 +117,10 @@
*/
inline bool hasTag(const std::string& tag) const { return this->tags_.find(tag) != this->tags_.end(); } // tolua_export
+ bool addHighscore(const std::string& name,const int score);
+
+ inline const std::string& getHighscores(void) const { return this->highscoresString_; } // tolua_export
+
void setStartingShips(const std::string& ships); //!< Set the starting ship models of the level
bool addStartingShip(const std::string& ship, bool update = true); //!< Add a model to shipselection
/**
@@ -153,6 +157,7 @@
void changeStartingShip (const std::string& model);
void startingshipsUpdated(void); //!< Updates the comma-seperated string of all possible starting ships.
void tagsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed.
+ void highscoresUpdated(void);
static void initializeTags(void); //!< Initialize the set of allowed tags.
/**
@brief Check whether an input tag is allowed.
@@ -169,6 +174,10 @@
std::string description_; //!< The description of the Level.
std::string screenshot_; //!< The screenshot of the Level.
std::set<std::string> tags_; //!< The set of tags the Level is tagged with.
+
+ std::set<std::string> highscores_;
+ std::string highscoresString_;
+
std::string tagsString_; //!< The comma-seperated string of all the tags the Level is tagged with.
std::set<std::string> startingShips_; //!< The set of starting ship models the Level allows.
std::string startingShipsString_; //!< The comma-seperated string of all the allowed ship models for the shipselection.
@@ -243,6 +252,9 @@
*/
inline const std::string& getTags(void) const
{ return this->LevelInfoItem::getTags(); }
+
+ inline const std::string& getHighscores(void) const
+ { return this->LevelInfoItem::getHighscores(); }
/**
@brief Set the starting ship models of the level
@param ships A comma-seperated string of all the allowed ship models for the shipselection.
More information about the Orxonox-commit
mailing list