Changeset 6334 for code/branches/presentation2/data/gui
- Timestamp:
- Dec 13, 2009, 1:12:13 PM (15 years ago)
- Location:
- code/branches/presentation2/data/gui
- Files:
-
- 2 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/data/gui/layouts/AudioMenu.layout
r6233 r6334 15 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 16 16 <Property Name="VertFormatting" Value="TopAligned" /> 17 <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0. 325,0},{0.8,0},{0.6,0}}" />17 <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.2875,0},{0.8,0},{0.6375,0}}" /> 18 18 <Window Type="TaharezLook/StaticText" Name="orxonox/MasterVolume" > 19 19 <Property Name="Text" Value="Master volume " /> … … 22 22 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 23 23 <Property Name="VertFormatting" Value="TopAligned" /> 24 <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0. 2,0},{0.5625,0},{0.4,0}}" />24 <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0.15,0},{0.5625,0},{0.3525,0}}" /> 25 25 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MasterScrollbar" > 26 26 <Property Name="PageSize" Value="0" /> … … 49 49 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 50 50 <Property Name="VertFormatting" Value="TopAligned" /> 51 <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0.4 5,0},{0.5625,0},{0.65,0}}" />51 <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0.4335,0},{0.5625,0},{0.636,0}}" /> 52 52 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MusicScrollbar" > 53 53 <Property Name="PageSize" Value="0" /> … … 76 76 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 77 77 <Property Name="VertFormatting" Value="TopAligned" /> 78 <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0.7 ,0},{0.5625,0},{0.9,0}}" />78 <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0.717,0},{0.5625,0},{0.9195,0}}" /> 79 79 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/EffectsScrollbar" > 80 80 <Property Name="PageSize" Value="0" /> … … 103 103 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 104 104 <Property Name="VertFormatting" Value="TopAligned" /> 105 <Property Name="UnifiedAreaRect" Value="{{0.604166,0},{0.2,0},{0.958333,0},{0.9,0}}" /> 106 <Window Type="TaharezLook/Combobox" Name="orxonox/AudioThemeCombobox" > 107 <Property Name="AlwaysOnTop" Value="True" /> 105 <Property Name="UnifiedAreaRect" Value="{{0.604166,0},{0.15,0},{0.958333,0},{0.636,0}}" /> 106 <Window Type="TaharezLook/Listbox" Name="orxonox/AudioThemeListbox" > 108 107 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 109 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.21,0},{0.95,0},{0.9,0}}" /> 110 <Property Name="MaxEditTextLength" Value="1073741823" /> 111 <Property Name="ReadOnly" Value="True" /> 112 <Event Name="ListSelectionAccepted" Function="AudioMenu.AudioThemeCombobox_changed" /> 108 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.225,0},{0.95,0},{0.92,0}}" /> 109 <Event Name="ItemSelectionChanged" Function="AudioMenu.AudioThemeListbox_changed" /> 113 110 </Window> 111 </Window> 112 <Window Type="TaharezLook/StaticText" Name="orxonox/AudioInfo" > 113 <Property Name="Text" >Theme changes require 114 a game restart.</Property> 115 <Property Name="TextColours" Value="FF4444FF" /> 116 <Property Name="InheritsAlpha" Value="False" /> 117 <Property Name="HorzFormatting" Value="HorzCentred" /> 118 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 119 <Property Name="VertFormatting" Value="TopAligned" /> 120 <Property Name="UnifiedAreaRect" Value="{{0.604166,0},{0.717,0},{0.958333,0},{0.9195,0}}" /> 114 121 </Window> 115 122 </Window> … … 117 124 <Property Name="Text" Value="Back" /> 118 125 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 119 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6 25,0},{0.6,0},{0.675,0}}" />120 <Event Name="Clicked" Function="AudioMenu.AudioBackButton_clicked" />126 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" /> 127 <Event Name="Clicked" Function="AudioMenu.AudioBackButton_clicked" /> 121 128 </Window> 122 129 </Window> -
code/branches/presentation2/data/gui/layouts/ControlsMenu.layout
r6235 r6334 15 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 16 16 <Property Name="VertFormatting" Value="TopAligned" /> 17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3 25,0},{0.75,0},{0.6,0}}" />17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" /> 18 18 <Window Type="TaharezLook/Button" Name="orxonox/MouseControlsButton" > 19 19 <Property Name="Text" Value="Mouse controls" /> … … 32 32 <Property Name="Text" Value="Back" /> 33 33 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 34 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6 25,0},{0.6,0},{0.675,0}}" />34 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" /> 35 35 <Event Name="Clicked" Function="ControlsMenu.ControlsBackButton_clicked"/> 36 36 </Window> -
code/branches/presentation2/data/gui/layouts/CreditsMenu.layout
r6206 r6334 15 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 16 16 <Property Name="VertFormatting" Value="TopAligned" /> 17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3 25,0},{0.75,0},{0.6,0}}" />17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" /> 18 18 <Window Type="TaharezLook/StaticText" Name="orxonox/CreditsText" > 19 19 <Property Name="Text">Orxonox version 0.0.3 … … 35 35 <Property Name="Text" Value="Back" /> 36 36 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 37 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6 25,0},{0.6,0},{0.675,0}}" />37 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" /> 38 38 <Event Name="Clicked" Function="CreditsMenu.CreditsBackButton_clicked"/> 39 39 </Window> -
code/branches/presentation2/data/gui/layouts/DecisionPopup.layout
r6217 r6334 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 3 4 3 5 <GUILayout > 6 4 7 <Window Type="DefaultWindow" Name="orxonox/DecisionPopup_RootWindow" > 8 5 9 <Property Name="InheritsAlpha" Value="False" /> 10 6 11 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 12 7 13 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 14 8 15 <Window Type="TaharezLook/StaticImage" Name="orxonox/DecisionPopup_Background" > 16 9 17 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 18 10 19 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 20 11 21 <Property Name="Alpha" Value="0.6" /> 22 12 23 <Window Type="TaharezLook/Button" Name="orxonox/DecisionPopup_button_yes" > 24 13 25 <Property Name="Font" Value="BlueHighway-12" /> 26 14 27 <Property Name="Text" Value="Yes" /> 28 15 29 <Property Name="Alpha" Value="0.7" /> 16 <Property Name="InheritsAlpha" Value="False" /> 30 31 <Property Name="InheritsAlpha" Value="False" /> 32 17 33 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 18 <Property Name="UnifiedAreaRect" Value="{{0.3,0},{0.55,0},{0.45,0},{0.6,0}}" /> 34 35 <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.5625,0},{0.4875,0},{0.6125,0}}" /> 36 19 37 <Event Name="Clicked" Function="DecisionPopup.button_yes"/> 38 20 39 </Window> 40 21 41 <Window Type="TaharezLook/Button" Name="orxonox/DecisionPopup_button_no" > 42 22 43 <Property Name="Font" Value="BlueHighway-12" /> 44 23 45 <Property Name="Text" Value="No" /> 46 24 47 <Property Name="Alpha" Value="0.8" /> 25 <Property Name="InheritsAlpha" Value="False" /> 48 49 <Property Name="InheritsAlpha" Value="False" /> 50 26 51 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 27 <Property Name="UnifiedAreaRect" Value="{{0.55,0},{0.55,0},{0.7,0},{0.6,0}}" /> 52 53 <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.5625,0},{0.7125,0},{0.6125,0}}" /> 54 28 55 <Event Name="Clicked" Function="DecisionPopup.button_no"/> 56 29 57 </Window> 58 30 59 <Window Type="TaharezLook/StaticText" Name="orxonox/DecisionPopup_text" > 60 31 61 <Property Name="Text" Value="Template text" /> 62 32 63 <Property Name="HorzFormatting" Value="WordWrapCentred" /> 64 33 65 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 34 <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.4,0},{0.8,0},{0.5,0}}" /> 35 <Property Name="InheritsAlpha" Value="False" /> 66 67 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.4375,0},{0.75,0},{0.5375,0}}" /> 68 69 <Property Name="InheritsAlpha" Value="False" /> 70 36 71 <Property Name="Alpha" Value="0.8" /> 72 37 73 </Window> 74 38 75 </Window> 76 39 77 </Window> 78 40 79 </GUILayout> -
code/branches/presentation2/data/gui/layouts/GameplayMenu.layout
r6206 r6334 15 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 16 16 <Property Name="VertFormatting" Value="TopAligned" /> 17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3 25,0},{0.75,0},{0.6,0}}" />17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" /> 18 18 <Window Type="TaharezLook/StaticText" Name="orxonox/Difficulty" > 19 19 <Property Name="Text" Value="Difficulty" /> … … 62 62 <Property Name="Text" Value="Back" /> 63 63 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 64 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6 25,0},{0.6,0},{0.675,0}}" />64 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" /> 65 65 <Event Name="Clicked" Function="GameplayMenu.GameplayBackButton_clicked"/> 66 </Window>67 <Window Type="TaharezLook/StaticText" Name="orxonox/GameplayAvailable" >68 <Property Name="Text" Value="Changes in gameplay settings are not yet available." />69 <Property Name="TextColours" Value="FFFF0000" />70 <Property Name="InheritsAlpha" Value="False" />71 <Property Name="HorzFormatting" Value="HorzCentred" />72 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />73 <Property Name="VertFormatting" Value="TopAligned" />74 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.75,0},{0.75,0},{0.8,0}}" />75 66 </Window> 76 67 </Window> -
code/branches/presentation2/data/gui/layouts/GraphicsMenu.layout
r6292 r6334 15 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 16 16 <Property Name="VertFormatting" Value="TopAligned" /> 17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2 5,0},{0.75,0},{0.6,0}}" />17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.6375,0}}" /> 18 18 <Window Type="TaharezLook/StaticText" Name="orxonox/Resolution" > 19 19 <Property Name="Text" Value="Resolution" /> … … 25 25 <Window Type="TaharezLook/Listbox" Name="orxonox/ResolutionListbox" > 26 26 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 27 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.9 2,0}}" />27 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.95,0}}" /> 28 28 <Event Name="ItemSelectionChanged" Function="GraphicsMenu.GraphicsResolutionListbox_changed"/> 29 29 </Window> … … 72 72 <Property Name="Text" Value="Back" /> 73 73 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 74 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6 25,0},{0.6,0},{0.675,0}}" />74 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" /> 75 75 <Event Name="Clicked" Function="GraphicsMenu.GraphicsBackButton_clicked"/> 76 </Window>77 <Window Type="TaharezLook/StaticText" Name="orxonox/GraphicsAvailable" >78 <Property Name="Text" Value="The brightness scrollbar is not yet available." />79 <Property Name="TextColours" Value="FFFF0000" />80 <Property Name="InheritsAlpha" Value="False" />81 <Property Name="HorzFormatting" Value="HorzCentred" />82 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />83 <Property Name="VertFormatting" Value="TopAligned" />84 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.75,0},{0.75,0},{0.8,0}}" />85 76 </Window> 86 77 </Window> -
code/branches/presentation2/data/gui/layouts/InGameMenu.layout
r6217 r6334 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 3 4 3 5 <GUILayout > 6 4 7 <Window Type="DefaultWindow" Name="orxonox/InGameMenu_RootWindow" > 8 5 9 <Property Name="InheritsAlpha" Value="False" /> 10 6 11 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 12 7 13 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 14 8 15 <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_ReturnButton" > 16 9 17 <Property Name="Font" Value="BlueHighway-12" /> 18 10 19 <Property Name="Text" Value="Return to Game" /> 20 11 21 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 12 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3,0},{0.6,0},{0.36,0}}" /> 22 23 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" /> 24 13 25 <Property Name="Alpha" Value="0.7" /> 26 14 27 <Event Name="Clicked" Function="InGameMenu.button_return_clicked"/> 28 15 29 </Window> 30 16 31 <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_MainMenuButton" > 32 17 33 <Property Name="Font" Value="BlueHighway-12" /> 34 18 35 <Property Name="Text" Value="Main Menu" /> 36 19 37 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 20 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4,0},{0.6,0},{0.46,0}}" /> 38 39 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4625,0},{0.6,0},{0.5125,0}}" /> 40 21 41 <Property Name="Alpha" Value="0.7" /> 42 22 43 <Event Name="Clicked" Function="InGameMenu.button_mainmenu_clicked"/> 44 23 45 </Window> 46 24 47 <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_SettingsButton" > 48 25 49 <Property Name="Font" Value="BlueHighway-12" /> 50 26 51 <Property Name="Text" Value="Settings" /> 52 27 53 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 28 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5,0},{0.6,0},{0.56,0}}" /> 54 55 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5625,0},{0.6,0},{0.6125,0}}" /> 56 29 57 <Property Name="Alpha" Value="0.7" /> 58 30 59 <Event Name="Clicked" Function="InGameMenu.button_settings_clicked"/> 60 31 61 </Window> 62 32 63 <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_QuitButton" > 64 33 65 <Property Name="Font" Value="BlueHighway-12" /> 66 34 67 <Property Name="Text" Value="Quit" /> 68 35 69 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 36 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6,0},{0.6,0},{0.66,0}}" /> 70 71 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" /> 72 37 73 <Property Name="Alpha" Value="0.7" /> 74 38 75 <Event Name="Clicked" Function="InGameMenu.button_quit_clicked"/> 76 39 77 </Window> 78 40 79 </Window> 80 41 81 </GUILayout> -
code/branches/presentation2/data/gui/layouts/InfoPopup.layout
r6283 r6334 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 3 4 3 5 <GUILayout > 6 4 7 <Window Type="DefaultWindow" Name="orxonox/InfoPopup_RootWindow" > 8 5 9 <Property Name="InheritsAlpha" Value="False" /> 10 6 11 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 12 7 13 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 14 8 15 <Window Type="TaharezLook/StaticImage" Name="orxonox/InfoPopup_Background" > 16 9 17 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 18 10 19 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 20 11 21 <Property Name="Alpha" Value="0.7" /> 22 12 23 <Window Type="TaharezLook/Button" Name="orxonox/InfoPopup_close" > 24 13 25 <Property Name="Font" Value="BlueHighway-12" /> 26 14 27 <Property Name="Text" Value="Close" /> 28 15 29 <Property Name="Alpha" Value="0.7" /> 16 <Property Name="InheritsAlpha" Value="False" /> 30 31 <Property Name="InheritsAlpha" Value="False" /> 32 33 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 34 35 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5,0},{0.6,0},{0.55,0}}" /> 36 37 <Event Name="Clicked" Function="InfoPopup.close"/> 38 39 </Window> 40 41 <Window Type="TaharezLook/StaticText" Name="orxonox/InfoPopup_text" > 42 43 <Property Name="Text" Value="Template text" /> 44 45 <Property Name="TextColours" Value="FF4444FF" /> 46 <Property Name="HorzFormatting" Value="WordWrapCentred" /> 47 17 48 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 18 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.55,0},{0.6,0},{0.6,0}}" /> 19 <Event Name="Clicked" Function="InfoPopup.close"/> 49 50 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.375,0},{0.75,0},{0.475,0}}" /> 51 52 <Property Name="InheritsAlpha" Value="False" /> 53 54 <Property Name="Alpha" Value="0.8" /> 55 20 56 </Window> 21 <Window Type="TaharezLook/StaticText" Name="orxonox/InfoPopup_text" > 22 <Property Name="Text" Value="Template text" /> 23 <Property Name="HorzFormatting" Value="WordWrapCentred" /> 24 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 25 <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.4,0},{0.8,0},{0.5,0}}" /> 26 <Property Name="InheritsAlpha" Value="False" /> 27 <Property Name="Alpha" Value="0.8" /> 28 </Window> 57 29 58 </Window> 59 30 60 </Window> 61 31 62 </GUILayout> -
code/branches/presentation2/data/gui/layouts/KeyBindMenu.layout
r6324 r6334 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 3 4 3 5 <GUILayout > 6 4 7 <Window Type="DefaultWindow" Name="orxonox/KeyBindMenu/Background" > 8 5 9 <Property Name="InheritsAlpha" Value="False" /> 10 6 11 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 12 7 13 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 14 8 15 <Window Type="TaharezLook/StaticText" Name="orxonox/KeyBindWindow" > 16 9 17 <Property Name="Text" Value="Keybindings" /> 18 10 19 <Property Name="Alpha" Value="0.8" /> 20 11 21 <Property Name="InheritsAlpha" Value="False" /> 22 12 23 <Property Name="HorzFormatting" Value="HorzCentred" /> 24 13 25 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 26 14 27 <Property Name="VertFormatting" Value="TopAligned" /> 15 <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.1,0},{0.9,0},{0.8,0}}" /> 28 29 <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.2125,0},{0.85,0},{0.6375,0}}" /> 30 16 31 <Window Type="TaharezLook/StaticText" Name="orxonox/KeyBindWrapper" > 32 17 33 <Property Name="TextColours" Value="FF4444FF" /> 34 18 35 <Property Name="InheritsAlpha" Value="False" /> 36 19 37 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 38 20 39 <Property Name="HorzFormatting" Value="HorzCentred" /> 40 21 41 <Property Name="VertFormatting" Value="TopAligned" /> 22 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.1,0},{0.95,0},{0.95,0}}" /> 42 43 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" /> 44 23 45 <Window Type="TaharezLook/ScrollablePane" Name="orxonox/KeyBindPane" > 46 24 47 <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" /> 48 25 49 <Property Name="HorzStepSize" Value="0.1" /> 50 26 51 <Property Name="VertStepSize" Value="0.1" /> 52 27 53 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 54 28 55 <Property Name="HorzOverlapSize" Value="0.01" /> 29 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 56 57 <Property Name="UnifiedAreaRect" Value="{{0.005,0},{0.01,0},{0.995,0},{0.99,0}}" /> 58 30 59 <Property Name="VertOverlapSize" Value="0.01" /> 60 31 61 <Property Name="HorzScrollPosition" Value="0" /> 62 32 63 <Property Name="VertScrollPosition" Value="0" /> 64 33 65 </Window> 66 34 67 </Window> 68 35 69 </Window> 70 36 71 <Window Type="TaharezLook/Button" Name="orxonox/KeyBindBackButton" > 37 72 <Property Name="Text" Value="Back" /> 73 38 74 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 39 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.825,0},{0.6,0},{0.875,0}}" /> 75 76 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" /> 77 40 78 <Event Name="Clicked" Function="KeyBindMenu.KeyBindBackButton_clicked"/> 79 41 80 </Window> 81 42 82 </Window> 83 43 84 </GUILayout> -
code/branches/presentation2/data/gui/layouts/MainMenu.layout
r6217 r6334 11 11 <Property Name="Text" Value="Quickstart" /> 12 12 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 13 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2 5,0},{0.6,0},{0.3,0}}" />13 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2875,0},{0.6,0},{0.3375,0}}" /> 14 14 <Event Name="Clicked" Function="MainMenu.QuickGameTestButton_clicked"/> 15 15 </Window> … … 17 17 <Property Name="Text" Value="Singleplayer" /> 18 18 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 19 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3 25,0},{0.6,0},{0.375,0}}" />19 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" /> 20 20 <Event Name="Clicked" Function="MainMenu.SingleplayerButton_clicked"/> 21 21 </Window> … … 23 23 <Property Name="Text" Value="Multiplayer" /> 24 24 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 25 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4 ,0},{0.6,0},{0.45,0}}" />25 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4375,0},{0.6,0},{0.4875,0}}" /> 26 26 <Event Name="Clicked" Function="MainMenu.MultiplayerButton_clicked"/> 27 27 </Window> … … 29 29 <Property Name="Text" Value="Settings" /> 30 30 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 31 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0. 475,0},{0.6,0},{0.525,0}}" />31 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5125,0},{0.6,0},{0.5625,0}}" /> 32 32 <Event Name="Clicked" Function="MainMenu.SettingsButton_clicked"/> 33 33 </Window> … … 35 35 <Property Name="Text" Value="Credits" /> 36 36 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 37 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5 5,0},{0.6,0},{0.6,0}}" />37 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5875,0},{0.6,0},{0.6375,0}}" /> 38 38 <Event Name="Clicked" Function="MainMenu.CreditsButton_clicked"/> 39 39 </Window> … … 41 41 <Property Name="Text" Value="Exit" /> 42 42 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 43 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6 25,0},{0.6,0},{0.675,0}}" />43 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" /> 44 44 <Event Name="Clicked" Function="MainMenu.ExitButton_clicked"/> 45 45 </Window> -
code/branches/presentation2/data/gui/layouts/MouseControlsMenu.layout
r6251 r6334 15 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 16 16 <Property Name="VertFormatting" Value="TopAligned" /> 17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3 25,0},{0.75,0},{0.6,0}}" />17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" /> 18 18 <Window Type="TaharezLook/StaticText" Name="orxonox/MouseNormalSensitivity" > 19 19 <Property Name="Text" Value="Sensitivity (normal mode) " /> … … 81 81 <Property Name="Text" Value="Back" /> 82 82 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 83 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6 25,0},{0.6,0},{0.675,0}}" />83 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" /> 84 84 <Event Name="Clicked" Function="MouseControlsMenu.MouseControlsBackButton_clicked"/> 85 </Window>86 <Window Type="TaharezLook/StaticText" Name="orxonox/MouseControlsAvailable" >87 <Property Name="Text" Value="The invert mouse button is not yet available." />88 <Property Name="TextColours" Value="FFFF0000" />89 <Property Name="InheritsAlpha" Value="False" />90 <Property Name="HorzFormatting" Value="HorzCentred" />91 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />92 <Property Name="VertFormatting" Value="TopAligned" />93 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.75,0},{0.75,0},{0.8,0}}" />94 85 </Window> 95 86 </Window> -
code/branches/presentation2/data/gui/layouts/MultiplayerMenu.layout
r6206 r6334 15 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 16 16 <Property Name="VertFormatting" Value="TopAligned" /> 17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0. 325,0},{0.75,0},{0.6,0}}" />17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.6375,0}}" /> 18 18 <Window Type="TaharezLook/Listbox" Name="orxonox/MultiplayerLevelListbox" > 19 19 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 20 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0. 2,0},{0.95,0},{0.8,0}}" />20 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.8,0}}" /> 21 21 </Window> 22 22 <Window Type="TaharezLook/RadioButton" Name="orxonox/MultiplayerJoinButton" > … … 42 42 <Property Name="Text" Value="Start" /> 43 43 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 44 <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.6 25,0},{0.4875,0},{0.675,0}}" />44 <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.6625,0},{0.4875,0},{0.7125,0}}" /> 45 45 <Event Name="Clicked" Function="MultiplayerMenu.MultiplayerStartButton_clicked"/> 46 46 </Window> … … 48 48 <Property Name="Text" Value="Back" /> 49 49 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 50 <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.6 25,0},{0.7125,0},{0.675,0}}" />50 <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.6625,0},{0.7125,0},{0.7125,0}}" /> 51 51 <Event Name="Clicked" Function="MultiplayerMenu.MultiplayerBackButton_clicked"/> 52 52 </Window> -
code/branches/presentation2/data/gui/layouts/MultiplayerOptionsMenu.layout
r6206 r6334 15 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 16 16 <Property Name="VertFormatting" Value="TopAligned" /> 17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3 25,0},{0.75,0},{0.6,0}}" />17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" /> 18 18 </Window> 19 19 <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerOptionsBackButton" > … … 23 23 <Event Name="Clicked" Function="MultiplayerOptionsMenu.MultiplayerOptionsBackButton_clicked"/> 24 24 </Window> 25 <Window Type="TaharezLook/StaticText" Name="orxonox/MultiplayerOptionsAvailable" >26 <Property Name="Text" Value="The multiplayer options menu is not yet available." />27 <Property Name="TextColours" Value="FFFF0000" />28 <Property Name="InheritsAlpha" Value="False" />29 <Property Name="HorzFormatting" Value="HorzCentred" />30 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />31 <Property Name="VertFormatting" Value="TopAligned" />32 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.75,0},{0.75,0},{0.8,0}}" />33 </Window>34 25 </Window> 35 26 </GUILayout> -
code/branches/presentation2/data/gui/layouts/SettingsMenu.layout
r6233 r6334 8 8 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 9 9 <Property Name="BackgroundEnabled" Value="False" /> 10 11 10 <Window Type="TaharezLook/StaticText" Name="orxonox/SettingsWindow" > 12 11 <Property Name="Text" Value="Settings" /> … … 16 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 17 16 <Property Name="VertFormatting" Value="TopAligned" /> 18 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3 25,0},{0.75,0},{0.6,0}}" />17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" /> 19 18 <Window Type="TaharezLook/Button" Name="orxonox/GameplayButton" > 20 19 <Property Name="Text" Value="Gameplay" /> … … 60 59 <Property Name="Text" Value="Back" /> 61 60 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 62 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6 25,0},{0.6,0},{0.675,0}}" />61 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" /> 63 62 <Event Name="Clicked" Function="SettingsMenu.SettingsBackButton_clicked"/> 64 63 </Window> -
code/branches/presentation2/data/gui/layouts/SingleplayerMenu.layout
r6206 r6334 15 15 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 16 16 <Property Name="VertFormatting" Value="TopAligned" /> 17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0. 325,0},{0.75,0},{0.6,0}}" />17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.6375,0}}" /> 18 18 <Window Type="TaharezLook/Listbox" Name="orxonox/SingleplayerLevelListbox" > 19 19 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 20 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0. 2,0},{0.95,0},{0.9,0}}" />20 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" /> 21 21 </Window> 22 22 </Window> … … 24 24 <Property Name="Text" Value="Start" /> 25 25 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 26 <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.6 25,0},{0.4875,0},{0.675,0}}" />26 <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.6625,0},{0.4875,0},{0.7125,0}}" /> 27 27 <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerStartButton_clicked"/> 28 28 </Window> … … 30 30 <Property Name="Text" Value="Back" /> 31 31 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 32 <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.6 25,0},{0.7125,0},{0.675,0}}" />32 <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.6625,0},{0.7125,0},{0.7125,0}}" /> 33 33 <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerBackButton_clicked"/> 34 34 </Window> -
code/branches/presentation2/data/gui/scripts/AudioMenu.lua
r6235 r6334 37 37 effectsmutewindow:setSelected(effectsmute) 38 38 choice = "Default" 39 dropdownwindow = winMgr:getWindow("orxonox/AudioThemeCombobox")39 listboxwindow = winMgr:getWindow("orxonox/AudioThemeListbox") 40 40 local themeList = {} 41 41 table.insert(themeList, "Default") … … 44 44 item = CEGUI.createListboxTextItem(v) 45 45 item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush") 46 CEGUI.to Combobox(dropdownwindow):addItem(item)46 CEGUI.toListbox(listboxwindow):addItem(item) 47 47 end 48 dropdownwindow:setItemSelectState(0,true)49 48 end 50 49 … … 165 164 end 166 165 167 function P.AudioTheme Combobox_changed(e)168 if dropdownwindow:isItemSelected(1) then166 function P.AudioThemeListbox_changed(e) 167 if listboxwindow:isItemSelected(1) then 169 168 orxonox.CommandExecutor:execute("setMood dnb") 170 169 else -
code/branches/presentation2/data/gui/scripts/InfoPopup.lua
r6311 r6334 1 1 -- InfoPopup.lua 2 3 2 4 3 5 BasicGUI = require("BasicGUI") 4 6 local P = BasicGUI:new() --inherit everything from the gui package 7 8 5 9 if _REQUIREDNAME == nil then 10 6 11 InfoPopup = P 12 7 13 else 14 8 15 _G[_REQUIREDNAME] = P 16 9 17 end 10 18 19 20 11 21 P.filename = "InfoPopup" 22 12 23 P.layoutString = "InfoPopup.layout" 13 24 25 26 14 27 function P:init() 28 15 29 end 16 30 31 32 17 33 function P.execute(functionPtr, arguments) 34 18 35 if functionPtr ~= nil then 36 19 37 if arguments ~= nil then 38 20 39 functionPtr(arguments) 40 21 41 else 42 22 43 functionPtr() 44 23 45 end 46 24 47 end 48 25 49 end 26 50 51 52 27 53 function P.setText( text ) 54 28 55 winMgr:getWindow("orxonox/InfoPopup_text"):setText( text ) 56 29 57 end 30 58 59 60 31 61 function P.setCloseButton(closeButton) 62 32 63 close = winMgr:getWindow("orxonox/InfoPopup_close") 64 33 65 close:setVisible(closeButton) 66 34 67 if(not closeButton) then 68 35 69 close:deactivate(); 70 36 71 else 72 37 73 close:activate(); 74 38 75 end 76 39 77 end 40 78 79 80 41 81 -- events for ingamemenu 82 83 42 84 function P.close(e) 85 43 86 hideGUI("InfoPopup") 87 44 88 end 89 90 45 91 46 92 return P -
code/branches/presentation2/data/gui/scripts/KeyBindMenu.lua
r6324 r6334 1 1 -- KeyBindMenu.lua 2 2 3 4 3 5 BasicGUI = require("BasicGUI") 6 4 7 local P = BasicGUI:new() --inherit everything from the gui package 8 9 5 10 if _REQUIREDNAME == nil then 11 6 12 KeyBindMenu = P 13 7 14 else 8 15 _G[_REQUIREDNAME] = P 9 end 16 17 end 18 19 10 20 11 21 P.filename = "KeyBindMenu" 22 12 23 P.layoutString = "KeyBindMenu.layout" 13 24 25 26 14 27 function P:init() 28 15 29 commandList = {} 30 16 31 table.insert(commandList, "fire 0") 32 17 33 table.insert(commandList, "fire 1 | unfire") 34 18 35 table.insert(commandList, "onpress fire 2") 36 19 37 table.insert(commandList, "scale 1 moveFrontBack") 38 20 39 table.insert(commandList, "scale -1 moveFrontBack") 40 21 41 table.insert(commandList, "boost") 42 22 43 table.insert(commandList, "scale 1 moveRightLeft") 44 23 45 table.insert(commandList, "scale -1 moveRightLeft") 46 24 47 table.insert(commandList, "scale 1 moveUpDown") 48 25 49 table.insert(commandList, "scale -1 moveUpDown") 50 26 51 table.insert(commandList, "scale 1 rotateRoll") 52 27 53 table.insert(commandList, "scale -1 rotateRoll") 54 28 55 table.insert(commandList, "switchCamera") 56 29 57 table.insert(commandList, "openConsole") 58 30 59 table.insert(commandList, "OverlayGroup toggleVisibility Debug") 60 31 61 table.insert(commandList, "OverlayGroup toggleVisibility Stats") 62 32 63 table.insert(commandList, "mouseLook") 64 33 65 table.insert(commandList, "pause") 34 66 67 68 35 69 nameList = {} 70 36 71 table.insert(nameList, "Primary Fire") 72 37 73 table.insert(nameList, "Secondary Fire") 74 38 75 table.insert(nameList, "Fire Rocket") 76 39 77 table.insert(nameList, "Accelerate") 78 40 79 table.insert(nameList, "Break") 41 80 table.insert(nameList, "Boost") 81 42 82 table.insert(nameList, "Move Right") 83 43 84 table.insert(nameList, "Move Left") 85 44 86 table.insert(nameList, "Move Up") 87 45 88 table.insert(nameList, "Move Down") 89 46 90 table.insert(nameList, "Roll Right") 91 47 92 table.insert(nameList, "Roll Left") 93 48 94 table.insert(nameList, "Switch Camera") 95 49 96 table.insert(nameList, "Open Console") 97 50 98 table.insert(nameList, "Show Debug") 99 51 100 table.insert(nameList, "Show Stats") 101 52 102 table.insert(nameList, "Look Around") 103 53 104 table.insert(nameList, "Pause") 54 105 106 107 55 108 linesList = {} 56 109 57 lineHeight = 35 58 commandWidth = 200 59 buttonWidth = 170 110 111 lineHeight = 25 112 commandWidth = 125 113 buttonWidth = 125 60 114 clearWidth = 20 115 addWidth = 25 116 61 117 spaceWidth = 10 62 118 119 120 63 121 P.createLines() 64 122 123 124 65 125 local funct = luaState:createLuaFunctor("KeyBindMenu.callback()") 126 66 127 orxonox.KeyBinderManager:getInstance():registerKeybindCallback(funct) 67 end 128 129 end 130 131 68 132 69 133 70 134 function P.KeyNameNiceifier(key) 135 71 136 local name = string.sub(key, string.find(key, '%.(.*)')+1) 72 137 local group = string.sub(key, string.find(key, '(.*)%.')) 138 73 139 group = string.sub(group,1,string.len(group)-1) 140 74 141 if( group == "Keys") then 142 75 143 return "Key " .. string.sub(name, string.find(name, 'Key(.*)')+3) 144 76 145 elseif( group == "MouseButtons") then 146 77 147 return "Mouse " .. name 78 end 148 149 end 150 79 151 return key 80 end 152 153 end 154 155 81 156 82 157 function P.createLine(k) 158 83 159 local offset = 0 160 84 161 local line = winMgr:createWindow("DefaultWindow", "orxonox/KeyBindPane/Binding" .. k) 162 85 163 line:setHeight(CEGUI.UDim(0, lineHeight)) 164 86 165 line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, lineHeight*(k-1)))) 87 166 167 168 88 169 local command = winMgr:createWindow("TaharezLook/StaticText", "orxonox/KeyBindPane/Binding" .. k .. "/Command") 89 command:setSize(CEGUI.UVector2(CEGUI.UDim(0, commandWidth), CEGUI.UDim(0.9, 0))) 90 command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0))) 170 171 command:setSize(CEGUI.UVector2(CEGUI.UDim(0, commandWidth), CEGUI.UDim(1, 0))) 172 173 command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0, 0))) 174 91 175 command:setText(nameList[k]) 92 176 line:addChildWindow(command) 177 93 178 offset = offset + commandWidth + spaceWidth 94 179 180 181 95 182 local plus = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Plus") 96 plus:setSize(CEGUI.UVector2(CEGUI.UDim(0, clearWidth), CEGUI.UDim(0.7, 0))) 183 184 plus:setSize(CEGUI.UVector2(CEGUI.UDim(0, addWidth), CEGUI.UDim(0.7, 0))) 185 97 186 plus:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0))) 98 plus:setText("+") 187 188 plus:setText("add") 189 99 190 orxonox.KeyBinderManager:getInstance():subscribeEventHelper(plus, "Clicked", P.filename .. ".KeyBindPlus_clicked") 191 100 192 line:addChildWindow(plus) 101 offset = offset + clearWidth + spaceWidth 102 193 194 offset = offset + addWidth + spaceWidth 195 196 197 103 198 local numButtons = orxonox.KeyBinderManager:getInstance():getCurrent():getNumberOfBindings(commandList[k]); 199 104 200 for i=0,(numButtons-1) do 201 105 202 local button = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Button" .. i) 203 106 204 button:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0.7, 0))) 205 107 206 button:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0))) 207 108 208 local name = orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[k],i) 209 109 210 name = P.KeyNameNiceifier(name) 211 110 212 button:setText(name) 213 111 214 orxonox.KeyBinderManager:getInstance():subscribeEventHelper(button, "Clicked", P.filename .. ".KeyBindButton_clicked") 215 112 216 --button:subscribeScriptedEvent("EventClicked", P.filename .. ".KeyBindButton_clicked") 217 113 218 line:addChildWindow(button) 219 114 220 offset = offset + buttonWidth 221 115 222 223 116 224 local clear = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Clear" .. i) 225 117 226 clear:setSize(CEGUI.UVector2(CEGUI.UDim(0, clearWidth), CEGUI.UDim(0.7, 0))) 227 118 228 clear:setPosition(CEGUI.UVector2(CEGUI.UDim(0, (i*(buttonWidth+clearWidth+spaceWidth)+buttonWidth)+commandWidth+clearWidth+2*spaceWidth), CEGUI.UDim(0.15, 0))) 229 119 230 clear:setText("X") 231 120 232 orxonox.KeyBinderManager:getInstance():subscribeEventHelper(clear, "Clicked", P.filename .. ".KeyBindClear_clicked") 233 121 234 line:addChildWindow(clear) 235 122 236 offset = offset + clearWidth + spaceWidth 123 end 124 237 238 end 239 240 241 125 242 line:setWidth(CEGUI.UDim(0, offset+clearWidth)) 126 243 244 245 127 246 return line 128 end 247 248 end 249 250 129 251 130 252 function P.createLines() 131 253 254 132 255 local window = winMgr:getWindow("orxonox/KeyBindPane") 133 256 257 134 258 for k,v in pairs(commandList) do 259 135 260 local line = P.createLine(k) 261 136 262 table.insert(linesList, line) 263 137 264 window:addChildWindow(line) 138 end 139 140 end 265 266 end 267 268 269 end 270 271 141 272 142 273 function P.KeyBindButton_clicked(e) 274 143 275 local we = CEGUI.toWindowEventArgs(e) 276 144 277 local name = we.window:getName() 145 278 279 146 280 local match = string.gmatch(name, "%d+") 281 147 282 local commandNr = tonumber(match()) 283 148 284 local buttonNr = tonumber(match()) 149 285 286 287 150 288 local arguments = {} 289 151 290 arguments[1] = commandNr 291 152 292 arguments[2] = buttonNr 293 153 294 openInfoPopup("Press any button/key or move a mouse/joystick axis.", KeyBindMenu.keybind, false, arguments) 154 295 end 155 296 156 297 function P.KeyBindPlus_clicked(e) 298 157 299 local we = CEGUI.toWindowEventArgs(e) 300 158 301 local name = we.window:getName() 159 302 303 304 160 305 local match = string.gmatch(name, "%d+") 306 161 307 local commandNr = tonumber(match()) 162 308 309 163 310 local arguments = {} 311 164 312 arguments[1] = commandNr 313 165 314 openInfoPopup("Press any button/key or move a mouse/joystick axis.", KeyBindMenu.keybind, false, arguments) 166 315 end 167 316 168 317 function P.KeyBindClear_clicked(e) 318 169 319 local we = CEGUI.toWindowEventArgs(e) 320 170 321 local name = we.window:getName() 171 322 323 324 172 325 local match = string.gmatch(name, "%d+") 326 173 327 local commandNr = tonumber(match()) 328 174 329 local buttonNr = tonumber(match()) 175 330 331 176 332 orxonox.KeyBinderManager:getInstance():unbind(orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[commandNr], buttonNr)) 177 333 334 335 178 336 P.callback() 179 end 337 338 end 339 340 180 341 181 342 function P.keybind(arguments) 343 182 344 local commandNr = arguments[1] 345 183 346 local buttonNr = arguments[2] 347 184 348 if buttonNr ~= nil then 349 185 350 orxonox.KeyBinderManager:getInstance():unbind(orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[commandNr], buttonNr)) 186 end 351 352 end 353 354 187 355 orxonox.KeyBinderManager:getInstance():keybind(commandList[commandNr]) 188 end 356 357 end 358 359 189 360 190 361 function P.callback() 362 191 363 while table.getn(linesList) ~= 0 do 364 192 365 if linesList[1] ~= nil then 366 193 367 winMgr:destroyWindow(linesList[1]:getName()) 368 194 369 end 370 195 371 table.remove(linesList, 1) 196 end 197 372 373 end 374 375 376 198 377 linesList = {} 199 378 379 200 380 P.createLines() 201 381 202 382 if(InfoPopup ~= nil) then 383 203 384 InfoPopup.close() 204 end 205 end 385 386 end 387 388 end 389 390 206 391 207 392 function P.KeyBindBackButton_clicked(e) 393 208 394 hideGUI("KeyBindMenu") 209 end 395 396 end 397 398 210 399 211 400 return P
Note: See TracChangeset
for help on using the changeset viewer.