Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6334 for code/branches


Ignore:
Timestamp:
Dec 13, 2009, 1:12:13 PM (15 years ago)
Author:
cmueri
Message:

All the menus (inclusive InGameMenus) have an equal design, some menus have a larger window. They should be ready to presentate now.
BUG REPORT in KeyBindMenu: If there are >4 buttons in a row, the GUI doesn't show those correctly.

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  
    1515            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1616            <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}}" />
    1818            <Window Type="TaharezLook/StaticText" Name="orxonox/MasterVolume" >
    1919                <Property Name="Text" Value="Master volume               " />
     
    2222                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    2323                <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}}" />
    2525                <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MasterScrollbar" >
    2626                    <Property Name="PageSize" Value="0" />
     
    4949                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    5050                <Property Name="VertFormatting" Value="TopAligned" />
    51                 <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0.45,0},{0.5625,0},{0.65,0}}" />
     51                <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0.4335,0},{0.5625,0},{0.636,0}}" />
    5252                <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MusicScrollbar" >
    5353                    <Property Name="PageSize" Value="0" />
     
    7676                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    7777                <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}}" />
    7979                <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/EffectsScrollbar" >
    8080                    <Property Name="PageSize" Value="0" />
     
    103103                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    104104                <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" >
    108107                    <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" />
    113110                </Window>
     111            </Window>
     112            <Window Type="TaharezLook/StaticText" Name="orxonox/AudioInfo" >
     113                <Property Name="Text" >Theme changes require
     114a 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}}" />
    114121            </Window>
    115122        </Window>
     
    117124            <Property Name="Text" Value="Back" />
    118125            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    119             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,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" />
    121128        </Window>
    122129    </Window>
  • code/branches/presentation2/data/gui/layouts/ControlsMenu.layout

    r6235 r6334  
    1515            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1616            <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.3625,0},{0.75,0},{0.6375,0}}" />
    1818            <Window Type="TaharezLook/Button" Name="orxonox/MouseControlsButton" >
    1919                <Property Name="Text" Value="Mouse controls" />
     
    3232            <Property Name="Text" Value="Back" />
    3333            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    34             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
     34            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
    3535            <Event Name="Clicked" Function="ControlsMenu.ControlsBackButton_clicked"/>
    3636        </Window>
  • code/branches/presentation2/data/gui/layouts/CreditsMenu.layout

    r6206 r6334  
    1515            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1616            <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.3625,0},{0.75,0},{0.6375,0}}" />
    1818            <Window Type="TaharezLook/StaticText" Name="orxonox/CreditsText" >
    1919                <Property Name="Text">Orxonox version 0.0.3
     
    3535            <Property Name="Text" Value="Back" />
    3636            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    37             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
     37            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
    3838            <Event Name="Clicked" Function="CreditsMenu.CreditsBackButton_clicked"/>
    3939        </Window>
  • code/branches/presentation2/data/gui/layouts/DecisionPopup.layout

    r6217 r6334  
    11<?xml version="1.0" encoding="UTF-8"?>
    22
     3
     4
    35<GUILayout >
     6
    47    <Window Type="DefaultWindow" Name="orxonox/DecisionPopup_RootWindow" >
     8
    59        <Property Name="InheritsAlpha" Value="False" />
     10
    611        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     12
    713        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
     14
    815        <Window Type="TaharezLook/StaticImage" Name="orxonox/DecisionPopup_Background" >
     16
    917            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     18
    1019            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
     20
    1121            <Property Name="Alpha" Value="0.6" />
     22
    1223            <Window Type="TaharezLook/Button" Name="orxonox/DecisionPopup_button_yes" >
     24
    1325                <Property Name="Font" Value="BlueHighway-12" />
     26
    1427                <Property Name="Text" Value="Yes" />
     28
    1529                <Property Name="Alpha" Value="0.7" />
    16                 <Property Name="InheritsAlpha" Value="False" />
     30
     31                <Property Name="InheritsAlpha" Value="False" />
     32 
    1733                <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
    1937                <Event Name="Clicked" Function="DecisionPopup.button_yes"/>
     38
    2039            </Window>
     40
    2141            <Window Type="TaharezLook/Button" Name="orxonox/DecisionPopup_button_no" >
     42
    2243                <Property Name="Font" Value="BlueHighway-12" />
     44
    2345                <Property Name="Text" Value="No" />
     46
    2447                <Property Name="Alpha" Value="0.8" />
    25                 <Property Name="InheritsAlpha" Value="False" />
     48
     49                <Property Name="InheritsAlpha" Value="False" />
     50 
    2651                <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
    2855                <Event Name="Clicked" Function="DecisionPopup.button_no"/>
     56
    2957            </Window>
     58
    3059            <Window Type="TaharezLook/StaticText" Name="orxonox/DecisionPopup_text" >
     60
    3161                <Property Name="Text" Value="Template text" />
     62
    3263                <Property Name="HorzFormatting" Value="WordWrapCentred" />
     64
    3365                <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 
    3671                <Property Name="Alpha" Value="0.8" />
     72
    3773            </Window>
     74
    3875        </Window>
     76
    3977    </Window>
     78
    4079</GUILayout>
  • code/branches/presentation2/data/gui/layouts/GameplayMenu.layout

    r6206 r6334  
    1515            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1616            <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.3625,0},{0.75,0},{0.6375,0}}" />
    1818            <Window Type="TaharezLook/StaticText" Name="orxonox/Difficulty" >
    1919                <Property Name="Text" Value="Difficulty" />
     
    6262            <Property Name="Text" Value="Back" />
    6363            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    64             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
     64            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
    6565            <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}}" />
    7566        </Window>
    7667    </Window>
  • code/branches/presentation2/data/gui/layouts/GraphicsMenu.layout

    r6292 r6334  
    1515            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    17             <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.25,0},{0.75,0},{0.6,0}}" />
     17            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.6375,0}}" />
    1818            <Window Type="TaharezLook/StaticText" Name="orxonox/Resolution" >
    1919                <Property Name="Text" Value="Resolution" />
     
    2525                <Window Type="TaharezLook/Listbox" Name="orxonox/ResolutionListbox" >
    2626                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    27                     <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" />
     27                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.95,0}}" />
    2828                    <Event Name="ItemSelectionChanged" Function="GraphicsMenu.GraphicsResolutionListbox_changed"/>
    2929                </Window>
     
    7272            <Property Name="Text" Value="Back" />
    7373            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    74             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
     74            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
    7575            <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}}" />
    8576        </Window>
    8677    </Window>
  • code/branches/presentation2/data/gui/layouts/InGameMenu.layout

    r6217 r6334  
    11<?xml version="1.0" encoding="UTF-8"?>
    22
     3
     4
    35<GUILayout >
     6
    47    <Window Type="DefaultWindow" Name="orxonox/InGameMenu_RootWindow" >
     8
    59        <Property Name="InheritsAlpha" Value="False" />
     10
    611        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     12
    713        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
     14
    815        <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_ReturnButton" >
     16
    917            <Property Name="Font" Value="BlueHighway-12" />
     18
    1019            <Property Name="Text" Value="Return to Game" />
     20
    1121            <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
    1325            <Property Name="Alpha" Value="0.7" />
     26
    1427            <Event Name="Clicked" Function="InGameMenu.button_return_clicked"/>
     28
    1529        </Window>
     30
    1631        <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_MainMenuButton" >
     32
    1733            <Property Name="Font" Value="BlueHighway-12" />
     34
    1835            <Property Name="Text" Value="Main Menu" />
     36
    1937            <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
    2141            <Property Name="Alpha" Value="0.7" />
     42
    2243            <Event Name="Clicked" Function="InGameMenu.button_mainmenu_clicked"/>
     44
    2345        </Window>
     46
    2447        <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_SettingsButton" >
     48
    2549            <Property Name="Font" Value="BlueHighway-12" />
     50
    2651            <Property Name="Text" Value="Settings" />
     52
    2753            <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
    2957            <Property Name="Alpha" Value="0.7" />
     58
    3059            <Event Name="Clicked" Function="InGameMenu.button_settings_clicked"/>
     60
    3161        </Window>
     62
    3263        <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_QuitButton" >
     64
    3365            <Property Name="Font" Value="BlueHighway-12" />
     66
    3467            <Property Name="Text" Value="Quit" />
     68
    3569            <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
    3773            <Property Name="Alpha" Value="0.7" />
     74
    3875            <Event Name="Clicked" Function="InGameMenu.button_quit_clicked"/>
     76
    3977        </Window>
     78
    4079    </Window>
     80
    4181</GUILayout>
  • code/branches/presentation2/data/gui/layouts/InfoPopup.layout

    r6283 r6334  
    11<?xml version="1.0" encoding="UTF-8"?>
    22
     3
     4
    35<GUILayout >
     6
    47    <Window Type="DefaultWindow" Name="orxonox/InfoPopup_RootWindow" >
     8
    59        <Property Name="InheritsAlpha" Value="False" />
     10
    611        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     12
    713        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
     14
    815        <Window Type="TaharezLook/StaticImage" Name="orxonox/InfoPopup_Background" >
     16
    917            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     18
    1019            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
     20
    1121            <Property Name="Alpha" Value="0.7" />
     22
    1223            <Window Type="TaharezLook/Button" Name="orxonox/InfoPopup_close" >
     24
    1325                <Property Name="Font" Value="BlueHighway-12" />
     26
    1427                <Property Name="Text" Value="Close" />
     28
    1529                <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
    1748                <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
    2056            </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
    2958        </Window>
     59
    3060    </Window>
     61
    3162</GUILayout>
  • code/branches/presentation2/data/gui/layouts/KeyBindMenu.layout

    r6324 r6334  
    11<?xml version="1.0" encoding="UTF-8"?>
    22
     3
     4
    35<GUILayout >
     6
    47    <Window Type="DefaultWindow" Name="orxonox/KeyBindMenu/Background" >
     8
    59        <Property Name="InheritsAlpha" Value="False" />
     10
    611        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     12
    713        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
     14
    815        <Window Type="TaharezLook/StaticText" Name="orxonox/KeyBindWindow" >
     16
    917            <Property Name="Text" Value="Keybindings" />
     18
    1019            <Property Name="Alpha" Value="0.8" />
     20
    1121            <Property Name="InheritsAlpha" Value="False" />
     22
    1223            <Property Name="HorzFormatting" Value="HorzCentred" />
     24
    1325            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     26
    1427            <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
    1631            <Window Type="TaharezLook/StaticText" Name="orxonox/KeyBindWrapper" >
     32
    1733                <Property Name="TextColours" Value="FF4444FF" />
     34
    1835                <Property Name="InheritsAlpha" Value="False" />
     36
    1937                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     38
    2039                <Property Name="HorzFormatting" Value="HorzCentred" />
     40
    2141                <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
    2345                <Window Type="TaharezLook/ScrollablePane" Name="orxonox/KeyBindPane" >
     46
    2447                    <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" />
     48
    2549                    <Property Name="HorzStepSize" Value="0.1" />
     50
    2651                    <Property Name="VertStepSize" Value="0.1" />
     52
    2753                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     54
    2855                    <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
    3059                    <Property Name="VertOverlapSize" Value="0.01" />
     60
    3161                    <Property Name="HorzScrollPosition" Value="0" />
     62
    3263                    <Property Name="VertScrollPosition" Value="0" />
     64
    3365                </Window>
     66
    3467            </Window>
     68
    3569        </Window>
     70
    3671        <Window Type="TaharezLook/Button" Name="orxonox/KeyBindBackButton" >
    3772            <Property Name="Text" Value="Back" />
     73
    3874            <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
    4078            <Event Name="Clicked" Function="KeyBindMenu.KeyBindBackButton_clicked"/>
     79
    4180        </Window>
     81
    4282    </Window>
     83
    4384</GUILayout>
  • code/branches/presentation2/data/gui/layouts/MainMenu.layout

    r6217 r6334  
    1111            <Property Name="Text" Value="Quickstart" />
    1212            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    13             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.25,0},{0.6,0},{0.3,0}}" />
     13            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2875,0},{0.6,0},{0.3375,0}}" />
    1414            <Event Name="Clicked" Function="MainMenu.QuickGameTestButton_clicked"/>
    1515        </Window>
     
    1717            <Property Name="Text" Value="Singleplayer" />
    1818            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    19             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.325,0},{0.6,0},{0.375,0}}" />
     19            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" />
    2020            <Event Name="Clicked" Function="MainMenu.SingleplayerButton_clicked"/>
    2121        </Window>
     
    2323            <Property Name="Text" Value="Multiplayer" />
    2424            <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}}" />
    2626            <Event Name="Clicked" Function="MainMenu.MultiplayerButton_clicked"/>
    2727        </Window>
     
    2929            <Property Name="Text" Value="Settings" />
    3030            <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}}" />
    3232            <Event Name="Clicked" Function="MainMenu.SettingsButton_clicked"/>
    3333        </Window>
     
    3535            <Property Name="Text" Value="Credits" />
    3636            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    37             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.55,0},{0.6,0},{0.6,0}}" />
     37            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5875,0},{0.6,0},{0.6375,0}}" />
    3838            <Event Name="Clicked" Function="MainMenu.CreditsButton_clicked"/>
    3939        </Window>
     
    4141            <Property Name="Text" Value="Exit" />
    4242            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    43             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
     43            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
    4444            <Event Name="Clicked" Function="MainMenu.ExitButton_clicked"/>
    4545        </Window>
  • code/branches/presentation2/data/gui/layouts/MouseControlsMenu.layout

    r6251 r6334  
    1515            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1616            <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.3625,0},{0.75,0},{0.6375,0}}" />
    1818            <Window Type="TaharezLook/StaticText" Name="orxonox/MouseNormalSensitivity" >
    1919                <Property Name="Text" Value="Sensitivity (normal mode)                                      " />
     
    8181            <Property Name="Text" Value="Back" />
    8282            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    83             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
     83            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
    8484            <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}}" />
    9485        </Window>
    9586    </Window>
  • code/branches/presentation2/data/gui/layouts/MultiplayerMenu.layout

    r6206 r6334  
    1515            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1616            <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}}" />
    1818            <Window Type="TaharezLook/Listbox" Name="orxonox/MultiplayerLevelListbox" >
    1919                <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}}" />
    2121            </Window>
    2222            <Window Type="TaharezLook/RadioButton" Name="orxonox/MultiplayerJoinButton" >
     
    4242            <Property Name="Text" Value="Start" />
    4343            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    44             <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.625,0},{0.4875,0},{0.675,0}}" />
     44            <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.6625,0},{0.4875,0},{0.7125,0}}" />
    4545            <Event Name="Clicked" Function="MultiplayerMenu.MultiplayerStartButton_clicked"/>
    4646        </Window>
     
    4848            <Property Name="Text" Value="Back" />
    4949            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    50             <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.625,0},{0.7125,0},{0.675,0}}" />
     50            <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.6625,0},{0.7125,0},{0.7125,0}}" />
    5151            <Event Name="Clicked" Function="MultiplayerMenu.MultiplayerBackButton_clicked"/>
    5252        </Window>
  • code/branches/presentation2/data/gui/layouts/MultiplayerOptionsMenu.layout

    r6206 r6334  
    1515            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1616            <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.3625,0},{0.75,0},{0.6375,0}}" />
    1818        </Window>
    1919        <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerOptionsBackButton" >
     
    2323            <Event Name="Clicked" Function="MultiplayerOptionsMenu.MultiplayerOptionsBackButton_clicked"/>
    2424        </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>
    3425    </Window>
    3526</GUILayout>
  • code/branches/presentation2/data/gui/layouts/SettingsMenu.layout

    r6233 r6334  
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10 
    1110        <Window Type="TaharezLook/StaticText" Name="orxonox/SettingsWindow" >
    1211            <Property Name="Text" Value="Settings" />
     
    1615            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1716            <Property Name="VertFormatting" Value="TopAligned" />
    18             <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.3625,0},{0.75,0},{0.6375,0}}" />
    1918            <Window Type="TaharezLook/Button" Name="orxonox/GameplayButton" >
    2019                <Property Name="Text" Value="Gameplay" />
     
    6059            <Property Name="Text" Value="Back" />
    6160            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    62             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
     61            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.6625,0},{0.6,0},{0.7125,0}}" />
    6362            <Event Name="Clicked" Function="SettingsMenu.SettingsBackButton_clicked"/>
    6463        </Window>
  • code/branches/presentation2/data/gui/layouts/SingleplayerMenu.layout

    r6206 r6334  
    1515            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1616            <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}}" />
    1818            <Window Type="TaharezLook/Listbox" Name="orxonox/SingleplayerLevelListbox" >
    1919                <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}}" />
    2121            </Window>
    2222        </Window>
     
    2424            <Property Name="Text" Value="Start" />
    2525            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    26             <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.625,0},{0.4875,0},{0.675,0}}" />
     26            <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.6625,0},{0.4875,0},{0.7125,0}}" />
    2727            <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerStartButton_clicked"/>
    2828        </Window>
     
    3030            <Property Name="Text" Value="Back" />
    3131            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    32             <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.625,0},{0.7125,0},{0.675,0}}" />
     32            <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.6625,0},{0.7125,0},{0.7125,0}}" />
    3333            <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerBackButton_clicked"/>
    3434        </Window>
  • code/branches/presentation2/data/gui/scripts/AudioMenu.lua

    r6235 r6334  
    3737    effectsmutewindow:setSelected(effectsmute)
    3838    choice = "Default"
    39     dropdownwindow = winMgr:getWindow("orxonox/AudioThemeCombobox")
     39    listboxwindow = winMgr:getWindow("orxonox/AudioThemeListbox")
    4040    local themeList = {}
    4141    table.insert(themeList, "Default")
     
    4444        item = CEGUI.createListboxTextItem(v)       
    4545        item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
    46         CEGUI.toCombobox(dropdownwindow):addItem(item)
     46        CEGUI.toListbox(listboxwindow):addItem(item)
    4747    end
    48     dropdownwindow:setItemSelectState(0,true)
    4948end
    5049
     
    165164end
    166165
    167 function P.AudioThemeCombobox_changed(e)
    168     if dropdownwindow:isItemSelected(1) then
     166function P.AudioThemeListbox_changed(e)
     167    if listboxwindow:isItemSelected(1) then
    169168        orxonox.CommandExecutor:execute("setMood dnb")
    170169    else
  • code/branches/presentation2/data/gui/scripts/InfoPopup.lua

    r6311 r6334  
    11-- InfoPopup.lua
     2
     3
    24
    35BasicGUI = require("BasicGUI")
    46local P = BasicGUI:new() --inherit everything from the gui package
     7
     8
    59if _REQUIREDNAME == nil then
     10
    611    InfoPopup = P
     12
    713else
     14
    815    _G[_REQUIREDNAME] = P
     16
    917end
    1018
     19
     20
    1121P.filename = "InfoPopup"
     22
    1223P.layoutString = "InfoPopup.layout"
    1324
     25
     26
    1427function P:init()
     28
    1529end
    1630
     31
     32
    1733function P.execute(functionPtr, arguments)
     34
    1835    if functionPtr ~= nil then
     36
    1937        if arguments ~= nil then
     38
    2039            functionPtr(arguments)
     40
    2141        else
     42
    2243            functionPtr()
     44
    2345        end
     46
    2447    end
     48
    2549end
    2650
     51
     52
    2753function P.setText( text )
     54
    2855    winMgr:getWindow("orxonox/InfoPopup_text"):setText( text )
     56
    2957end
    3058
     59
     60
    3161function P.setCloseButton(closeButton)
     62
    3263    close = winMgr:getWindow("orxonox/InfoPopup_close")
     64
    3365    close:setVisible(closeButton)
     66
    3467    if(not closeButton) then
     68
    3569        close:deactivate();
     70
    3671    else
     72
    3773        close:activate();
     74
    3875    end
     76
    3977end
    4078
     79
     80
    4181-- events for ingamemenu
     82
     83
    4284function P.close(e)
     85
    4386    hideGUI("InfoPopup")
     87
    4488end
     89
     90
    4591
    4692return P
  • code/branches/presentation2/data/gui/scripts/KeyBindMenu.lua

    r6324 r6334  
    11-- KeyBindMenu.lua
    22
     3
     4
    35BasicGUI = require("BasicGUI")
     6
    47local P = BasicGUI:new() --inherit everything from the gui package
     8
     9
    510if _REQUIREDNAME == nil then
     11
    612    KeyBindMenu = P
     13
    714else
    815    _G[_REQUIREDNAME] = P
    9 end
     16
     17end
     18
     19
    1020
    1121P.filename = "KeyBindMenu"
     22
    1223P.layoutString = "KeyBindMenu.layout"
    1324
     25
     26
    1427function P:init()
     28
    1529    commandList = {}
     30
    1631    table.insert(commandList, "fire 0")
     32
    1733    table.insert(commandList, "fire 1 | unfire")
     34
    1835    table.insert(commandList, "onpress fire 2")
     36
    1937    table.insert(commandList, "scale 1 moveFrontBack")
     38
    2039    table.insert(commandList, "scale -1 moveFrontBack")
     40
    2141    table.insert(commandList, "boost")
     42
    2243    table.insert(commandList, "scale 1 moveRightLeft")
     44
    2345    table.insert(commandList, "scale -1 moveRightLeft")
     46
    2447    table.insert(commandList, "scale 1 moveUpDown")
     48
    2549    table.insert(commandList, "scale -1 moveUpDown")
     50
    2651    table.insert(commandList, "scale 1 rotateRoll")
     52
    2753    table.insert(commandList, "scale -1 rotateRoll")
     54
    2855    table.insert(commandList, "switchCamera")
     56
    2957    table.insert(commandList, "openConsole")
     58
    3059    table.insert(commandList, "OverlayGroup toggleVisibility Debug")
     60
    3161    table.insert(commandList, "OverlayGroup toggleVisibility Stats")
     62
    3263    table.insert(commandList, "mouseLook")
     64
    3365    table.insert(commandList, "pause")
    34    
     66
     67   
     68
    3569    nameList = {}
     70
    3671    table.insert(nameList, "Primary Fire")
     72
    3773    table.insert(nameList, "Secondary Fire")
     74
    3875    table.insert(nameList, "Fire Rocket")
     76
    3977    table.insert(nameList, "Accelerate")
     78
    4079    table.insert(nameList, "Break")
    4180    table.insert(nameList, "Boost")
     81
    4282    table.insert(nameList, "Move Right")
     83
    4384    table.insert(nameList, "Move Left")
     85
    4486    table.insert(nameList, "Move Up")
     87
    4588    table.insert(nameList, "Move Down")
     89
    4690    table.insert(nameList, "Roll Right")
     91
    4792    table.insert(nameList, "Roll Left")
     93
    4894    table.insert(nameList, "Switch Camera")
     95
    4996    table.insert(nameList, "Open Console")
     97
    5098    table.insert(nameList, "Show Debug")
     99
    51100    table.insert(nameList, "Show Stats")
     101
    52102    table.insert(nameList, "Look Around")
     103
    53104    table.insert(nameList, "Pause")
    54    
     105
     106   
     107
    55108    linesList = {}
    56109
    57     lineHeight = 35
    58     commandWidth = 200
    59     buttonWidth = 170
     110
     111    lineHeight = 25
     112    commandWidth = 125
     113    buttonWidth = 125
    60114    clearWidth = 20
     115    addWidth = 25
     116
    61117    spaceWidth = 10
    62    
     118
     119   
     120
    63121    P.createLines()
    64    
     122
     123   
     124
    65125    local funct = luaState:createLuaFunctor("KeyBindMenu.callback()")
     126
    66127    orxonox.KeyBinderManager:getInstance():registerKeybindCallback(funct)
    67 end
     128
     129end
     130
     131
    68132
    69133
    70134function P.KeyNameNiceifier(key)
     135
    71136    local name = string.sub(key, string.find(key, '%.(.*)')+1)
    72137    local group = string.sub(key, string.find(key, '(.*)%.'))
     138
    73139    group = string.sub(group,1,string.len(group)-1)
     140
    74141    if( group == "Keys") then
     142
    75143        return "Key " .. string.sub(name, string.find(name, 'Key(.*)')+3)
     144
    76145    elseif( group == "MouseButtons") then
     146
    77147        return "Mouse " .. name
    78     end
     148
     149    end
     150
    79151    return key
    80 end
     152
     153end
     154
     155
    81156
    82157function P.createLine(k)
     158
    83159    local offset = 0
     160
    84161    local line = winMgr:createWindow("DefaultWindow", "orxonox/KeyBindPane/Binding" .. k)
     162
    85163    line:setHeight(CEGUI.UDim(0, lineHeight))
     164
    86165    line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, lineHeight*(k-1))))
    87    
     166
     167   
     168
    88169    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
    91175    command:setText(nameList[k])
    92176    line:addChildWindow(command)
     177
    93178    offset = offset + commandWidth + spaceWidth
    94    
     179
     180   
     181
    95182    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
    97186    plus:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
    98     plus:setText("+")
     187
     188    plus:setText("add")
     189
    99190    orxonox.KeyBinderManager:getInstance():subscribeEventHelper(plus, "Clicked", P.filename .. ".KeyBindPlus_clicked")
     191
    100192    line:addChildWindow(plus)
    101     offset = offset + clearWidth + spaceWidth
    102    
     193
     194    offset = offset + addWidth + spaceWidth
     195
     196   
     197
    103198    local numButtons = orxonox.KeyBinderManager:getInstance():getCurrent():getNumberOfBindings(commandList[k]);
     199
    104200    for i=0,(numButtons-1) do
     201
    105202        local button = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Button" .. i)
     203
    106204        button:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0.7, 0)))
     205
    107206        button:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
     207
    108208        local name = orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[k],i)
     209
    109210        name = P.KeyNameNiceifier(name)
     211
    110212        button:setText(name)
     213
    111214        orxonox.KeyBinderManager:getInstance():subscribeEventHelper(button, "Clicked", P.filename .. ".KeyBindButton_clicked")
     215
    112216        --button:subscribeScriptedEvent("EventClicked", P.filename .. ".KeyBindButton_clicked")
     217
    113218        line:addChildWindow(button)
     219
    114220        offset = offset + buttonWidth
     221
    115222       
     223
    116224        local clear = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Clear" .. i)
     225
    117226        clear:setSize(CEGUI.UVector2(CEGUI.UDim(0, clearWidth), CEGUI.UDim(0.7, 0)))
     227
    118228        clear:setPosition(CEGUI.UVector2(CEGUI.UDim(0, (i*(buttonWidth+clearWidth+spaceWidth)+buttonWidth)+commandWidth+clearWidth+2*spaceWidth), CEGUI.UDim(0.15, 0)))
     229
    119230        clear:setText("X")
     231
    120232        orxonox.KeyBinderManager:getInstance():subscribeEventHelper(clear, "Clicked", P.filename .. ".KeyBindClear_clicked")
     233
    121234        line:addChildWindow(clear)
     235
    122236        offset = offset + clearWidth + spaceWidth
    123     end
    124    
     237
     238    end
     239
     240   
     241
    125242    line:setWidth(CEGUI.UDim(0, offset+clearWidth))
    126    
     243
     244   
     245
    127246    return line
    128 end
     247
     248end
     249
     250
    129251
    130252function P.createLines()
    131253
     254
    132255    local window = winMgr:getWindow("orxonox/KeyBindPane")
    133256
     257
    134258    for k,v in pairs(commandList) do
     259
    135260        local line = P.createLine(k)
     261
    136262        table.insert(linesList, line)
     263
    137264        window:addChildWindow(line)
    138     end
    139 
    140 end
     265
     266    end
     267
     268
     269end
     270
     271
    141272
    142273function P.KeyBindButton_clicked(e)
     274
    143275    local we = CEGUI.toWindowEventArgs(e)
     276
    144277    local name = we.window:getName()
    145278
     279
    146280    local match = string.gmatch(name, "%d+")
     281
    147282    local commandNr = tonumber(match())
     283
    148284    local buttonNr = tonumber(match())
    149    
     285
     286   
     287
    150288    local arguments = {}
     289
    151290    arguments[1] = commandNr
     291
    152292    arguments[2] = buttonNr
     293
    153294    openInfoPopup("Press any button/key or move a mouse/joystick axis.", KeyBindMenu.keybind, false, arguments)
    154295end
    155296
    156297function P.KeyBindPlus_clicked(e)
     298
    157299    local we = CEGUI.toWindowEventArgs(e)
     300
    158301    local name = we.window:getName()
    159    
     302
     303   
     304
    160305    local match = string.gmatch(name, "%d+")
     306
    161307    local commandNr = tonumber(match())
    162308   
     309
    163310    local arguments = {}
     311
    164312    arguments[1] = commandNr
     313
    165314    openInfoPopup("Press any button/key or move a mouse/joystick axis.", KeyBindMenu.keybind, false, arguments)
    166315end
    167316
    168317function P.KeyBindClear_clicked(e)
     318
    169319    local we = CEGUI.toWindowEventArgs(e)
     320
    170321    local name = we.window:getName()
    171    
     322
     323   
     324
    172325    local match = string.gmatch(name, "%d+")
     326
    173327    local commandNr = tonumber(match())
     328
    174329    local buttonNr = tonumber(match())
    175330   
     331 
    176332    orxonox.KeyBinderManager:getInstance():unbind(orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[commandNr], buttonNr))
    177    
     333
     334   
     335
    178336    P.callback()
    179 end
     337
     338end
     339
     340
    180341
    181342function P.keybind(arguments)
     343
    182344    local commandNr = arguments[1]
     345
    183346    local buttonNr = arguments[2]
     347
    184348    if buttonNr ~= nil then
     349
    185350        orxonox.KeyBinderManager:getInstance():unbind(orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[commandNr], buttonNr))
    186     end
     351
     352    end
     353
     354
    187355    orxonox.KeyBinderManager:getInstance():keybind(commandList[commandNr])
    188 end
     356
     357end
     358
     359
    189360
    190361function P.callback()
     362
    191363    while table.getn(linesList) ~= 0 do
     364
    192365        if linesList[1] ~= nil then
     366
    193367            winMgr:destroyWindow(linesList[1]:getName())
     368
    194369        end
     370
    195371        table.remove(linesList, 1)
    196     end
    197    
     372
     373    end
     374
     375   
     376
    198377    linesList = {}
    199378
     379
    200380    P.createLines()
    201    
     381
    202382    if(InfoPopup ~= nil) then
     383
    203384        InfoPopup.close()
    204     end
    205 end
     385
     386    end
     387
     388end
     389
     390
    206391
    207392function P.KeyBindBackButton_clicked(e)
     393
    208394    hideGUI("KeyBindMenu")
    209 end
     395
     396end
     397
     398
    210399
    211400return P
Note: See TracChangeset for help on using the changeset viewer.