Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6746 for code/trunk


Ignore:
Timestamp:
Apr 16, 2010, 2:50:16 PM (15 years ago)
Author:
rgrieder
Message:

Merged gamestates2 branch back to trunk.
This brings in some heavy changes in the GUI framework.
It should also fix problems with triggered asserts in the InputManager.

Note: PickupInventory does not seem to work —> Segfault when showing because before, the owner in GUIOverlay::setGUIName is already NULL.
I haven't tested it before, so I can't tell whether it's my changes.

Location:
code/trunk
Files:
32 deleted
77 edited
24 copied

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/cmake/LibraryConfigTardis.cmake

    r6590 r6746  
    4444  #SET(BOOST_INCLUDEDIR "/usr/pack/boost-1.42.0-bs/include")
    4545  #SET(BOOST_LIBRARYDIR "/usr/pack/boost-1.42.0-bs/i686-debian-linux4.0/lib")
     46  SET(Boost_VERSION 104200)
    4647  SET(Boost_INCLUDE_DIRS "/usr/pack/boost-1.42.0-bs/include" CACHE PATH "")
    4748  SET(Boost_SYSTEM_LIBRARY_RELEASE "/usr/pack/boost-1.42.0-bs/i686-debian-linux5.0/lib/libboost_system.so" CACHE PATH "")
  • code/trunk/data/gui/layouts/AudioMenu.layout

    r6417 r6746  
    22
    33<GUILayout >
    4     <Window Type="TaharezLook/StaticImage" Name="orxonox/AudioBackground" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/AudioBackground" >
    55        <Property Name="FrameEnabled" Value="False" />
    66        <Property Name="InheritsAlpha" Value="False" />
     
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="TaharezLook/StaticText" Name="orxonox/AudioWindow" >
     10        <Window Type="MenuWidgets/StaticText" Name="orxonox/AudioWindow" >
    1111            <Property Name="Text" Value="Audio" />
    1212            <Property Name="Alpha" Value="0.8" />
     
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    1717            <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.2875,0},{0.8,0},{0.6375,0}}" />
    18             <Window Type="TaharezLook/StaticText" Name="orxonox/MasterVolume" >
     18            <Window Type="MenuWidgets/StaticText" Name="orxonox/MasterVolume" >
    1919                <Property Name="Text" Value="Master volume               " />
    2020                <Property Name="InheritsAlpha" Value="False" />
     
    2323                <Property Name="VertFormatting" Value="TopAligned" />
    2424                <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0.15,0},{0.5625,0},{0.3525,0}}" />
    25                 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MasterScrollbar" >
     25                <Window Type="MenuWidgets/HorizontalScrollbar" Name="orxonox/MasterScrollbar" >
    2626                    <Property Name="PageSize" Value="0" />
    2727                    <Property Name="StepSize" Value="1" />
     
    3636                    <Event Name="ScrollPosChanged" Function="AudioMenu.AudioMasterScrollbar_changed" />
    3737                </Window>
    38                 <Window Type="TaharezLook/Checkbox" Name="orxonox/MasterCheckbox" >
     38                <Window Type="MenuWidgets/Checkbox" Name="orxonox/MasterCheckbox" >
    3939                    <Property Name="Text" Value="Mute" />
    4040                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    4343                </Window>
    4444            </Window>
    45             <Window Type="TaharezLook/StaticText" Name="orxonox/MusicVolume" >
     45            <Window Type="MenuWidgets/StaticText" Name="orxonox/MusicVolume" >
    4646                <Property Name="Text" Value="Music volume               " />
    4747                <Property Name="InheritsAlpha" Value="False" />
     
    5050                <Property Name="VertFormatting" Value="TopAligned" />
    5151                <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0.4335,0},{0.5625,0},{0.636,0}}" />
    52                 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MusicScrollbar" >
     52                <Window Type="MenuWidgets/HorizontalScrollbar" Name="orxonox/MusicScrollbar" >
    5353                    <Property Name="PageSize" Value="0" />
    5454                    <Property Name="StepSize" Value="1" />
     
    6363                    <Event Name="ScrollPosChanged" Function="AudioMenu.AudioMusicScrollbar_changed" />
    6464                </Window>
    65                 <Window Type="TaharezLook/Checkbox" Name="orxonox/MusicCheckbox" >
     65                <Window Type="MenuWidgets/Checkbox" Name="orxonox/MusicCheckbox" >
    6666                    <Property Name="Text" Value="Mute" />
    6767                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    7070                </Window>
    7171            </Window>
    72             <Window Type="TaharezLook/StaticText" Name="orxonox/EffectsVolume" >
     72            <Window Type="MenuWidgets/StaticText" Name="orxonox/EffectsVolume" >
    7373                <Property Name="Text" Value="Effects volume               " />
    7474                <Property Name="InheritsAlpha" Value="False" />
     
    7777                <Property Name="VertFormatting" Value="TopAligned" />
    7878                <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0.717,0},{0.5625,0},{0.9195,0}}" />
    79                 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/EffectsScrollbar" >
     79                <Window Type="MenuWidgets/HorizontalScrollbar" Name="orxonox/EffectsScrollbar" >
    8080                    <Property Name="PageSize" Value="0" />
    8181                    <Property Name="StepSize" Value="1" />
     
    9090                    <Event Name="ScrollPosChanged" Function="AudioMenu.AudioEffectsScrollbar_changed" />
    9191                </Window>
    92                 <Window Type="TaharezLook/Checkbox" Name="orxonox/EffectsCheckbox" >
     92                <Window Type="MenuWidgets/Checkbox" Name="orxonox/EffectsCheckbox" >
    9393                    <Property Name="Text" Value="Mute" />
    9494                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    9797                </Window>
    9898            </Window>
    99             <Window Type="TaharezLook/StaticText" Name="orxonox/AudioTheme" >
     99            <Window Type="MenuWidgets/StaticText" Name="orxonox/AudioTheme" >
    100100                <Property Name="Text" Value="Theme" />
    101101                <Property Name="InheritsAlpha" Value="False" />
     
    104104                <Property Name="VertFormatting" Value="TopAligned" />
    105105                <Property Name="UnifiedAreaRect" Value="{{0.604166,0},{0.15,0},{0.958333,0},{0.636,0}}" />
    106                 <Window Type="TaharezLook/Listbox" Name="orxonox/AudioThemeListbox" >
     106                <Window Type="MenuWidgets/Listbox" Name="orxonox/AudioThemeListbox" >
    107107                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    108108                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.225,0},{0.95,0},{0.92,0}}" />
     
    110110                </Window>
    111111            </Window>
    112             <Window Type="TaharezLook/StaticText" Name="orxonox/AudioInfo" >
     112            <Window Type="MenuWidgets/StaticText" Name="orxonox/AudioInfo" >
    113113                <Property Name="Text" >Theme changes might take
    114114up to a minute.</Property>
     
    121121            </Window>
    122122        </Window>
    123         <Window Type="TaharezLook/Button" Name="orxonox/AudioBackButton" >
     123        <Window Type="MenuWidgets/Button" Name="orxonox/AudioBackButton" >
    124124            <Property Name="Text" Value="Back" />
    125125            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/ControlsMenu.layout

    r6417 r6746  
    22
    33<GUILayout >
    4     <Window Type="TaharezLook/StaticImage" Name="orxonox/ControlsBackground" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/ControlsBackground" >
    55        <Property Name="FrameEnabled" Value="False" />
    66        <Property Name="InheritsAlpha" Value="False" />
     
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="TaharezLook/StaticText" Name="orxonox/ControlsWindow" >
     10        <Window Type="MenuWidgets/StaticText" Name="orxonox/ControlsWindow" >
    1111            <Property Name="Text" Value="Controls" />
    1212            <Property Name="Alpha" Value="0.8" />
     
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    1717            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" />
    18             <Window Type="TaharezLook/Button" Name="orxonox/MouseControlsButton" >
     18            <Window Type="MenuWidgets/Button" Name="orxonox/MouseControlsButton" >
    1919                <Property Name="Text" Value="Mouse controls" />
    2020                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    2222                <Event Name="Clicked" Function="ControlsMenu.ControlsMouseControlsButton_clicked"/>
    2323            </Window>
    24             <Window Type="TaharezLook/Button" Name="orxonox/KeybindingsButton" >
     24            <Window Type="MenuWidgets/Button" Name="orxonox/KeybindingsButton" >
    2525                <Property Name="Text" Value="Keybindings" />
    2626                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    2929            </Window>
    3030        </Window>
    31         <Window Type="TaharezLook/Button" Name="orxonox/ControlsBackButton" >
     31        <Window Type="MenuWidgets/Button" Name="orxonox/ControlsBackButton" >
    3232            <Property Name="Text" Value="Back" />
    3333            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/CreditsMenu.layout

    r6417 r6746  
    22
    33<GUILayout >
    4     <Window Type="TaharezLook/StaticImage" Name="orxonox/CreditsBackground" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/CreditsBackground" >
    55        <Property Name="FrameEnabled" Value="False" />
    66        <Property Name="InheritsAlpha" Value="False" />
     
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="TaharezLook/StaticText" Name="orxonox/CreditsWindow" >
     10        <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsWindow" >
    1111            <Property Name="Text" Value="Credits" />
    1212            <Property Name="Alpha" Value="0.8" />
     
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    1717            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" />
    18             <Window Type="TaharezLook/StaticText" Name="orxonox/CreditsText" >
     18            <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsText" >
    1919                <Property Name="Text">Orxonox version 0.0.3
    2020
     
    3232            </Window>
    3333        </Window>
    34         <Window Type="TaharezLook/Button" Name="orxonox/CreditsBackButton" >
     34        <Window Type="MenuWidgets/Button" Name="orxonox/CreditsBackButton" >
    3535            <Property Name="Text" Value="Back" />
    3636            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/DecisionPopup.layout

    r6417 r6746  
    66        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    77        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    8         <Window Type="TaharezLook/StaticImage" Name="orxonox/DecisionPopup_Background" >
     8        <Window Type="MenuWidgets/StaticImage" Name="orxonox/DecisionPopup_Background" >
    99            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1010            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    1111            <Property Name="Alpha" Value="0.6" />
    12             <Window Type="TaharezLook/Button" Name="orxonox/DecisionPopup_button_yes" >
    13                 <Property Name="Font" Value="BlueHighway-12" />
     12            <Window Type="MenuWidgets/Button" Name="orxonox/DecisionPopup_button_yes" >
    1413                <Property Name="Text" Value="Yes" />
    1514                <Property Name="Alpha" Value="0.7" />
     
    1918                <Event Name="Clicked" Function="DecisionPopup.button_yes"/>
    2019            </Window>
    21             <Window Type="TaharezLook/Button" Name="orxonox/DecisionPopup_button_no" >
    22                 <Property Name="Font" Value="BlueHighway-12" />
     20            <Window Type="MenuWidgets/Button" Name="orxonox/DecisionPopup_button_no" >
    2321                <Property Name="Text" Value="No" />
    2422                <Property Name="Alpha" Value="0.8" />
     
    2826                <Event Name="Clicked" Function="DecisionPopup.button_no"/>
    2927            </Window>
    30             <Window Type="TaharezLook/StaticText" Name="orxonox/DecisionPopup_text" >
     28            <Window Type="MenuWidgets/StaticText" Name="orxonox/DecisionPopup_text" >
    3129                <Property Name="Text" Value="Template text" />
    3230                <Property Name="HorzFormatting" Value="WordWrapCentred" />
  • code/trunk/data/gui/layouts/GameplayMenu.layout

    r6417 r6746  
    22
    33<GUILayout >
    4     <Window Type="TaharezLook/StaticImage" Name="orxonox/GameplayBackground" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/GameplayBackground" >
    55        <Property Name="FrameEnabled" Value="False" />
    66        <Property Name="InheritsAlpha" Value="False" />
     
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="TaharezLook/StaticText" Name="orxonox/GameplayWindow" >
     10        <Window Type="MenuWidgets/StaticText" Name="orxonox/GameplayWindow" >
    1111            <Property Name="Text" Value="Gameplay" />
    1212            <Property Name="Alpha" Value="0.8" />
     
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    1717            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" />
    18             <Window Type="TaharezLook/StaticText" Name="orxonox/Difficulty" >
     18            <Window Type="MenuWidgets/StaticText" Name="orxonox/Difficulty" >
    1919                <Property Name="Text" Value="Difficulty" />
    2020                <Property Name="InheritsAlpha" Value="False" />
     
    2323                <Property Name="VertFormatting" Value="TopAligned" />
    2424                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.475,0},{0.9,0}}" />
    25                 <Window Type="TaharezLook/RadioButton" Name="orxonox/DifficultyEasyButton" >
     25                <Window Type="MenuWidgets/RadioButton" Name="orxonox/DifficultyEasyButton" >
    2626                    <Property Name="Text" Value="Easy" />
    2727                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    2929                    <Event Name="SelectStateChanged" Function="GameplayMenu.GameplayDifficultyEasyButton_clicked"/>
    3030                </Window>
    31                 <Window Type="TaharezLook/RadioButton" Name="orxonox/DifficultyNormalButton" >
     31                <Window Type="MenuWidgets/RadioButton" Name="orxonox/DifficultyNormalButton" >
    3232                    <Property Name="Text" Value="Normal" />
    3333                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    3535                    <Event Name="SelectStateChanged" Function="GameplayMenu.GameplayDifficultyNormalButton_clicked"/>
    3636                </Window>
    37                 <Window Type="TaharezLook/RadioButton" Name="orxonox/DifficultyHardButton" >
     37                <Window Type="MenuWidgets/RadioButton" Name="orxonox/DifficultyHardButton" >
    3838                    <Property Name="Text" Value="Hard" />
    3939                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    4242                </Window>
    4343            </Window>
    44             <Window Type="TaharezLook/StaticText" Name="orxonox/Theme" >
     44            <Window Type="MenuWidgets/StaticText" Name="orxonox/Theme" >
    4545                <Property Name="Text" Value="Theme" />
    4646                <Property Name="InheritsAlpha" Value="False" />
     
    4949                <Property Name="VertFormatting" Value="TopAligned" />
    5050                <Property Name="UnifiedAreaRect" Value="{{0.525,0},{0.2,0},{0.95,0},{0.9,0}}" />
    51                 <Window Type="TaharezLook/Combobox" Name="orxonox/ThemeCombobox" >
     51                <Window Type="MenuWidgets/Combobox" Name="orxonox/ThemeCombobox" >
    5252                    <Property Name="AlwaysOnTop" Value="True" />
    5353                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    5959            </Window>
    6060        </Window>
    61         <Window Type="TaharezLook/Button" Name="orxonox/GameplayBackButton" >
     61        <Window Type="MenuWidgets/Button" Name="orxonox/GameplayBackButton" >
    6262            <Property Name="Text" Value="Back" />
    6363            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/GraphicsMenu.layout

    r6417 r6746  
    22
    33<GUILayout >
    4     <Window Type="TaharezLook/StaticImage" Name="orxonox/GraphicsBackground" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/GraphicsBackground" >
    55        <Property Name="FrameEnabled" Value="False" />
    66        <Property Name="InheritsAlpha" Value="False" />
     
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="TaharezLook/StaticText" Name="orxonox/GraphicsWindow" >
     10        <Window Type="MenuWidgets/StaticText" Name="orxonox/GraphicsWindow" >
    1111            <Property Name="Text" Value="Graphics" />
    1212            <Property Name="Alpha" Value="0.8" />
     
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    1717            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.6375,0}}" />
    18             <Window Type="TaharezLook/StaticText" Name="orxonox/Resolution" >
     18            <Window Type="MenuWidgets/StaticText" Name="orxonox/Resolution" >
    1919                <Property Name="Text" Value="Resolution" />
    2020                <Property Name="InheritsAlpha" Value="False" />
     
    2323                <Property Name="VertFormatting" Value="TopAligned" />
    2424                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.475,0},{0.92,0}}" />
    25                 <Window Type="TaharezLook/Listbox" Name="orxonox/ResolutionListbox" >
     25                <Window Type="MenuWidgets/Listbox" Name="orxonox/ResolutionListbox" >
    2626                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    2727                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.95,0}}" />
     
    2929                </Window>
    3030            </Window>
    31             <Window Type="TaharezLook/StaticText" Name="orxonox/Brightness" >
     31            <Window Type="MenuWidgets/StaticText" Name="orxonox/Brightness" >
    3232                <Property Name="Text" Value="Brightness" />
    3333                <Property Name="InheritsAlpha" Value="False" />
     
    3636                <Property Name="VertFormatting" Value="TopAligned" />
    3737                <Property Name="UnifiedAreaRect" Value="{{0.525,0},{0.15,0},{0.95,0},{0.35,0}}" />
    38                 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/BrightnessScrollbar" >
     38                <Window Type="MenuWidgets/HorizontalScrollbar" Name="orxonox/BrightnessScrollbar" >
    3939                    <Property Name="Disabled" Value="true" />
    4040                    <Property Name="PageSize" Value="0" />
     
    5050                </Window>
    5151            </Window>
    52             <Window Type="TaharezLook/Checkbox" Name="orxonox/FullscreenCheckbox" >
     52            <Window Type="MenuWidgets/Checkbox" Name="orxonox/FullscreenCheckbox" >
    5353                <Property Name="Text" Value="Fullscreen" />
    5454                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    5656                <Event Name="CheckStateChanged" Function="GraphicsMenu.GraphicsFullscreenCheckbox_clicked"/>
    5757            </Window>
    58             <Window Type="TaharezLook/StaticText" Name="orxonox/GraphicsInfo" >
     58            <Window Type="MenuWidgets/StaticText" Name="orxonox/GraphicsInfo" >
    5959                <Property Name="Text" >
    6060Changes in graphics
     
    6969            </Window>
    7070        </Window>
    71         <Window Type="TaharezLook/Button" Name="orxonox/GraphicsBackButton" >
     71        <Window Type="MenuWidgets/Button" Name="orxonox/GraphicsBackButton" >
    7272            <Property Name="Text" Value="Back" />
    7373            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/InGameMenu.layout

    r6417 r6746  
    66        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    77        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    8         <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_ReturnButton" >
    9             <Property Name="Font" Value="BlueHighway-12" />
     8        <Window Type="MenuWidgets/Button" Name="orxonox/InGameMenu_ReturnButton" >
    109            <Property Name="Text" Value="Return to Game" />
    1110            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    1413            <Event Name="Clicked" Function="InGameMenu.button_return_clicked"/>
    1514        </Window>
    16         <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_MainMenuButton" >
    17             <Property Name="Font" Value="BlueHighway-12" />
     15        <Window Type="MenuWidgets/Button" Name="orxonox/InGameMenu_MainMenuButton" >
    1816            <Property Name="Text" Value="Main Menu" />
    1917            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    2220            <Event Name="Clicked" Function="InGameMenu.button_mainmenu_clicked"/>
    2321        </Window>
    24         <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_SettingsButton" >
    25             <Property Name="Font" Value="BlueHighway-12" />
     22        <Window Type="MenuWidgets/Button" Name="orxonox/InGameMenu_SettingsButton" >
    2623            <Property Name="Text" Value="Settings" />
    2724            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    3027            <Event Name="Clicked" Function="InGameMenu.button_settings_clicked"/>
    3128        </Window>
    32         <Window Type="TaharezLook/Button" Name="orxonox/InGameMenu_QuitButton" >
    33             <Property Name="Font" Value="BlueHighway-12" />
     29        <Window Type="MenuWidgets/Button" Name="orxonox/InGameMenu_QuitButton" >
    3430            <Property Name="Text" Value="Quit" />
    3531            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/InGameTest.layout

    r5781 r6746  
    44    <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}"/>
    55
    6         <Window Type="TaharezLook/Button" Name="orxonox/TestButton">
     6        <Window Type="MenuWidgets/Button" Name="orxonox/TestButton">
    77            <Property Name="UnifiedPosition" Value="{{0.11,0},{0.528,0}}"/>
    88            <Property Name="UnifiedSize" Value="{{0.15,0},{0.05,0}}"/>
  • code/trunk/data/gui/layouts/InfoPopup.layout

    r6417 r6746  
    66        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    77        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    8         <Window Type="TaharezLook/StaticImage" Name="orxonox/InfoPopup_Background" >
     8        <Window Type="MenuWidgets/StaticImage" Name="orxonox/InfoPopup_Background" >
    99            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1010            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    1111            <Property Name="Alpha" Value="0.7" />
    12             <Window Type="TaharezLook/Button" Name="orxonox/InfoPopup_close" >
    13                 <Property Name="Font" Value="BlueHighway-12" />
     12            <Window Type="MenuWidgets/Button" Name="orxonox/InfoPopup_close" >
    1413                <Property Name="Text" Value="Close" />
    1514                <Property Name="Alpha" Value="0.7" />
     
    1918                <Event Name="Clicked" Function="InfoPopup.close"/>
    2019            </Window>
    21             <Window Type="TaharezLook/StaticText" Name="orxonox/InfoPopup_text" >
     20            <Window Type="MenuWidgets/StaticText" Name="orxonox/InfoPopup_text" >
    2221                <Property Name="Text" Value="Template text" />
    2322                <Property Name="TextColours" Value="FF4444FF" />
  • code/trunk/data/gui/layouts/KeyBindMenu.layout

    r6417 r6746  
    66        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    77        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    8         <Window Type="TaharezLook/StaticText" Name="orxonox/KeyBindWindow" >
     8        <Window Type="MenuWidgets/StaticText" Name="orxonox/KeyBindWindow" >
    99            <Property Name="Text" Value="Keybindings" />
    1010            <Property Name="Alpha" Value="0.8" />
     
    1414            <Property Name="VertFormatting" Value="TopAligned" />
    1515            <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.2125,0},{0.85,0},{0.6375,0}}" />
    16             <Window Type="TaharezLook/StaticText" Name="orxonox/KeyBindWrapper" >
     16            <Window Type="MenuWidgets/StaticText" Name="orxonox/KeyBindWrapper" >
    1717                <Property Name="TextColours" Value="FF4444FF" />
    1818                <Property Name="InheritsAlpha" Value="False" />
     
    2121                <Property Name="VertFormatting" Value="TopAligned" />
    2222                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" />
    23                 <Window Type="TaharezLook/ScrollablePane" Name="orxonox/KeyBindPane" >
     23                <Window Type="MenuWidgets/ScrollablePane" Name="orxonox/KeyBindPane" >
    2424                    <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" />
    2525                    <Property Name="HorzStepSize" Value="0.005" />
     
    3434            </Window>
    3535        </Window>
    36         <Window Type="TaharezLook/Button" Name="orxonox/KeyBindBackButton" >
     36        <Window Type="MenuWidgets/Button" Name="orxonox/KeyBindBackButton" >
    3737            <Property Name="Text" Value="Back" />
    3838            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/MainMenu.layout

    r6417 r6746  
    22
    33<GUILayout >
    4     <Window Type="TaharezLook/StaticImage" Name="orxonox/MainMenuBackground" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/MainMenuBackground" >
    55        <Property Name="FrameEnabled" Value="False" />
    66        <Property Name="InheritsAlpha" Value="False" />
    77        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    8         <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1.02125,0},{1.02167,0}}" />
     8        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1.0,0},{1.0,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="TaharezLook/Button" Name="orxonox/QuickGameTestButton" >
     10        <Window Type="MenuWidgets/Button" Name="orxonox/QuickGameTestButton" >
    1111            <Property Name="Text" Value="Quickstart" />
    1212            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    1414            <Event Name="Clicked" Function="MainMenu.QuickGameTestButton_clicked"/>
    1515        </Window>
    16         <Window Type="TaharezLook/Button" Name="orxonox/SingleplayerButton" >
     16        <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerButton" >
    1717            <Property Name="Text" Value="Singleplayer" />
    1818            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    2020            <Event Name="Clicked" Function="MainMenu.SingleplayerButton_clicked"/>
    2121        </Window>
    22         <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerButton" >
     22        <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerButton" >
    2323            <Property Name="Text" Value="Multiplayer" />
    2424            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    2626            <Event Name="Clicked" Function="MainMenu.MultiplayerButton_clicked"/>
    2727        </Window>
    28         <Window Type="TaharezLook/Button" Name="orxonox/SettingsButton" >
     28        <Window Type="MenuWidgets/Button" Name="orxonox/SettingsButton" >
    2929            <Property Name="Text" Value="Settings" />
    3030            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    3232            <Event Name="Clicked" Function="MainMenu.SettingsButton_clicked"/>
    3333        </Window>
    34         <Window Type="TaharezLook/Button" Name="orxonox/CreditsButton" >
     34        <Window Type="MenuWidgets/Button" Name="orxonox/CreditsButton" >
    3535            <Property Name="Text" Value="Credits" />
    3636            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    3838            <Event Name="Clicked" Function="MainMenu.CreditsButton_clicked"/>
    3939        </Window>
    40         <Window Type="TaharezLook/Button" Name="orxonox/ExitButton" >
     40        <Window Type="MenuWidgets/Button" Name="orxonox/ExitButton" >
    4141            <Property Name="Text" Value="Exit" />
    4242            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/MainMenuBackground.layout

    r6417 r6746  
    11<?xml version="1.0" ?>
    22<GUILayout>
    3     <Window Type="TaharezLook/StaticImage" Name="orxonox/Background">
     3    <Window Type="MenuWidgets/StaticImage" Name="orxonox/Background">
    44    <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}"/>
    55    <Property Name="Image" Value="set:MainMenuBackground image:Background"/>
  • code/trunk/data/gui/layouts/MouseControlsMenu.layout

    r6417 r6746  
    22
    33<GUILayout >
    4     <Window Type="TaharezLook/StaticImage" Name="orxonox/MouseControlsBackground" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/MouseControlsBackground" >
    55        <Property Name="FrameEnabled" Value="False" />
    66        <Property Name="InheritsAlpha" Value="False" />
     
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="TaharezLook/StaticText" Name="orxonox/MouseControlsWindow" >
     10        <Window Type="MenuWidgets/StaticText" Name="orxonox/MouseControlsWindow" >
    1111            <Property Name="Text" Value="Mouse controls" />
    1212            <Property Name="Alpha" Value="0.8" />
     
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    1717            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" />
    18             <Window Type="TaharezLook/StaticText" Name="orxonox/MouseNormalSensitivity" >
     18            <Window Type="MenuWidgets/StaticText" Name="orxonox/MouseNormalSensitivity" >
    1919                <Property Name="Text" Value="Sensitivity (normal mode)                                      " />
    2020                <Property Name="InheritsAlpha" Value="False" />
     
    2323                <Property Name="VertFormatting" Value="TopAligned" />
    2424                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.95,0},{0.45,0}}" />
    25                 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MouseNormalScrollbar" >
     25                <Window Type="MenuWidgets/HorizontalScrollbar" Name="orxonox/MouseNormalScrollbar" >
    2626                    <Property Name="PageSize" Value="0" />
    2727                    <Property Name="StepSize" Value="1" />
     
    3636                    <Event Name="ScrollPosChanged" Function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_changed" />
    3737                </Window>
    38                 <Window Type="TaharezLook/RadioButton" Name="orxonox/MouseNormalButton" >
     38                <Window Type="MenuWidgets/RadioButton" Name="orxonox/MouseNormalButton" >
    3939                    <Property Name="Text" Value="Normal mouse input" />
    4040                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    4343                </Window>
    4444            </Window>
    45             <Window Type="TaharezLook/StaticText" Name="orxonox/MouseDeriveSensitivity" >
     45            <Window Type="MenuWidgets/StaticText" Name="orxonox/MouseDeriveSensitivity" >
    4646                <Property Name="Text" Value="Sensitivity (derive mode)                                      " />
    4747                <Property Name="InheritsAlpha" Value="False" />
     
    5050                <Property Name="VertFormatting" Value="TopAligned" />
    5151                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.55,0},{0.95,0},{0.8,0}}" />
    52                 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MouseDeriveScrollbar" >
     52                <Window Type="MenuWidgets/HorizontalScrollbar" Name="orxonox/MouseDeriveScrollbar" >
    5353                    <Property Name="PageSize" Value="0" />
    5454                    <Property Name="StepSize" Value="1" />
     
    6363                    <Event Name="ScrollPosChanged" Function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_changed" />
    6464                </Window>
    65                 <Window Type="TaharezLook/RadioButton" Name="orxonox/MouseDeriveButton" >
     65                <Window Type="MenuWidgets/RadioButton" Name="orxonox/MouseDeriveButton" >
    6666                    <Property Name="Text" Value="Derive mouse input" />
    6767                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    7070                </Window>
    7171            </Window>
    72             <Window Type="TaharezLook/Checkbox" Name="orxonox/MouseInvertCheckbox" >
     72            <Window Type="MenuWidgets/Checkbox" Name="orxonox/MouseInvertCheckbox" >
    7373                <Property Name="Text" Value="Invert mouse" />
    7474                <Property Name="Disabled" Value="true" />
     
    7878            </Window>
    7979        </Window>
    80         <Window Type="TaharezLook/Button" Name="orxonox/MouseControlsBackButton" >
     80        <Window Type="MenuWidgets/Button" Name="orxonox/MouseControlsBackButton" >
    8181            <Property Name="Text" Value="Back" />
    8282            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/MultiplayerMenu.layout

    r6417 r6746  
    22
    33<GUILayout >
    4     <Window Type="TaharezLook/StaticImage" Name="orxonox/MultiplayerBackground" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/MultiplayerBackground" >
    55        <Property Name="FrameEnabled" Value="False" />
    66        <Property Name="InheritsAlpha" Value="False" />
     
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="TaharezLook/StaticText" Name="orxonox/MultiplayerWindow" >
     10        <Window Type="MenuWidgets/StaticText" Name="orxonox/MultiplayerWindow" >
    1111            <Property Name="Text" Value="Multiplayer" />
    1212            <Property Name="Alpha" Value="0.8" />
     
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    1717            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.6375,0}}" />
    18             <Window Type="TaharezLook/Listbox" Name="orxonox/MultiplayerLevelListbox" >
     18            <Window Type="MenuWidgets/Listbox" Name="orxonox/MultiplayerLevelListbox" >
    1919                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    2020                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.8,0}}" />
    2121            </Window>
    22             <Window Type="TaharezLook/RadioButton" Name="orxonox/MultiplayerJoinButton" >
     22            <Window Type="MenuWidgets/RadioButton" Name="orxonox/MultiplayerJoinButton" >
    2323                <Property Name="Text" Value="Join" />
    2424                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    2626                <Event Name="SelectStateChanged" Function="MultiplayerMenu.MultiplayerJoinButton_clicked"/>
    2727            </Window>
    28             <Window Type="TaharezLook/RadioButton" Name="orxonox/MultiplayerHostButton" >
     28            <Window Type="MenuWidgets/RadioButton" Name="orxonox/MultiplayerHostButton" >
    2929                <Property Name="Text" Value="Host" />
    3030                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    3232                <Event Name="SelectStateChanged" Function="MultiplayerMenu.MultiplayerHostButton_clicked"/>
    3333            </Window>
    34             <Window Type="TaharezLook/RadioButton" Name="orxonox/MultiplayerDedicatedButton" >
     34            <Window Type="MenuWidgets/RadioButton" Name="orxonox/MultiplayerDedicatedButton" >
    3535                <Property Name="Text" Value="Dedicated" />
    3636                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    3939            </Window>
    4040        </Window>
    41         <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerStartButton" >
     41        <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerStartButton" >
    4242            <Property Name="Text" Value="Start" />
    4343            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    4545            <Event Name="Clicked" Function="MultiplayerMenu.MultiplayerStartButton_clicked"/>
    4646        </Window>
    47         <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerBackButton" >
     47        <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerBackButton" >
    4848            <Property Name="Text" Value="Back" />
    4949            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/MultiplayerOptionsMenu.layout

    r6417 r6746  
    22
    33<GUILayout >
    4     <Window Type="TaharezLook/StaticImage" Name="orxonox/MultiplayerOptionsBackground" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/MultiplayerOptionsBackground" >
    55        <Property Name="FrameEnabled" Value="False" />
    66        <Property Name="InheritsAlpha" Value="False" />
     
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="TaharezLook/StaticText" Name="orxonox/MultiplayerOptionsWindow" >
     10        <Window Type="MenuWidgets/StaticText" Name="orxonox/MultiplayerOptionsWindow" >
    1111            <Property Name="Text" Value="Multiplayer options" />
    1212            <Property Name="Alpha" Value="0.8" />
     
    1717            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" />
    1818        </Window>
    19         <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerOptionsBackButton" >
     19        <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerOptionsBackButton" >
    2020            <Property Name="Text" Value="Back" />
    2121            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/PickupInventory.layout

    r6711 r6746  
    66        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    77        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    8         <Window Type="TaharezLook/StaticText" Name="orxonox/PickupInventory/PickupInventory" >
     8        <Window Type="MenuWidgets/StaticText" Name="orxonox/PickupInventory/PickupInventory" >
    99            <Property Name="Text" Value="Pickup Inventory" />
    1010            <Property Name="Alpha" Value="0.8" />
     
    1414            <Property Name="VertFormatting" Value="TopAligned" />
    1515            <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.15,0},{0.85,0},{0.8,0}}" />
    16             <Window Type="TaharezLook/StaticText" Name="orxonox/PickupInventory/Wrapper" >
     16            <Window Type="MenuWidgets/StaticText" Name="orxonox/PickupInventory/Wrapper" >
    1717                <Property Name="TextColours" Value="FF4444FF" />
    1818                <Property Name="InheritsAlpha" Value="False" />
     
    2121                <Property Name="VertFormatting" Value="TopAligned" />
    2222                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" />
    23                 <Window Type="TaharezLook/ScrollablePane" Name="orxonox/PickupInventory/Inventory" >
     23                <Window Type="MenuWidgets/ScrollablePane" Name="orxonox/PickupInventory/Inventory" >
    2424                    <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" />
    2525                    <Property Name="HorzStepSize" Value="0.005" />
     
    3434            </Window>
    3535        </Window>
    36         <Window Type="TaharezLook/Button" Name="orxonox/PickupInventory/InventoryBackButton" >
     36        <Window Type="MenuWidgets/Button" Name="orxonox/PickupInventory/InventoryBackButton" >
    3737            <Property Name="Text" Value="Back" />
    3838            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/QuestGUI.layout

    r6417 r6746  
    11<?xml version="1.0" ?>
    22<GUILayout>
    3     <Window Type="TaharezLook/StaticImage" Name="orxonox/QuestGUI/Background">
     3    <Window Type="MenuWidgets/StaticImage" Name="orxonox/QuestGUI/Background">
    44    <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}"/>
    55    <Property Name="Image" Value="set:MainMenuBackground image:Background"/>
     
    88    <Property Name="InheritsAlpha" Value="False" />
    99
    10         <Window Type="TaharezLook/Titlebar" Name="orxonox/QuestGUI/Title">
     10        <Window Type="MenuWidgets/Titlebar" Name="orxonox/QuestGUI/Title">
    1111            <Property Name="UnifiedPosition" Value="{{0.05,0},{0.05,0}}"/>
    1212            <Property Name="UnifiedSize" Value="{{0.9,0},{0.05,0}}"/>
     
    1414        </Window>
    1515
    16         <Window Type="TaharezLook/Listbox" Name="orxonox/QuestGUI/QuestsList">
     16        <Window Type="MenuWidgets/Listbox" Name="orxonox/QuestGUI/QuestsList">
    1717            <Property Name="UnifiedPosition" Value="{{0.07,0},{0.18,0}}" />
    1818            <Property Name="UnifiedSize" Value="{{0.86,0},{0.8,0}}" />
  • code/trunk/data/gui/layouts/SettingsMenu.layout

    r6417 r6746  
    22
    33<GUILayout >
    4     <Window Type="TaharezLook/StaticImage" Name="orxonox/SettingsBackground" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/SettingsBackground" >
    55        <Property Name="InheritsAlpha" Value="False" />
    66        <Property Name="FrameEnabled" Value="False" />
     
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="TaharezLook/StaticText" Name="orxonox/SettingsWindow" >
     10        <Window Type="MenuWidgets/StaticText" Name="orxonox/SettingsWindow" >
    1111            <Property Name="Text" Value="Settings" />
    1212            <Property Name="Alpha" Value="0.8" />
     
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    1717            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" />
    18             <Window Type="TaharezLook/Button" Name="orxonox/GameplayButton" >
     18            <Window Type="MenuWidgets/Button" Name="orxonox/GameplayButton" >
    1919                <Property Name="Text" Value="Gameplay" />
    2020                <Property Name="Disabled" Value="True" />
     
    2323                <Event Name="Clicked" Function="SettingsMenu.SettingsGameplayButton_clicked"/>
    2424            </Window>
    25             <Window Type="TaharezLook/Button" Name="orxonox/MultiplayerOptionsButton" >
     25            <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerOptionsButton" >
    2626                <Property Name="Text" Value="Multiplayer options" />
    2727                <Property Name="Disabled" Value="True" />
     
    3030                <Event Name="Clicked" Function="SettingsMenu.SettingsMultiplayerOptionsButton_clicked"/>
    3131            </Window>
    32             <Window Type="TaharezLook/Button" Name="orxonox/ControlsButton" >
     32            <Window Type="MenuWidgets/Button" Name="orxonox/ControlsButton" >
    3333                <Property Name="Text" Value="Controls" />
    3434                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    3636                <Event Name="Clicked" Function="SettingsMenu.SettingsControlsButton_clicked"/>
    3737            </Window>
    38             <Window Type="TaharezLook/Button" Name="orxonox/GraphicsButton" >
     38            <Window Type="MenuWidgets/Button" Name="orxonox/GraphicsButton" >
    3939                <Property Name="Text" Value="Graphics" />
    4040                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    4242                <Event Name="Clicked" Function="SettingsMenu.SettingsGraphicsButton_clicked"/>
    4343            </Window>
    44             <Window Type="TaharezLook/Button" Name="orxonox/AudioButton" >
     44            <Window Type="MenuWidgets/Button" Name="orxonox/AudioButton" >
    4545                <Property Name="Text" Value="Audio" />
    4646                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    4848                <Event Name="Clicked" Function="SettingsMenu.SettingsAudioButton_clicked"/>
    4949            </Window>
    50             <Window Type="TaharezLook/Button" Name="orxonox/ResetSettingsButton" >
     50            <Window Type="MenuWidgets/Button" Name="orxonox/ResetSettingsButton" >
    5151                <Property Name="Text" Value="Reset settings" />
    5252                <Property Name="Disabled" Value="True" />
     
    5656            </Window>
    5757        </Window>
    58         <Window Type="TaharezLook/Button" Name="orxonox/SettingsBackButton" >
     58        <Window Type="MenuWidgets/Button" Name="orxonox/SettingsBackButton" >
    5959            <Property Name="Text" Value="Back" />
    6060            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/layouts/SingleplayerMenu.layout

    r6417 r6746  
    22
    33<GUILayout >
    4     <Window Type="TaharezLook/StaticImage" Name="orxonox/SingleplayerBackground" >
     4    <Window Type="MenuWidgets/StaticImage" Name="orxonox/SingleplayerBackground" >
    55        <Property Name="FrameEnabled" Value="False" />
    66        <Property Name="InheritsAlpha" Value="False" />
     
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="TaharezLook/StaticText" Name="orxonox/SingleplayerWindow" >
     10        <Window Type="MenuWidgets/StaticText" Name="orxonox/SingleplayerWindow" >
    1111            <Property Name="Text" Value="Singleplayer" />
    1212            <Property Name="Alpha" Value="0.8" />
     
    1616            <Property Name="VertFormatting" Value="TopAligned" />
    1717            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.6375,0}}" />
    18             <Window Type="TaharezLook/Listbox" Name="orxonox/SingleplayerLevelListbox" >
     18            <Window Type="MenuWidgets/Listbox" Name="orxonox/SingleplayerLevelListbox" >
    1919                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    2020                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" />
    2121            </Window>
    2222        </Window>
    23         <Window Type="TaharezLook/Button" Name="orxonox/SingleplayerStartButton" >
     23        <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerStartButton" >
    2424            <Property Name="Text" Value="Start" />
    2525            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     
    2727            <Event Name="Clicked" Function="SingleplayerMenu.SingleplayerStartButton_clicked"/>
    2828        </Window>
    29         <Window Type="TaharezLook/Button" Name="orxonox/SingleplayerBackButton" >
     29        <Window Type="MenuWidgets/Button" Name="orxonox/SingleplayerBackButton" >
    3030            <Property Name="Text" Value="Back" />
    3131            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
  • code/trunk/data/gui/schemes/OrxonoxGUIScheme.scheme

    r6711 r6746  
    33    <Imageset Name="MainMenuBackground" Filename="MainMenuBackground.imageset"/>
    44    <Imageset Name="PickupInventory" Filename="PickupInventory.imageset"/>
     5    <Font Name="BlueHighway-12" Filename="bluehighway-12.font" />
     6    <Font Name="BlueHighway-10" Filename="bluehighway-10.font" />
     7    <Font Name="BlueHighway-8"  Filename="bluehighway-8.font"  />
    58</GUIScheme>
  • code/trunk/data/gui/schemes/TaharezLook.scheme

    r5781 r6746  
    22<GUIScheme Name="TaharezLook">
    33        <Imageset Name="TaharezLook" Filename="TaharezLook.imageset" />
    4         <Font Name="Commonwealth-10" Filename="Commonwealth-10.font" />
    54        <LookNFeel Filename="TaharezLook.looknfeel" />
    65        <WindowRendererSet Filename="CEGUIFalagardWRBase" />
    7         <FalagardMapping WindowType="TaharezLook/Button"      TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="TaharezLook/Button" />
    8         <FalagardMapping WindowType="TaharezLook/Checkbox"    TargetType="CEGUI/Checkbox"    Renderer="Falagard/ToggleButton" LookNFeel="TaharezLook/Checkbox" />
    9         <FalagardMapping WindowType="TaharezLook/ImageButton" TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="TaharezLook/ImageButton" />
    10         <FalagardMapping WindowType="TaharezLook/RadioButton" TargetType="CEGUI/RadioButton" Renderer="Falagard/ToggleButton" LookNFeel="TaharezLook/RadioButton" />
    11         <FalagardMapping WindowType="TaharezLook/FrameWindow"  TargetType="CEGUI/FrameWindow" Renderer="Falagard/FrameWindow"  LookNFeel="TaharezLook/FrameWindow" />
    12         <FalagardMapping WindowType="TaharezLook/Titlebar"     TargetType="CEGUI/Titlebar"    Renderer="Falagard/Titlebar"     LookNFeel="TaharezLook/Titlebar" />
    13         <FalagardMapping WindowType="TaharezLook/SystemButton" TargetType="CEGUI/PushButton"  Renderer="Falagard/SystemButton" LookNFeel="TaharezLook/Button" />
    14         <FalagardMapping WindowType="TaharezLook/Editbox"          TargetType="CEGUI/Editbox"          Renderer="Falagard/Editbox"          LookNFeel="TaharezLook/Editbox" />
    15         <FalagardMapping WindowType="TaharezLook/MultiLineEditbox" TargetType="CEGUI/MultiLineEditbox" Renderer="Falagard/MultiLineEditbox" LookNFeel="TaharezLook/MultiLineEditbox" />
    16         <FalagardMapping WindowType="TaharezLook/Menubar"   TargetType="CEGUI/Menubar"   Renderer="Falagard/Menubar"   LookNFeel="TaharezLook/Menubar" />
    17         <FalagardMapping WindowType="TaharezLook/PopupMenu" TargetType="CEGUI/PopupMenu" Renderer="Falagard/PopupMenu" LookNFeel="TaharezLook/PopupMenu" />
    18         <FalagardMapping WindowType="TaharezLook/MenuItem"  TargetType="CEGUI/MenuItem"  Renderer="Falagard/MenuItem"  LookNFeel="TaharezLook/MenuItem" />
    19         <FalagardMapping WindowType="TaharezLook/AlternateProgressBar" TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="TaharezLook/AltProgressBar" />
    20         <FalagardMapping WindowType="TaharezLook/ProgressBar"          TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="TaharezLook/ProgressBar" />
    21         <FalagardMapping WindowType="TaharezLook/VUMeter"              TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="TaharezLook/VUMeter" />
    22         <FalagardMapping WindowType="TaharezLook/VerticalScrollbar"   TargetType="CEGUI/Scrollbar" Renderer="Falagard/Scrollbar" LookNFeel="TaharezLook/VerticalScrollbar" />
    23         <FalagardMapping WindowType="TaharezLook/HorizontalScrollbar" TargetType="CEGUI/Scrollbar" Renderer="Falagard/Scrollbar" LookNFeel="TaharezLook/HorizontalScrollbar" />
    24         <FalagardMapping WindowType="TaharezLook/VerticalScrollbarThumb"   TargetType="CEGUI/Thumb" Renderer="Falagard/Button" LookNFeel="TaharezLook/VerticalScrollbarThumb" />
    25         <FalagardMapping WindowType="TaharezLook/HorizontalScrollbarThumb" TargetType="CEGUI/Thumb" Renderer="Falagard/Button" LookNFeel="TaharezLook/HorizontalScrollbarThumb" />
    26         <FalagardMapping WindowType="TaharezLook/LargeVerticalScrollbar"      TargetType="CEGUI/Scrollbar" Renderer="Falagard/Scrollbar" LookNFeel="TaharezLook/LargeVerticalScrollbar" />
    27         <FalagardMapping WindowType="TaharezLook/LargeVerticalScrollbarThumb" TargetType="CEGUI/Thumb"     Renderer="Falagard/Button"    LookNFeel="TaharezLook/LargeVerticalScrollbarThumb" />
    28         <FalagardMapping WindowType="TaharezLook/TabButton"  TargetType="CEGUI/TabButton"  Renderer="Falagard/TabButton"  LookNFeel="TaharezLook/TabButton" />
    29         <FalagardMapping WindowType="TaharezLook/TabControl" TargetType="CEGUI/TabControl" Renderer="Falagard/TabControl" LookNFeel="TaharezLook/TabControl" />
    30         <FalagardMapping WindowType="TaharezLook/TabContentPane"    TargetType="DefaultWindow"    Renderer="Falagard/Default"    LookNFeel="TaharezLook/TabContentPane" />
    31         <FalagardMapping WindowType="TaharezLook/TabButtonPane"    TargetType="DefaultWindow"    Renderer="Falagard/Default"    LookNFeel="TaharezLook/TabButtonPane" />
    32         <FalagardMapping WindowType="TaharezLook/ComboDropList" TargetType="CEGUI/ComboDropList" Renderer="Falagard/Listbox" LookNFeel="TaharezLook/ComboDropList" />
    33         <FalagardMapping WindowType="TaharezLook/ComboEditbox"  TargetType="CEGUI/Editbox"       Renderer="Falagard/Editbox" LookNFeel="TaharezLook/ComboEditbox" />
    34         <FalagardMapping WindowType="TaharezLook/Combobox"      TargetType="CEGUI/Combobox"      Renderer="Falagard/Default" LookNFeel="TaharezLook/Combobox" />
    35         <FalagardMapping WindowType="TaharezLook/Listbox"           TargetType="CEGUI/Listbox"           Renderer="Falagard/Listbox"           LookNFeel="TaharezLook/Listbox" />
    36         <FalagardMapping WindowType="TaharezLook/ListHeader"        TargetType="CEGUI/ListHeader"        Renderer="Falagard/ListHeader"        LookNFeel="TaharezLook/ListHeader" />
    37         <FalagardMapping WindowType="TaharezLook/ListHeaderSegment" TargetType="CEGUI/ListHeaderSegment" Renderer="Falagard/ListHeaderSegment" LookNFeel="TaharezLook/ListHeaderSegment" />
    38         <FalagardMapping WindowType="TaharezLook/MultiColumnList"   TargetType="CEGUI/MultiColumnList"   Renderer="Falagard/MultiColumnList"   LookNFeel="TaharezLook/MultiColumnList" />
    39         <FalagardMapping WindowType="TaharezLook/Slider"      TargetType="CEGUI/Slider"      Renderer="Falagard/Slider"  LookNFeel="TaharezLook/Slider" />
    40         <FalagardMapping WindowType="TaharezLook/SliderThumb" TargetType="CEGUI/Thumb" Renderer="Falagard/Button"  LookNFeel="TaharezLook/SliderThumb" />
    41         <FalagardMapping WindowType="TaharezLook/ScrollablePane" TargetType="CEGUI/ScrollablePane" Renderer="Falagard/ScrollablePane" LookNFeel="TaharezLook/ScrollablePane" />
    42         <FalagardMapping WindowType="TaharezLook/Spinner" TargetType="CEGUI/Spinner" Renderer="Falagard/Default" LookNFeel="TaharezLook/Spinner" />
    43         <FalagardMapping WindowType="TaharezLook/Tooltip" TargetType="CEGUI/Tooltip" Renderer="Falagard/Tooltip" LookNFeel="TaharezLook/Tooltip" />
    44         <FalagardMapping WindowType="TaharezLook/StaticImage" TargetType="DefaultWindow" Renderer="Falagard/StaticImage" LookNFeel="TaharezLook/StaticImage" />
    45         <FalagardMapping WindowType="TaharezLook/StaticText"  TargetType="DefaultWindow" Renderer="Falagard/StaticText"  LookNFeel="TaharezLook/StaticText" />
    46         <FalagardMapping WindowType="TaharezLook/ItemListbox" TargetType="CEGUI/ItemListbox" Renderer="Falagard/ItemListbox" LookNFeel="TaharezLook/ItemListbox" />
    47         <FalagardMapping WindowType="TaharezLook/ListboxItem" TargetType="CEGUI/ItemEntry"   Renderer="Falagard/ItemEntry"   LookNFeel="TaharezLook/ListboxItem" />
    48         <FalagardMapping WindowType="TaharezLook/GroupBox" TargetType="CEGUI/GroupBox"   Renderer="Falagard/Default"   LookNFeel="TaharezLook/GroupBox" />
    49       <FalagardMapping WindowType="TaharezLook/Tree" TargetType="CEGUI/Tree"   Renderer="Falagard/Tree"   LookNFeel="TaharezLook/Tree" />
     6
     7    <!-- Standard widgets -->
     8    <FalagardMapping WindowType="TaharezLook/StaticImage"              TargetType="DefaultWindow"           Renderer="Falagard/StaticImage"       LookNFeel="TaharezLook/StaticImage" />
     9    <FalagardMapping WindowType="TaharezLook/StaticText"               TargetType="DefaultWindow"           Renderer="Falagard/StaticText"        LookNFeel="TaharezLook/StaticText" />
     10    <FalagardMapping WindowType="TaharezLook/TabButtonPane"            TargetType="DefaultWindow"           Renderer="Falagard/Default"           LookNFeel="TaharezLook/TabButtonPane" />
     11    <FalagardMapping WindowType="TaharezLook/TabContentPane"           TargetType="DefaultWindow"           Renderer="Falagard/Default"           LookNFeel="TaharezLook/TabContentPane" />
     12    <FalagardMapping WindowType="TaharezLook/Checkbox"                 TargetType="CEGUI/Checkbox"          Renderer="Falagard/ToggleButton"      LookNFeel="TaharezLook/Checkbox" />
     13    <FalagardMapping WindowType="TaharezLook/Combobox"                 TargetType="CEGUI/Combobox"          Renderer="Falagard/Default"           LookNFeel="TaharezLook/Combobox" />
     14    <FalagardMapping WindowType="TaharezLook/ComboDropList"            TargetType="CEGUI/ComboDropList"     Renderer="Falagard/Listbox"           LookNFeel="TaharezLook/ComboDropList" />
     15    <FalagardMapping WindowType="TaharezLook/ComboEditbox"             TargetType="CEGUI/Editbox"           Renderer="Falagard/Editbox"           LookNFeel="TaharezLook/ComboEditbox" />
     16    <FalagardMapping WindowType="TaharezLook/Editbox"                  TargetType="CEGUI/Editbox"           Renderer="Falagard/Editbox"           LookNFeel="TaharezLook/Editbox" />
     17    <FalagardMapping WindowType="TaharezLook/FrameWindow"              TargetType="CEGUI/FrameWindow"       Renderer="Falagard/FrameWindow"       LookNFeel="TaharezLook/FrameWindow" />
     18    <FalagardMapping WindowType="TaharezLook/GroupBox"                 TargetType="CEGUI/GroupBox"          Renderer="Falagard/Default"           LookNFeel="TaharezLook/GroupBox" />
     19    <FalagardMapping WindowType="TaharezLook/ItemListbox"              TargetType="CEGUI/ItemListbox"       Renderer="Falagard/ItemListbox"       LookNFeel="TaharezLook/ItemListbox" />
     20    <FalagardMapping WindowType="TaharezLook/ListboxItem"              TargetType="CEGUI/ItemEntry"         Renderer="Falagard/ItemEntry"         LookNFeel="TaharezLook/ListboxItem" />
     21    <FalagardMapping WindowType="TaharezLook/Listbox"                  TargetType="CEGUI/Listbox"           Renderer="Falagard/Listbox"           LookNFeel="TaharezLook/Listbox" />
     22    <FalagardMapping WindowType="TaharezLook/ListHeader"               TargetType="CEGUI/ListHeader"        Renderer="Falagard/ListHeader"        LookNFeel="TaharezLook/ListHeader" />
     23    <FalagardMapping WindowType="TaharezLook/ListHeaderSegment"        TargetType="CEGUI/ListHeaderSegment" Renderer="Falagard/ListHeaderSegment" LookNFeel="TaharezLook/ListHeaderSegment" />
     24    <FalagardMapping WindowType="TaharezLook/MultiLineEditbox"         TargetType="CEGUI/MultiLineEditbox"  Renderer="Falagard/MultiLineEditbox"  LookNFeel="TaharezLook/MultiLineEditbox" />
     25    <FalagardMapping WindowType="TaharezLook/Menubar"                  TargetType="CEGUI/Menubar"           Renderer="Falagard/Menubar"           LookNFeel="TaharezLook/Menubar" />
     26    <FalagardMapping WindowType="TaharezLook/MenuItem"                 TargetType="CEGUI/MenuItem"          Renderer="Falagard/MenuItem"          LookNFeel="TaharezLook/MenuItem" />
     27    <FalagardMapping WindowType="TaharezLook/MultiColumnList"          TargetType="CEGUI/MultiColumnList"   Renderer="Falagard/MultiColumnList"   LookNFeel="TaharezLook/MultiColumnList" />
     28    <FalagardMapping WindowType="TaharezLook/PopupMenu"                TargetType="CEGUI/PopupMenu"         Renderer="Falagard/PopupMenu"         LookNFeel="TaharezLook/PopupMenu" />
     29    <FalagardMapping WindowType="TaharezLook/ProgressBar"              TargetType="CEGUI/ProgressBar"       Renderer="Falagard/ProgressBar"       LookNFeel="TaharezLook/ProgressBar" />
     30    <FalagardMapping WindowType="TaharezLook/Button"                   TargetType="CEGUI/PushButton"        Renderer="Falagard/Button"            LookNFeel="TaharezLook/Button" />
     31    <FalagardMapping WindowType="TaharezLook/ImageButton"              TargetType="CEGUI/PushButton"        Renderer="Falagard/Button"            LookNFeel="TaharezLook/ImageButton" />
     32    <FalagardMapping WindowType="TaharezLook/RadioButton"              TargetType="CEGUI/RadioButton"       Renderer="Falagard/ToggleButton"      LookNFeel="TaharezLook/RadioButton" />
     33    <FalagardMapping WindowType="TaharezLook/SystemButton"             TargetType="CEGUI/PushButton"        Renderer="Falagard/SystemButton"      LookNFeel="TaharezLook/Button" />
     34    <FalagardMapping WindowType="TaharezLook/ScrollablePane"           TargetType="CEGUI/ScrollablePane"    Renderer="Falagard/ScrollablePane"    LookNFeel="TaharezLook/ScrollablePane" />
     35    <FalagardMapping WindowType="TaharezLook/HorizontalScrollbar"      TargetType="CEGUI/Scrollbar"         Renderer="Falagard/Scrollbar"         LookNFeel="TaharezLook/HorizontalScrollbar" />
     36    <FalagardMapping WindowType="TaharezLook/VerticalScrollbar"        TargetType="CEGUI/Scrollbar"         Renderer="Falagard/Scrollbar"         LookNFeel="TaharezLook/VerticalScrollbar" />
     37    <FalagardMapping WindowType="TaharezLook/Slider"                   TargetType="CEGUI/Slider"            Renderer="Falagard/Slider"            LookNFeel="TaharezLook/Slider" />
     38    <FalagardMapping WindowType="TaharezLook/Spinner"                  TargetType="CEGUI/Spinner"           Renderer="Falagard/Default"           LookNFeel="TaharezLook/Spinner" />
     39    <FalagardMapping WindowType="TaharezLook/TabButton"                TargetType="CEGUI/TabButton"         Renderer="Falagard/TabButton"         LookNFeel="TaharezLook/TabButton" />
     40    <FalagardMapping WindowType="TaharezLook/TabControl"               TargetType="CEGUI/TabControl"        Renderer="Falagard/TabControl"        LookNFeel="TaharezLook/TabControl" />
     41    <FalagardMapping WindowType="TaharezLook/HorizontalScrollbarThumb" TargetType="CEGUI/Thumb"             Renderer="Falagard/Button"            LookNFeel="TaharezLook/HorizontalScrollbarThumb" />
     42    <FalagardMapping WindowType="TaharezLook/SliderThumb"              TargetType="CEGUI/Thumb"             Renderer="Falagard/Button"            LookNFeel="TaharezLook/SliderThumb" />
     43    <FalagardMapping WindowType="TaharezLook/VerticalScrollbarThumb"   TargetType="CEGUI/Thumb"             Renderer="Falagard/Button"            LookNFeel="TaharezLook/VerticalScrollbarThumb" />
     44    <FalagardMapping WindowType="TaharezLook/Titlebar"                 TargetType="CEGUI/Titlebar"          Renderer="Falagard/Titlebar"          LookNFeel="TaharezLook/Titlebar" />
     45    <FalagardMapping WindowType="TaharezLook/Tooltip"                  TargetType="CEGUI/Tooltip"           Renderer="Falagard/Tooltip"           LookNFeel="TaharezLook/Tooltip" />
     46    <FalagardMapping WindowType="TaharezLook/Tree"                     TargetType="CEGUI/Tree"              Renderer="Falagard/Tree"              LookNFeel="TaharezLook/Tree" />
     47   
     48    <!-- Additional widgets -->
     49    <FalagardMapping WindowType="TaharezLook/AlternateProgressBar"        TargetType="CEGUI/ProgressBar"       Renderer="Falagard/ProgressBar"       LookNFeel="TaharezLook/AltProgressBar" />
     50    <FalagardMapping WindowType="TaharezLook/VUMeter"                     TargetType="CEGUI/ProgressBar"       Renderer="Falagard/ProgressBar"       LookNFeel="TaharezLook/VUMeter" />
     51    <FalagardMapping WindowType="TaharezLook/LargeVerticalScrollbar"      TargetType="CEGUI/Scrollbar"         Renderer="Falagard/Scrollbar"         LookNFeel="TaharezLook/LargeVerticalScrollbar" />
     52    <FalagardMapping WindowType="TaharezLook/LargeVerticalScrollbarThumb" TargetType="CEGUI/Thumb"             Renderer="Falagard/Button"            LookNFeel="TaharezLook/LargeVerticalScrollbarThumb" />
    5053</GUIScheme>
  • code/trunk/data/gui/schemes/WindowsLook.scheme

    r5781 r6746  
    11<?xml version="1.0" ?>
    2 <GUIScheme Name="WindowsLookSkin">
    3         <Imageset Name="WindowsLook" Filename="WindowsLook.imageset" />
    4         <LookNFeel Filename="WindowsLook.looknfeel" />
    5         <WindowSet Filename="CEGUIFalagardWRBase" />
    6         <FalagardMapping WindowType="WindowsLook/Button"      TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="WindowsLook/Button" />
    7         <FalagardMapping WindowType="WindowsLook/Checkbox"    TargetType="CEGUI/Checkbox"    Renderer="Falagard/ToggleButton" LookNFeel="WindowsLook/Checkbox" />
    8         <FalagardMapping WindowType="WindowsLook/IconButton"  TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="WindowsLook/IconButton" />
    9         <FalagardMapping WindowType="WindowsLook/RadioButton" TargetType="CEGUI/RadioButton" Renderer="Falagard/ToggleButton" LookNFeel="WindowsLook/RadioButton" />
    10         <FalagardMapping WindowType="WindowsLook/FrameWindow"  TargetType="CEGUI/FrameWindow" Renderer="Falagard/FrameWindow"  LookNFeel="WindowsLook/FrameWindow" />
    11         <FalagardMapping WindowType="WindowsLook/Titlebar"     TargetType="CEGUI/Titlebar"    Renderer="Falagard/Titlebar"     LookNFeel="WindowsLook/Titlebar" />
    12         <FalagardMapping WindowType="WindowsLook/SystemButton" TargetType="CEGUI/PushButton"  Renderer="Falagard/SystemButton" LookNFeel="WindowsLook/SystemButton" />
    13         <FalagardMapping WindowType="WindowsLook/Editbox"          TargetType="CEGUI/Editbox"          Renderer="Falagard/Editbox"          LookNFeel="WindowsLook/Editbox" />
    14         <FalagardMapping WindowType="WindowsLook/MultiLineEditbox" TargetType="CEGUI/MultiLineEditbox" Renderer="Falagard/MultiLineEditbox" LookNFeel="WindowsLook/MultiLineEditbox" />
    15         <FalagardMapping WindowType="WindowsLook/Menubar"   TargetType="CEGUI/Menubar"   Renderer="Falagard/Menubar"   LookNFeel="WindowsLook/Menubar" />
    16         <FalagardMapping WindowType="WindowsLook/PopupMenu" TargetType="CEGUI/PopupMenu" Renderer="Falagard/PopupMenu" LookNFeel="WindowsLook/PopupMenu" />
    17         <FalagardMapping WindowType="WindowsLook/MenuItem"  TargetType="CEGUI/MenuItem"  Renderer="Falagard/MenuItem"  LookNFeel="WindowsLook/MenuItem" />
    18         <FalagardMapping WindowType="WindowsLook/ProgressBar"          TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="WindowsLook/ProgressBar" />
    19         <FalagardMapping WindowType="WindowsLook/VerticalScrollbar"   TargetType="CEGUI/Scrollbar" Renderer="Falagard/Scrollbar" LookNFeel="WindowsLook/VerticalScrollbar" />
    20         <FalagardMapping WindowType="WindowsLook/HorizontalScrollbar" TargetType="CEGUI/Scrollbar" Renderer="Falagard/Scrollbar" LookNFeel="WindowsLook/HorizontalScrollbar" />
    21         <FalagardMapping WindowType="WindowsLook/VerticalScrollbarThumb"   TargetType="CEGUI/Thumb" Renderer="Falagard/Button" LookNFeel="WindowsLook/VerticalScrollbarThumb" />
    22         <FalagardMapping WindowType="WindowsLook/HorizontalScrollbarThumb" TargetType="CEGUI/Thumb" Renderer="Falagard/Button" LookNFeel="WindowsLook/HorizontalScrollbarThumb" />
    23         <FalagardMapping WindowType="WindowsLook/TabButton"  TargetType="CEGUI/TabButton"  Renderer="Falagard/TabButton"  LookNFeel="WindowsLook/TabButton" />
    24         <FalagardMapping WindowType="WindowsLook/TabControl" TargetType="CEGUI/TabControl" Renderer="Falagard/TabControl" LookNFeel="WindowsLook/TabControl" />
    25         <FalagardMapping WindowType="WindowsLook/TabContentPane"    TargetType="DefaultWindow"    Renderer="Falagard/Default"    LookNFeel="WindowsLook/TabContentPane" />
    26         <FalagardMapping WindowType="WindowsLook/TabButtonPane"    TargetType="DefaultWindow"    Renderer="Falagard/Default"    LookNFeel="WindowsLook/TabButtonPane" />
    27         <FalagardMapping WindowType="WindowsLook/ComboDropList" TargetType="CEGUI/ComboDropList" Renderer="Falagard/Listbox" LookNFeel="WindowsLook/ComboDropList" />
    28         <FalagardMapping WindowType="WindowsLook/Combobox"      TargetType="CEGUI/Combobox"      Renderer="Falagard/Default" LookNFeel="WindowsLook/Combobox" />
    29         <FalagardMapping WindowType="WindowsLook/Listbox"           TargetType="CEGUI/Listbox"           Renderer="Falagard/Listbox"           LookNFeel="WindowsLook/Listbox" />
    30         <FalagardMapping WindowType="WindowsLook/ListHeader"        TargetType="CEGUI/ListHeader"        Renderer="Falagard/ListHeader"        LookNFeel="WindowsLook/ListHeader" />
    31         <FalagardMapping WindowType="WindowsLook/ListHeaderSegment" TargetType="CEGUI/ListHeaderSegment" Renderer="Falagard/ListHeaderSegment" LookNFeel="WindowsLook/ListHeaderSegment" />
    32         <FalagardMapping WindowType="WindowsLook/MultiColumnList"   TargetType="CEGUI/MultiColumnList"   Renderer="Falagard/MultiColumnList"   LookNFeel="WindowsLook/MultiColumnList" />
    33         <FalagardMapping WindowType="WindowsLook/Slider"      TargetType="CEGUI/Slider" Renderer="Falagard/Slider"  LookNFeel="WindowsLook/Slider" />
    34         <FalagardMapping WindowType="WindowsLook/SliderThumb" TargetType="CEGUI/Thumb"  Renderer="Falagard/Button"  LookNFeel="WindowsLook/SliderThumb" />
    35         <FalagardMapping WindowType="WindowsLook/ScrollablePane" TargetType="CEGUI/ScrollablePane" Renderer="Falagard/ScrollablePane" LookNFeel="WindowsLook/ScrollablePane" />
    36         <FalagardMapping WindowType="WindowsLook/Spinner" TargetType="CEGUI/Spinner" Renderer="Falagard/Default" LookNFeel="WindowsLook/Spinner" />
    37         <FalagardMapping WindowType="WindowsLook/Tooltip" TargetType="CEGUI/Tooltip" Renderer="Falagard/Tooltip" LookNFeel="WindowsLook/Tooltip" />
    38         <FalagardMapping WindowType="WindowsLook/Static"      TargetType="DefaultWindow" Renderer="Falagard/Static"      LookNFeel="WindowsLook/Static" />
    39         <FalagardMapping WindowType="WindowsLook/StaticImage" TargetType="DefaultWindow" Renderer="Falagard/StaticImage" LookNFeel="WindowsLook/StaticImage" />
    40         <FalagardMapping WindowType="WindowsLook/StaticText"  TargetType="DefaultWindow" Renderer="Falagard/StaticText"  LookNFeel="WindowsLook/StaticText" />
    41         <FalagardMapping WindowType="WindowsLook/ItemListbox" TargetType="CEGUI/ItemListbox" Renderer="Falagard/ItemListbox" LookNFeel="WindowsLook/ItemListbox" />
    42         <FalagardMapping WindowType="WindowsLook/ListboxItem" TargetType="CEGUI/ItemEntry"   Renderer="Falagard/ItemEntry"   LookNFeel="WindowsLook/ListboxItem" />
    43         <FalagardMapping WindowType="WindowsLook/GroupBox" TargetType="CEGUI/GroupBox"   Renderer="Falagard/Default"   LookNFeel="WindowsLook/GroupBox" />
     2<GUIScheme Name="WindowsLook">
     3    <Imageset Name="WindowsLook" Filename="WindowsLook.imageset" />
     4    <Imageset Name="TaharezLook" Filename="TaharezLook.imageset" />
     5    <LookNFeel Filename="WindowsLook.looknfeel" />
     6    <LookNFeel Filename="TaharezLook.looknfeel" />
     7    <WindowRendererSet Filename="CEGUIFalagardWRBase" />
     8
     9    <!-- Standard widgets -->
     10    <FalagardMapping WindowType="WindowsLook/StaticImage"                 TargetType="DefaultWindow"           Renderer="Falagard/StaticImage"       LookNFeel="WindowsLook/StaticImage" />
     11    <FalagardMapping WindowType="WindowsLook/StaticText"                  TargetType="DefaultWindow"           Renderer="Falagard/StaticText"        LookNFeel="WindowsLook/StaticText" />
     12    <FalagardMapping WindowType="WindowsLook/TabButtonPane"               TargetType="DefaultWindow"           Renderer="Falagard/Default"           LookNFeel="WindowsLook/TabButtonPane" />
     13    <FalagardMapping WindowType="WindowsLook/TabContentPane"              TargetType="DefaultWindow"           Renderer="Falagard/Default"           LookNFeel="WindowsLook/TabContentPane" />
     14    <FalagardMapping WindowType="WindowsLook/Checkbox"                    TargetType="CEGUI/Checkbox"          Renderer="Falagard/ToggleButton"      LookNFeel="WindowsLook/Checkbox" />
     15    <FalagardMapping WindowType="WindowsLook/Combobox"                    TargetType="CEGUI/Combobox"          Renderer="Falagard/Default"           LookNFeel="WindowsLook/Combobox" />
     16    <FalagardMapping WindowType="WindowsLook/ComboDropList"               TargetType="CEGUI/ComboDropList"     Renderer="Falagard/Listbox"           LookNFeel="WindowsLook/ComboDropList" />
     17    <FalagardMapping WindowType="WindowsLook/Editbox"                     TargetType="CEGUI/Editbox"           Renderer="Falagard/Editbox"           LookNFeel="WindowsLook/Editbox" />
     18    <FalagardMapping WindowType="WindowsLook/FrameWindow"                 TargetType="CEGUI/FrameWindow"       Renderer="Falagard/FrameWindow"       LookNFeel="WindowsLook/FrameWindow" />
     19    <FalagardMapping WindowType="WindowsLook/GroupBox"                    TargetType="CEGUI/GroupBox"          Renderer="Falagard/Default"           LookNFeel="WindowsLook/GroupBox" />
     20    <FalagardMapping WindowType="WindowsLook/ItemListbox"                 TargetType="CEGUI/ItemListbox"       Renderer="Falagard/ItemListbox"       LookNFeel="WindowsLook/ItemListbox" />
     21    <FalagardMapping WindowType="WindowsLook/ListboxItem"                 TargetType="CEGUI/ItemEntry"         Renderer="Falagard/ItemEntry"         LookNFeel="WindowsLook/ListboxItem" />
     22    <FalagardMapping WindowType="WindowsLook/Listbox"                     TargetType="CEGUI/Listbox"           Renderer="Falagard/Listbox"           LookNFeel="WindowsLook/Listbox" />
     23    <FalagardMapping WindowType="WindowsLook/ListHeader"                  TargetType="CEGUI/ListHeader"        Renderer="Falagard/ListHeader"        LookNFeel="WindowsLook/ListHeader" />
     24    <FalagardMapping WindowType="WindowsLook/ListHeaderSegment"           TargetType="CEGUI/ListHeaderSegment" Renderer="Falagard/ListHeaderSegment" LookNFeel="WindowsLook/ListHeaderSegment" />
     25    <FalagardMapping WindowType="WindowsLook/MultiLineEditbox"            TargetType="CEGUI/MultiLineEditbox"  Renderer="Falagard/MultiLineEditbox"  LookNFeel="WindowsLook/MultiLineEditbox" />
     26    <FalagardMapping WindowType="WindowsLook/Menubar"                     TargetType="CEGUI/Menubar"           Renderer="Falagard/Menubar"           LookNFeel="WindowsLook/Menubar" />
     27    <FalagardMapping WindowType="WindowsLook/MenuItem"                    TargetType="CEGUI/MenuItem"          Renderer="Falagard/MenuItem"          LookNFeel="WindowsLook/MenuItem" />
     28    <FalagardMapping WindowType="WindowsLook/MultiColumnList"             TargetType="CEGUI/MultiColumnList"   Renderer="Falagard/MultiColumnList"   LookNFeel="WindowsLook/MultiColumnList" />
     29    <FalagardMapping WindowType="WindowsLook/PopupMenu"                   TargetType="CEGUI/PopupMenu"         Renderer="Falagard/PopupMenu"         LookNFeel="WindowsLook/PopupMenu" />
     30    <FalagardMapping WindowType="WindowsLook/ProgressBar"                 TargetType="CEGUI/ProgressBar"       Renderer="Falagard/ProgressBar"       LookNFeel="WindowsLook/ProgressBar" />
     31    <FalagardMapping WindowType="WindowsLook/Button"                      TargetType="CEGUI/PushButton"        Renderer="Falagard/Button"            LookNFeel="WindowsLook/Button" />
     32    <FalagardMapping WindowType="WindowsLook/RadioButton"                 TargetType="CEGUI/RadioButton"       Renderer="Falagard/ToggleButton"      LookNFeel="WindowsLook/RadioButton" />
     33    <FalagardMapping WindowType="WindowsLook/SystemButton"                TargetType="CEGUI/PushButton"        Renderer="Falagard/SystemButton"      LookNFeel="WindowsLook/Button" />
     34    <FalagardMapping WindowType="WindowsLook/ScrollablePane"              TargetType="CEGUI/ScrollablePane"    Renderer="Falagard/ScrollablePane"    LookNFeel="WindowsLook/ScrollablePane" />
     35    <FalagardMapping WindowType="WindowsLook/HorizontalScrollbar"         TargetType="CEGUI/Scrollbar"         Renderer="Falagard/Scrollbar"         LookNFeel="WindowsLook/HorizontalScrollbar" />
     36    <FalagardMapping WindowType="WindowsLook/VerticalScrollbar"           TargetType="CEGUI/Scrollbar"         Renderer="Falagard/Scrollbar"         LookNFeel="WindowsLook/VerticalScrollbar" />
     37    <FalagardMapping WindowType="WindowsLook/Slider"                      TargetType="CEGUI/Slider"            Renderer="Falagard/Slider"            LookNFeel="WindowsLook/Slider" />
     38    <FalagardMapping WindowType="WindowsLook/Spinner"                     TargetType="CEGUI/Spinner"           Renderer="Falagard/Default"           LookNFeel="WindowsLook/Spinner" />
     39    <FalagardMapping WindowType="WindowsLook/TabButton"                   TargetType="CEGUI/TabButton"         Renderer="Falagard/TabButton"         LookNFeel="WindowsLook/TabButton" />
     40    <FalagardMapping WindowType="WindowsLook/TabControl"                  TargetType="CEGUI/TabControl"        Renderer="Falagard/TabControl"        LookNFeel="WindowsLook/TabControl" />
     41    <FalagardMapping WindowType="WindowsLook/HorizontalScrollbarThumb"    TargetType="CEGUI/Thumb"             Renderer="Falagard/Button"            LookNFeel="WindowsLook/HorizontalScrollbarThumb" />
     42    <FalagardMapping WindowType="WindowsLook/SliderThumb"                 TargetType="CEGUI/Thumb"             Renderer="Falagard/Button"            LookNFeel="WindowsLook/SliderThumb" />
     43    <FalagardMapping WindowType="WindowsLook/VerticalScrollbarThumb"      TargetType="CEGUI/Thumb"             Renderer="Falagard/Button"            LookNFeel="WindowsLook/VerticalScrollbarThumb" />
     44    <FalagardMapping WindowType="WindowsLook/Titlebar"                    TargetType="CEGUI/Titlebar"          Renderer="Falagard/Titlebar"          LookNFeel="WindowsLook/Titlebar" />
     45    <FalagardMapping WindowType="WindowsLook/Tooltip"                     TargetType="CEGUI/Tooltip"           Renderer="Falagard/Tooltip"           LookNFeel="WindowsLook/Tooltip" />
     46   
     47    <!-- Missing widgets (using Taharez LookNFeel) -->
     48    <FalagardMapping WindowType="WindowsLook/ComboEditbox"                TargetType="CEGUI/Editbox"           Renderer="Falagard/Editbox"           LookNFeel="TaharezLook/ComboEditbox" />
     49    <FalagardMapping WindowType="WindowsLook/ImageButton"                 TargetType="CEGUI/PushButton"        Renderer="Falagard/Button"            LookNFeel="TaharezLook/ImageButton" />
     50    <FalagardMapping WindowType="WindowsLook/Tree"                        TargetType="CEGUI/Tree"              Renderer="Falagard/Tree"              LookNFeel="TaharezLook/Tree" />
     51
     52    <!-- Additional widgets -->
     53    <FalagardMapping WindowType="WindowsLook/IconButton"                  TargetType="CEGUI/PushButton"        Renderer="Falagard/Button"            LookNFeel="WindowsLook/IconButton" />
     54    <FalagardMapping WindowType="WindowsLook/Static"                      TargetType="DefaultWindow"           Renderer="Falagard/Static"            LookNFeel="WindowsLook/Static" />
    4455</GUIScheme>
  • code/trunk/data/gui/scripts/AudioMenu.lua

    r6417 r6746  
    11-- AudioMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     AudioMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
     3local P = createMenuSheet("AudioMenu")
    104
    11 P.filename = "AudioMenu"
    12 P.layoutString = "AudioMenu.layout"
    13 
    14 function P:init()
     5function P.onLoad()
    156    soundMgr = orxonox.SoundManager:getInstance()
    167    block = false
     
    4334    for k,v in pairs(themeList) do
    4435        item = CEGUI.createListboxTextItem(v)
    45         item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
     36        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
    4637        CEGUI.toListbox(listboxwindow):addItem(item)
    4738    end
     
    178169
    179170function P.AudioBackButton_clicked(e)
    180     hideGUI(P.filename)
     171    hideMenuSheet(P.name)
    181172end
    182173
  • code/trunk/data/gui/scripts/ControlsMenu.lua

    r6417 r6746  
    11-- ControlsMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     ControlsMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
    10 
    11 P.filename = "ControlsMenu"
    12 P.layoutString = "ControlsMenu.layout"
     3local P = createMenuSheet("ControlsMenu")
    134
    145function P.ControlsMouseControlsButton_clicked(e)
    15     showGUI("MouseControlsMenu", true)
     6    showMenuSheet("MouseControlsMenu", true)
    167end
    178
    189function P.ControlsKeyboardControlsButton_clicked(e)
    19     showGUI("KeyBindMenu", true)
     10    showMenuSheet("KeyBindMenu", true)
    2011end
    2112
    2213function P.ControlsBackButton_clicked(e)
    23     hideGUI(P.filename)
     14    hideMenuSheet(P.name)
    2415end
    2516
  • code/trunk/data/gui/scripts/CreditsMenu.lua

    r6417 r6746  
    11-- CreditsMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     CreditsMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
    10 
    11 P.filename = "CreditsMenu"
    12 P.layoutString = "CreditsMenu.layout"
     3local P = createMenuSheet("CreditsMenu")
    134
    145function P.CreditsBackButton_clicked(e)
    15     hideGUI(P.filename)
     6    hideMenuSheet(P.name)
    167end
    178
  • code/trunk/data/gui/scripts/DecisionPopup.lua

    r6417 r6746  
    11-- DecisionPopup.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     DecisionPopup = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
    10 
    11 P.filename = "DecisionPopup"
    12 P.layoutString = "DecisionPopup.layout"
    13 
    14 function P:init()
    15 end
     3local P = createMenuSheet("DecisionPopup")
    164
    175function P.setCallback(functionPtr)
     
    2816        P.functionPtr(true)
    2917    end
    30     hideGUI("DecisionPopup")
     18    hideMenuSheet("DecisionPopup")
    3119end
    3220
     
    3523        P.functionPtr(false)
    3624    end
    37     hideGUI("DecisionPopup")
     25    hideMenuSheet("DecisionPopup")
    3826end
    3927
  • code/trunk/data/gui/scripts/GUITools.lua

    r6417 r6746  
     1-- Returns a new menu sheet
     2-- See MenuSheet.new for details about the parameters
     3function createMenuSheet(name, bHidePrevious, tShowCursor, tUseKeyboard, bBlockJoyStick)
     4    local sheet = require("MenuSheet").new(name, bHidePrevious, tShowCursor, tUseKeyboard, bBlockJoyStick)
     5    _G[sheet.name] = sheet -- Global access required because of the event handlers
     6    return sheet
     7end
     8
     9-- Returns a new HUD sheet
     10function createHUDSheet(name)
     11    local sheet = require("HUDSheet").new(name)
     12    _G[sheet.name] = sheet -- Global access required because of the event handlers
     13    return sheet
     14end
     15
    116function openDecisionPopup( text, callbackPtr )
    2     showGUI("DecisionPopup", false, true)
     17    showMenuSheet("DecisionPopup", false, true)
    318    DecisionPopup.setCallback(callbackPtr)
    419    DecisionPopup.setText(text)
     
    621
    722function openInfoPopup(text, functionPtr, closeButton, arguments)
    8     showGUI("InfoPopup", false, true)
     23    showMenuSheet("InfoPopup", false, true)
    924    InfoPopup.execute(functionPtr, arguments)
    1025    InfoPopup.setText(text)
  • code/trunk/data/gui/scripts/GameplayMenu.lua

    r6417 r6746  
    11-- GameplayMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     GameplayMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
     3local P = createMenuSheet("GameplayMenu")
    104
    11 P.filename = "GameplayMenu"
    12 P.layoutString = "GameplayMenu.layout"
    13 
    14 function P:init()
     5function P.onLoad()
    156    dropdown = winMgr:getWindow("orxonox/ThemeCombobox")
    167    local themeList = {}
     
    2011    for k,v in pairs(themeList) do
    2112        item = CEGUI.createListboxTextItem(v)
    22         item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
     13        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
    2314        CEGUI.toCombobox(dropdown):addItem(item)
    2415    end
     
    2718function P.GameplayThemeCombobox_changed(e)
    2819    -- theme
    29     debug("event: theme")
     20    logMessage(0, "event: theme")
    3021end
    3122
    3223function P.GameplayDifficultyEasyButton_clicked(e)
    3324    -- difficulty easy
    34     debug("event: easy")
     25    logMessage(0, "event: easy")
    3526end
    3627
    3728function P.GameplayDifficultyNormalButton_clicked(e)
    3829    -- difficulty normal
    39     debug("event: normal")
     30    logMessage(0, "event: normal")
    4031end
    4132
    4233function P.GameplayDifficultyHardButton_clicked(e)
    4334    -- difficulty hard
    44     debug("event: hard")
     35    logMessage(0, "event: hard")
    4536end
    4637
    4738function P.GameplayBackButton_clicked(e)
    48     hideGUI(P.filename)
     39    hideMenuSheet(P.name)
    4940end
    5041
  • code/trunk/data/gui/scripts/GraphicsMenu.lua

    r6417 r6746  
    11-- GraphicsMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     GraphicsMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
     3local P = createMenuSheet("GraphicsMenu")
    104
    11 P.filename = "GraphicsMenu"
    12 P.layoutString = "GraphicsMenu.layout"
    13 
    14 function P:init()
     5function P.onLoad()
    156    block = true
    167    file = orxonox.PathConfig:getConfigPathString() .. orxonox.getConfig("GraphicsManager", "ogreConfigFile_")
     
    6253    for k,v in pairs(resolutionList) do
    6354        item = CEGUI.createListboxTextItem(v)
    64         item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
     55        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
    6556        CEGUI.toListbox(listboxwindow):addItem(item)
    6657    end
     
    152143    if scrollbar_active == false then
    153144        -- brightness
    154         debug("event: brightness")
     145        logMessage(0, "event: brightness")
    155146    end
    156147end
     
    162153function P.GraphicsBrightnessScrollbar_ended(e)
    163154    -- brightness
    164     debug("event: brightness")
     155    logMessage(0, "event: brightness")
    165156    scrollbar_active = false
    166157end
     
    201192
    202193function P.GraphicsBackButton_clicked(e)
    203     hideGUI(P.filename)
     194    hideMenuSheet(P.name)
    204195end
    205196
  • code/trunk/data/gui/scripts/InGameMenu.lua

    r6417 r6746  
    11-- InGameMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     InGameMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
    10 
    11 P.filename = "InGameMenu"
    12 P.layoutString = "InGameMenu.layout"
    13 
    14 function P:init()
    15 end
    16 
     3local P = createMenuSheet("InGameMenu")
    174
    185-- events for ingamemenu
     
    2512    orxonox.Game:getInstance():popState()
    2613    orxonox.Game:getInstance():requestState("mainmenu")
    27     hideGUI("InGameMenu")
     14    hideMenuSheet("InGameMenu")
    2815end
    2916
    3017function P.button_settings_clicked(e)
    31     showGUI("SettingsMenu", true)
     18    showMenuSheet("SettingsMenu", true)
    3219end
    3320
    3421function P.button_return_clicked(e)
    35     hideGUI("InGameMenu")
     22    hideMenuSheet("InGameMenu")
    3623end
    3724
    3825function P.callback(doExit)
    3926    if doExit then
    40         hideGUI("InGameMenu")
     27        hideMenuSheet("InGameMenu")
    4128        orxonox.execute("exit")
    4229    end
  • code/trunk/data/gui/scripts/InfoPopup.lua

    r6417 r6746  
    11-- InfoPopup.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 
    6 if _REQUIREDNAME == nil then
    7     InfoPopup = P
    8 else
    9     _G[_REQUIREDNAME] = P
    10 end
    11 
    12 P.filename = "InfoPopup"
    13 P.layoutString = "InfoPopup.layout"
    14 
    15 function P:init()
    16 end
     3local P = createMenuSheet("InfoPopup")
    174
    185function P.execute(functionPtr, arguments)
     
    2613end
    2714
    28 function P.setText( text )
     15function P.setText(text)
    2916    winMgr:getWindow("orxonox/InfoPopup_text"):setText( text )
    3017end
     
    4229-- events for ingamemenu
    4330function P.close(e)
    44     hideGUI("InfoPopup")
     31    hideMenuSheet(P.name)
    4532end
    4633
  • code/trunk/data/gui/scripts/InitialiseGUI.lua

    r6711 r6746  
    1 local schemeMgr = CEGUI.SchemeManager:getSingleton()
    2 winMgr = CEGUI.WindowManager:getSingleton()
    3 local logger = CEGUI.Logger:getSingleton()
    4 local system = CEGUI.System:getSingleton()
    5 local cursor = CEGUI.MouseCursor:getSingleton()
     1-- Define some global shortcuts for common Managers
     2guiMgr    = orxonox.GUIManager:getInstance()
     3inputMgr  = orxonox.InputManager:getInstance()
     4schemeMgr = CEGUI.SchemeManager:getSingleton()
     5winMgr    = CEGUI.WindowManager:getSingleton()
    66
    7 schemeMgr:loadScheme("TaharezLookSkin.scheme")
    8 -- load scheme with our own images
     7-- Load all required skins
     8schemeMgr:loadScheme("TaharezGreenLook.scheme")
     9--schemeMgr:loadScheme("TaharezLook.scheme")
     10--schemeMgr:loadScheme("WindowsLook.scheme")
     11--schemeMgr:loadScheme("VanillaLook.scheme")
     12--schemeMgr:loadScheme("SleekSpaceLook.scheme")
     13
     14-- Connect skin specific window types with our own window types
     15-- By loading a different file (if there is) you can change the skin
     16-- of the menus or the HUD independently
     17schemeMgr:loadScheme("TaharezGreenMenuWidgets.scheme")
     18menuImageSet = "TaharezGreenLook"
     19schemeMgr:loadScheme("TaharezGreenHUDWidgets.scheme")
     20hudImageSet = "TaharezGreenLook"
     21
     22-- Just a remaining test hack
    923schemeMgr:loadScheme("OrxonoxGUIScheme.scheme")
    1024
    11 system:setDefaultMouseCursor("TaharezLook", "MouseArrow")
     25local system = CEGUI.System:getSingleton()
     26system:setDefaultMouseCursor(menuImageSet, "MouseArrow")
    1227system:setDefaultFont("BlueHighway-12")
    13 system:setDefaultTooltip("TaharezLook/Tooltip")
     28system:setDefaultTooltip("MenuWidgets/Tooltip")
    1429
    15 loadedGUIs = {}
    16 cursorVisibility = {}
    17 activeSheets = {}
    18 nrOfActiveSheets = 0
    19 root = nil
    20 bShowsCursor = false
    21 bHidePrevious = {}
    22 
    23 -- Require all tools
     30-- Convenience function and additional tools
    2431require("GUITools")
    25 
    26 -- loads the GUI with the specified filename
    27 -- be sure to set the global variable "filename" before calling this function
    28 function loadGUI(filename)
    29     -- check if it already exists
    30     loadedGui = loadedGUIs[filename]
    31     if loadedGui == nil then
    32         loadedGuiNS = require(filename)
    33         if loadedGuiNS == nil then
    34             return
    35         end
    36         loadedGui = loadedGuiNS:load()
    37         loadedGUIs[filename] = loadedGui
    38         -- if there has no GUI been loaded yet, set new GUI as current
    39         if table.getn(loadedGUIs) == 1 then
    40             current = loadedGUIs[1]
    41         end
    42         -- hide new GUI as we do not want to show it accidentially
    43         loadedGui:hide()
    44     end
    45     return loadedGui
    46 end
    47 
    48 function showGUI(filename, hidePrevious, bCursorVisible, ptr)
    49     gui = showGUI(filename, hidePrevious, bCursorVisible)
    50     gui.overlay = ptr
    51 end
    52 
    53 -- shows the specified and loads it if not loaded already
    54 -- be sure to set the global variable "filename" before calling this function
    55 function showGUI(filename, hidePrevious, bCursorVisible)
    56     if bCursorVisible == nil then
    57         if nrOfActiveSheets > 0 then
    58             bCursorVisible = cursorVisibility[activeSheets[nrOfActiveSheets]]
    59         else
    60             bCursorVisible = true
    61         end
    62     end
    63 
    64     if root == nil then
    65         setBackground("")
    66     end
    67 
    68     local currentGUI = loadedGUIs[filename]
    69     if(currentGUI == nil) then
    70         currentGUI = loadGUI(filename)
    71     end
    72 
    73     if(root:isChild(currentGUI.window)) then
    74         root:removeChildWindow(currentGUI.window)
    75     end
    76     root:addChildWindow(currentGUI.window)
    77 
    78     if bCursorVisible then
    79         showCursor()
    80     else
    81         hideCursor()
    82     end
    83 
    84     if find( activeSheets, filename ) ~= nil then
    85         table.remove( activeSheets, find( activeSheets, filename ) )
    86         nrOfActiveSheets = nrOfActiveSheets - 1
    87     else
    88         if nrOfActiveSheets == 0 then
    89             orxonox.InputManager:getInstance():enterState("guiMouseOnly")
    90             orxonox.HumanController:pauseControl()
    91         end
    92     end
    93     nrOfActiveSheets = nrOfActiveSheets + 1
    94     table.insert(activeSheets, filename)
    95     activeSheets[nrOfActiveSheets] = filename
    96     bHidePrevious[filename]=hidePrevious
    97     cursorVisibility[filename] = bCursorVisible
    98 
    99     if hidePrevious == true then
    100         for i=1,nrOfActiveSheets-1 do
    101             loadedGUIs[ activeSheets[i] ]:hide()
    102         end
    103     end
    104     currentGUI:show()
    105     return currentGUI
    106 end
    107 
    108 function hideCursor()
    109     if bShowsCursor==true then
    110         bShowsCursor=false
    111         cursor:hide()
    112     end
    113 end
    114 
    115 function showCursor()
    116     if bShowsCursor==false then
    117         bShowsCursor=true
    118         cursor:show()
    119     end
    120 end
    121 
    122 function hideGUI(filename)
    123     local currentGUI = loadedGUIs[filename]
    124     if currentGUI == nil then
    125         return
    126     end
    127     currentGUI:hide()
    128     if bHidePrevious[filename] == true then
    129         local i = nrOfActiveSheets-1
    130         while i>0 do
    131             loadedGUIs[ activeSheets[i] ]:show()
    132             if bHidePrevious[filename]==true then
    133                 break
    134             else
    135                 i=i-1
    136             end
    137         end
    138     end
    139     root:removeChildWindow(currentGUI.window)
    140     local i=1
    141     while activeSheets[i] do
    142         if activeSheets[i+1] == nil then
    143             if activeSheets[i-1] ~= nil then
    144                 if cursorVisibility[ activeSheets[i-1] ] == true then
    145                     showCursor()
    146                 else
    147                     hideCursor()
    148                 end
    149             else
    150                 hideCursor()
    151             end
    152         end
    153         if activeSheets[i] == filename then
    154             table.remove( activeSheets, i )
    155             nrOfActiveSheets = nrOfActiveSheets-1
    156         else
    157             i = i+1
    158         end
    159     end
    160     cursorVisibility[filename] = nil -- remove the cursor visibility of the current gui from the table
    161     bHidePrevious[filename] = nil
    162     if nrOfActiveSheets == 0 then
    163         orxonox.InputManager:getInstance():leaveState("guiMouseOnly")
    164         orxonox.HumanController:resumeControl()
    165         hideCursor()
    166     end
    167 end
    168 
    169 function hideAllGUIs()
    170     while nrOfActiveSheets ~= 0 do
    171         hideGUI(activeSheets[nrOfActiveSheets])
    172     end
    173 end
    174 
    175 function keyESC()
    176     if nrOfActiveSheets == 1 and activeSheets[1] == "MainMenu" then
    177         orxonox.execute("exit")
    178     elseif nrOfActiveSheets > 0 then
    179         orxonox.execute("hideGUI "..activeSheets[nrOfActiveSheets])
    180     else
    181         showGUI("InGameMenu")
    182     end
    183 end
    184 
    185 function setBackground(filename)
    186     local newroot
    187     if root ~= nil then
    188         root:rename("oldRootWindow")
    189     end
    190     if filename ~= "" then
    191         newroot = winMgr:loadWindowLayout(filename .. ".layout")
    192         newroot:rename("AbsoluteRootWindow")
    193         system:setGUISheet(newroot)
    194     else
    195         newroot = winMgr:createWindow("DefaultWindow", "AbsoluteRootWindow")
    196         newroot:setProperty("Alpha", "0.0")
    197         newroot:setSize(CEGUI.UVector2(CEGUI.UDim(1.0,0),CEGUI.UDim(1.0,0)))
    198         system:setGUISheet(newroot)
    199     end
    200     if root ~= nil then
    201         local child
    202         while root:getChildCount()~=0 do
    203             child = root:getChildAtIdx(0)
    204             root:removeChildWindow(child)
    205             newroot:addChildWindow(child)
    206         end
    207         winMgr:destroyWindow(root)
    208     end
    209     newroot:show()
    210     root = newroot
    211 end
    212 
    213 function find(table, value)
    214     local i=0
    215     while table[i] ~= nil do
    216         if table[i]==value then
    217             return i
    218         else
    219             i=i+1
    220         end
    221     end
    222     return nil
    223 end
    224 
    225 --TODO: Needed?
    226 function test(e)
    227     debug(0, "Blubb")
    228 end
  • code/trunk/data/gui/scripts/KeyBindMenu.lua

    r6549 r6746  
    11-- KeyBindMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 
    6 if _REQUIREDNAME == nil then
    7     KeyBindMenu = P
    8 else
    9     _G[_REQUIREDNAME] = P
    10 end
    11 
    12 P.filename = "KeyBindMenu"
    13 P.layoutString = "KeyBindMenu.layout"
    14 
    15 function P:init()
     3local P = createMenuSheet("KeyBindMenu")
     4
     5function P.onLoad()
    166
    177    commandList = {}
     
    6858
    6959    --Calculate design parameters:
    70     sampleWindow = winMgr:createWindow("TaharezLook/StaticText", "orxonox/KeyBindPane/SampleWindow")
     60    sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/KeyBindPane/SampleWindow")
    7161    sampleWindow:setText("SampleText")
    7262
     
    125115    line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, lineHeight*(k-1))))
    126116
    127     local command = winMgr:createWindow("TaharezLook/StaticText", "orxonox/KeyBindPane/Binding" .. k .. "/Command")
     117    local command = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/KeyBindPane/Binding" .. k .. "/Command")
    128118    command:setText(nameList[k])
    129119    command:setSize(CEGUI.UVector2(CEGUI.UDim(0, commandWidth), CEGUI.UDim(1, 0)))
     
    132122    offset = offset + commandWidth + spaceWidth
    133123
    134     local plus = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Plus")
     124    local plus = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Plus")
    135125    plus:setSize(CEGUI.UVector2(CEGUI.UDim(0, addWidth), CEGUI.UDim(0.7, 0)))
    136126    plus:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
    137127    plus:setText("add")
    138     orxonox.GUIManager:subscribeEventHelper(plus, "Clicked", P.filename .. ".KeyBindPlus_clicked")
     128    orxonox.GUIManager:subscribeEventHelper(plus, "Clicked", P.name .. ".KeyBindPlus_clicked")
    139129    line:addChildWindow(plus)
    140130    offset = offset + addWidth + spaceWidth
     
    142132    local numButtons = orxonox.KeyBinderManager:getInstance():getCurrent():getNumberOfBindings(commandList[k]);
    143133    for i=0,(numButtons-1) do
    144         local button = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Button" .. i)
     134        local button = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Button" .. i)
    145135        local name = orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[k],i)
    146136        name = P.KeyNameNiceifier(name)
     
    151141        button:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0.7, 0)))
    152142        button:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
    153         orxonox.GUIManager:subscribeEventHelper(button, "Clicked", P.filename .. ".KeyBindButton_clicked")
    154         --button:subscribeScriptedEvent("EventClicked", P.filename .. ".KeyBindButton_clicked")
     143        orxonox.GUIManager:subscribeEventHelper(button, "Clicked", P.name .. ".KeyBindButton_clicked")
     144        --button:subscribeScriptedEvent("EventClicked", P.name .. ".KeyBindButton_clicked")
    155145        line:addChildWindow(button)
    156146        offset = offset + buttonWidth
    157147
    158         local clear = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Clear" .. i)
     148        local clear = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Clear" .. i)
    159149        clear:setSize(CEGUI.UVector2(CEGUI.UDim(0, clearWidth), CEGUI.UDim(0.7, 0)))
    160150        clear:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
    161151        clear:setText("X")
    162         orxonox.GUIManager:subscribeEventHelper(clear, "Clicked", P.filename .. ".KeyBindClear_clicked")
     152        orxonox.GUIManager:subscribeEventHelper(clear, "Clicked", P.name .. ".KeyBindClear_clicked")
    163153        line:addChildWindow(clear)
    164154        offset = offset + clearWidth + spaceWidth
     
    254244
    255245function P.KeyBindBackButton_clicked(e)
    256     hideGUI("KeyBindMenu")
     246    hideMenuSheet("KeyBindMenu")
    257247end
    258248
  • code/trunk/data/gui/scripts/MainMenu.lua

    r6417 r6746  
    11-- MainMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     MainMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
    10 
    11 P.filename = "MainMenu"
    12 P.layoutString = "MainMenu.layout"
     3local P = createMenuSheet("MainMenu")
    134
    145-- events for MainMenu
     
    189
    1910function P.SingleplayerButton_clicked(e)
    20     showGUI("SingleplayerMenu", true)
     11    showMenuSheet("SingleplayerMenu", true)
    2112end
    2213
    2314function P.MultiplayerButton_clicked(e)
    24     showGUI("MultiplayerMenu", true)
     15    showMenuSheet("MultiplayerMenu", true)
    2516end
    2617
    2718function P.SettingsButton_clicked(e)
    28     showGUI("SettingsMenu", true)
     19    showMenuSheet("SettingsMenu", true)
    2920end
    3021
    3122function P.CreditsButton_clicked(e)
    32     showGUI("CreditsMenu", true)
     23    showMenuSheet("CreditsMenu", true)
    3324end
    3425
  • code/trunk/data/gui/scripts/MouseControlsMenu.lua

    r6417 r6746  
    11-- MouseControlsMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     MouseControlsMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
     3local P = createMenuSheet("MouseControlsMenu")
    104
    11 P.filename = "MouseControlsMenu"
    12 P.layoutString = "MouseControlsMenu.layout"
    13 
    14 function P:init()
     5function P.onLoad()
    156    block = false
    167    mousenormalscrollbarwindow = tolua.cast(winMgr:getWindow("orxonox/MouseNormalScrollbar"),"CEGUI::Scrollbar")
     
    10495
    10596function P.MouseControlsBackButton_clicked(e)
    106     hideGUI(P.filename)
     97    hideMenuSheet(P.name)
    10798end
    10899
  • code/trunk/data/gui/scripts/MultiplayerMenu.lua

    r6417 r6746  
    11-- MultiplayerMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     MultiplayerMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
     3local P = createMenuSheet("MultiplayerMenu")
    104
    11 P.filename = "MultiplayerMenu"
    12 P.layoutString = "MultiplayerMenu.layout"
    13 
    14 function P:init()
     5function P.onLoad()
    156    listbox = winMgr:getWindow("orxonox/MultiplayerLevelListbox")
    167    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
     
    3021    for k,v in pairs(levelList) do
    3122        item = CEGUI.createListboxTextItem(v)
    32         item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
     23        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
    3324        CEGUI.toListbox(listbox):addItem(item)
    3425        if v .. ".oxw" == preselect then
     
    7162        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
    7263        orxonox.execute(multiplayerMode)
    73         hideAllGUIs()
     64        hideAllMenuSheets()
    7465    end
    7566end
    7667
    7768function P.MultiplayerBackButton_clicked(e)
    78     hideGUI(P.filename)
     69    hideMenuSheet(P.name)
    7970end
    8071
  • code/trunk/data/gui/scripts/MultiplayerOptionsMenu.lua

    r6417 r6746  
    11-- MultiplayerOptionsMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     MultiplayerOptionsMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
    10 
    11 P.filename = "MultiplayerOptionsMenu"
    12 P.layoutString = "MultiplayerOptionsMenu.layout"
     3local P = createMenuSheet("MultiplayerOptionsMenu")
    134
    145function P.MultiplayerOptionsBackButton_clicked(e)
    15     hideGUI(P.filename)
     6    hideMenuSheet(P.name)
    167end
    178
  • code/trunk/data/gui/scripts/PickupInventory.lua

    r6711 r6746  
    11-- PickupInventory.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 
    6 if _REQUIREDNAME == nil then
    7     PickupInventory = P
    8 else
    9     _G[_REQUIREDNAME] = P
    10 end
    11 
    12 P.filename = "PickupInventory"
    13 P.layoutString = "PickupInventory.layout"
     3local P = createMenuSheet("PickupInventory")
    144
    155P.carrierList = {}
     
    177P.detailsWindows = {}
    188
    19 function P.init()
     9function P.onLoad()
    2010    carrierList = {}
    2111end
     
    2313function P.show()
    2414    P.window:show() -- TODO: Do this through parent...
    25     P.visible = true
     15    P.bVisible = true
    2616   
    2717    P.createInventory()
     
    137127        useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight)))
    138128        useButton:setText("use")
    139         orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.filename .. ".InventoryUseButton_clicked")
     129        orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseButton_clicked")
    140130        item:addChildWindow(useButton)
    141131       
     
    144134        dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight)))
    145135        dropButton:setText("drop")
    146         orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.filename .. ".InventoryDropButton_clicked")
     136        orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.name .. ".InventoryDropButton_clicked")
    147137        item:addChildWindow(dropButton)
    148138       
     
    151141        detailsButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, textHeight)))
    152142        detailsButton:setText("details")
    153         orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.filename .. ".InventoryDetailsButton_clicked")
     143        orxonox.GUIManager:subscribeEventHelper(detailsButton, "Clicked", P.name .. ".InventoryDetailsButton_clicked")
    154144        item:addChildWindow(detailsButton)
    155145    end
     
    201191    local window = winMgr:createWindow("TaharezLook/FrameWindow", name)
    202192    window:setSize(CEGUI.UVector2(CEGUI.UDim(0.5,0),CEGUI.UDim(0.4,0)))
    203     orxonox.GUIManager:subscribeEventHelper(window, "CloseClicked", P.filename .. ".closeDetailWindow")
     193    orxonox.GUIManager:subscribeEventHelper(window, "CloseClicked", P.name .. ".closeDetailWindow")
    204194   
    205195    local root = winMgr:getWindow("orxonox/PickupInventory/Background")
     
    240230    useButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, titleHeight)))
    241231    useButton:setText("use")
    242     orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.filename .. ".InventoryUseButton_clicked")
     232    orxonox.GUIManager:subscribeEventHelper(useButton, "Clicked", P.name .. ".InventoryUseButton_clicked")
    243233    wrapper:addChildWindow(useButton)
    244234   
     
    247237    dropButton:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0, titleHeight)))
    248238    dropButton:setText("drop")
    249     orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.filename .. ".InventoryDropButton_clicked")
     239    orxonox.GUIManager:subscribeEventHelper(dropButton, "Clicked", P.name .. ".InventoryDropButton_clicked")
    250240    wrapper:addChildWindow(dropButton)
    251241   
  • code/trunk/data/gui/scripts/QuestGUI.lua

    r6711 r6746  
    1 gui = require("BasicGUI")
    2 local P = BasicGUI:new() --inherit everything from the gui package
    3 if _REQUIREDNAME == nil then
    4     QuestGUI = P
    5 else
    6     _G[_REQUIREDNAME] = P
    7 end
     1-- QuestGUI.lua
    82
    9 P.filename = "QuestGUI"
    10 P.layoutString = "QuestGUI.layout"
     3local P = createMenuSheet("QuestGUI")
    114
    12 function P:show()
    13     self.window:show() -- TODO: Do this through parent...
    14     self.visible = true
     5function P.show()
     6    P.window:show() -- TODO: Do this through parent...
     7    P.visible = true
    158
    169    local questManager = orxonox.QuestManager:getInstance()
     
    1811    local questsList = winMgr:getWindow("orxonox/QuestGUI/QuestsList")
    1912
    20     local window = questManager:getQuestGUI(P.filename)
     13    local window = questManager:getQuestGUI(P.name)
    2114
    2215    questsList:addChildWindow(window)
  • code/trunk/data/gui/scripts/SettingsMenu.lua

    r6417 r6746  
    11-- SettingsMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     SettingsMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
    10 
    11 P.filename = "SettingsMenu"
    12 P.layoutString = "SettingsMenu.layout"
     3local P = createMenuSheet("SettingsMenu")
    134
    145function P.SettingsGameplayButton_clicked(e)
    15     showGUI("GameplayMenu", true)
     6    showMenuSheet("GameplayMenu", true)
    167end
    178
    189function P.SettingsMultiplayerOptionsButton_clicked(e)
    19     showGUI("MultiplayerOptionsMenu", true)
     10    showMenuSheet("MultiplayerOptionsMenu", true)
    2011end
    2112
    2213function P.SettingsControlsButton_clicked(e)
    23     showGUI("ControlsMenu", true)
     14    showMenuSheet("ControlsMenu", true)
    2415end
    2516
    2617function P.SettingsGraphicsButton_clicked(e)
    27     showGUI("GraphicsMenu", true)
     18    showMenuSheet("GraphicsMenu", true)
    2819end
    2920
    3021function P.SettingsAudioButton_clicked(e)
    31     showGUI("AudioMenu", true)
     22    showMenuSheet("AudioMenu", true)
    3223end
    3324
    3425function P.SettingsResetSettingsButton_clicked(e)
    3526    -- reset settings
    36     debug("event: reset settings")
     27    logMessage(0, "event: reset settings")
    3728end
    3829
    3930function P.SettingsBackButton_clicked(e)
    40     hideGUI(P.filename)
     31    hideMenuSheet(P.name)
    4132end
    4233
  • code/trunk/data/gui/scripts/SingleplayerMenu.lua

    r6417 r6746  
    11-- SingleplayerMenu.lua
    22
    3 BasicGUI = require("BasicGUI")
    4 local P = BasicGUI:new() --inherit everything from the gui package
    5 if _REQUIREDNAME == nil then
    6     SingleplayerMenu = P
    7 else
    8     _G[_REQUIREDNAME] = P
    9 end
     3local P = createMenuSheet("SingleplayerMenu")
    104
    11 P.filename = "SingleplayerMenu"
    12 P.layoutString = "SingleplayerMenu.layout"
    13 
    14 function P:init()
     5function P.onLoad()
    156    listbox = winMgr:getWindow("orxonox/SingleplayerLevelListbox")
    167    preselect = orxonox.LevelManager:getInstance():getDefaultLevel()
     
    3021    for k,v in pairs(levelList) do
    3122        item = CEGUI.createListboxTextItem(v)
    32         item:setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush")
     23        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
    3324        CEGUI.toListbox(listbox):addItem(item)
    3425        if v .. ".oxw" == preselect then
     
    4334        orxonox.LevelManager:getInstance():setDefaultLevel(choice:getText() .. ".oxw")
    4435        orxonox.execute("startGame")
    45         hideAllGUIs()
     36        hideAllMenuSheets()
    4637    end
    4738end
    4839
    4940function P.SingleplayerBackButton_clicked(e)
    50     hideGUI(P.filename)
     41    hideMenuSheet(P.name)
    5142end
    5243
  • code/trunk/data/lua/LuaStateInit.lua

    r6536 r6746  
    11-- Note: luaState is a pointer to the LuaState instance that created this lua state
    22
    3 -- Save original print function in debug
    4 debug = print
    5 
    63-- Redirect print to the C++ print function
     4original_print = print
    75print = function(s)
    86  luaState:luaPrint(s)
     
    1311  luaState:luaLog(level, message)
    1412end
     13cout = logMessage
    1514
    1615-- Redirect dofile in order to load with the resource manager
    17 doFile = function(filename)
    18   luaState:doFile(filename)
    19   -- Required because the C++ function cannot return whatever might be on the stack
     16original_dofile = dofile
     17dofile = function(filename)
     18  if not luaState:doFile(filename) then
     19    error("Error propagation. Do not display")
     20  end
     21  -- Required because if the file returns a table, it cannot be passed through the C++ function
    2022  return LuaStateReturnValue -- C-injected global variable
    2123end
    22 original_dofile = dofile
    23 dofile = doFile
     24doFile = dofile
    2425
    2526-- Create includeFile function that preparses the file according
    2627-- to a function provided to the LuaState constructor (in C++)
    2728include = function(filename)
    28   luaState:includeFile(filename)
    29   -- Required because the C++ function cannot return whatever might be on the stack
     29  if not luaState:includeFile(filename) then
     30    error("Error propagation. Do not display")
     31  end
     32  -- Required because if the file returns a table, it cannot be passed through the C++ function
    3033  return LuaStateReturnValue -- C-injected global variable
    3134end
     
    3437-- The loaded modules are then stored with their names (where name has no .lua extension)
    3538-- Furthermore the ".lua" extension is appended to the moduleName parameter when looking for the file
    36 old_require = require
     39original_require = require
     40_REQUIREDNAME = ""
     41LuaStateReturnValue = true
    3742require = function(moduleName)
    3843  if not luaState:fileExists(moduleName .. ".lua") then
     44    logMessage(2, "Warning: Lua function require() could not find file '" .. moduleName .. ".lua' ")
    3945    return nil
    4046  end
     47
    4148  if not _LOADED then
    4249    _LOADED = {}
    4350  end
     51  if not _LOADED_RETURN_VALUES then
     52      _LOADED_RETURN_VALUES = {}
     53  end
     54
    4455  if not _LOADED[moduleName] then
    45     -- save old value
    46     _REQUIREDNAME_OLD = _REQUIREDNAME
     56    -- save old value for the required name
     57    local _REQUIREDNAME_OLD = _REQUIREDNAME
    4758    _REQUIREDNAME = moduleName
    48     luaState:doFile(moduleName .. ".lua")
    49     _LOADED[moduleName] = LuaStateReturnValue or true
     59
     60    if not luaState:doFile(moduleName .. ".lua") then
     61      error("Error propagation. Do not display")
     62    end
     63    -- LuaStateReturnValue is required because if the file returns a table,
     64    -- it cannot be passed through the C++ function
     65    _LOADED_RETURN_VALUES[moduleName] = LuaStateReturnValue
     66    _LOADED[moduleName] = true
     67
    5068    -- restore old value
    5169    _REQUIREDNAME = _REQUIREDNAME_OLD
    5270  end
    53   return _LOADED[moduleName]
     71  local asdf = _LOADED_RETURN_VALUES[moduleName]
     72  return asdf
    5473end
     74
     75
     76-- Load useful tool functions (like handleDefaultArgument)
     77require("Tools")
     78
     79
     80-- Include command line debugger for lua 5.1
     81-- Note: It doesn't work if the IOConsole was started. Then we replace pause() with a warning
     82if _VERSION ~= "Lua 5.0"  and not luaState:usingIOConsole() then
     83  require("Debugger")
     84else
     85  -- Fallback pause function
     86  pause = function()
     87    logMessage(2, [["Warning: debug() called in Lua, but Debugger is not active.
     88Do you have the IOConsole disabled and are you using Lua version 5.1?"]])
     89  end
     90end
     91
     92-- General error handler that gets called whenever an error happens at runtime
     93errorHandler = function(err)
     94  if type(err) == "string" then
     95    -- Simply return if the error has already been handled
     96    if string.find(err, "Error propagation. Do not display") ~= nil then
     97      return err
     98    end
     99    -- Display the error message
     100    logMessage(1, "Lua runtime error: "..err)
     101  end
     102
     103  -- Start debugger if possible
     104  if _LOADED and _LOADED["Debugger"] ~= nil then
     105    pause()
     106  else
     107    -- Fallback: print stack trace
     108    logMessage(3, debug.traceback(""))
     109  end
     110  return err -- Hello Lua debugger user! Please type 'set 2' to get to the
     111             -- actual position in the stack where the error occurred
     112end
     113
    55114
    56115-- Convenience function for console commands
  • code/trunk/src/libraries/core/Core.cc

    r6417 r6746  
    7878
    7979    SetCommandLineArgument(settingsFile, "orxonox.ini").information("THE configuration file");
     80    SetCommandLineSwitch(noIOConsole).information("Use this if you don't want to use the IOConsole (for instance for Lua debugging)");
    8081#ifdef ORXONOX_PLATFORM_WINDOWS
    8182    SetCommandLineArgument(limitToCPU, 1).information("Limits the program to one CPU/core (1, 2, 3, etc.). Default is the first core (faster than off)");
     
    8889        , consoleCommandDestroyer_(CommandExecutor::destroyExternalCommands)
    8990        , bGraphicsLoaded_(false)
     91        , bStartIOConsole_(true)
    9092    {
    9193        // Set the hard coded fixed paths
     
    149151
    150152        // create persistent io console
    151         this->ioConsole_.reset(new IOConsole());
     153        if (CommandLineParser::getValue("noIOConsole").getBool())
     154        {
     155            ModifyConfigValue(bStartIOConsole_, tset, false);
     156        }
     157        if (this->bStartIOConsole_)
     158            this->ioConsole_.reset(new IOConsole());
    152159
    153160        // creates the class hierarchy for all classes with factories
     
    193200            .description("If true, all random actions are different each time you start the game")
    194201            .callback(this, &Core::initRandomNumberGenerator);
     202        SetConfigValue(bStartIOConsole_, true)
     203            .description("Set to false if you don't want to use the IOConsole (for Lua debugging for instance)");
    195204    }
    196205
     
    225234
    226235        // Load the CEGUI interface
    227         guiManager_.reset(new GUIManager(graphicsManager_->getRenderWindow(),
    228             inputManager_->getMousePosition(), graphicsManager_->isFullScreen()));
     236        guiManager_.reset(new GUIManager(inputManager_->getMousePosition()));
    229237
    230238        bGraphicsLoaded_ = true;
     
    328336        }
    329337        // Process console events and status line
    330         this->ioConsole_->preUpdate(time);
     338        if (this->ioConsole_ != NULL)
     339            this->ioConsole_->preUpdate(time);
    331340        // Process thread commands
    332341        this->tclThreadManager_->preUpdate(time);
  • code/trunk/src/libraries/core/Core.h

    r6417 r6746  
    3838#include "util/ScopeGuard.h"
    3939#include "util/Singleton.h"
    40 #include "core/OrxonoxClass.h"
     40#include "OrxonoxClass.h"
    4141
    4242namespace orxonox
     
    9797            scoped_ptr<TclBind>           tclBind_;
    9898            scoped_ptr<TclThreadManager>  tclThreadManager_;
    99             scoped_ptr<Scope<ScopeID::Root> >     rootScope_;
     99            scoped_ptr<Scope<ScopeID::Root> > rootScope_;
    100100            // graphical
    101101            scoped_ptr<GraphicsManager>   graphicsManager_;     //!< Interface to OGRE
     
    108108            std::string                   language_;                   //!< The language
    109109            bool                          bInitRandomNumberGenerator_; //!< If true, srand(time(0)) is called
     110            bool                          bStartIOConsole_;            //!< Set to false if you don't want to use the IOConsole
    110111
    111112            static Core*                  singletonPtr_s;
  • code/trunk/src/libraries/core/GUIManager.cc

    r6502 r6746  
    3030#include "GUIManager.h"
    3131
     32#include <boost/bind.hpp>
    3233#include <memory>
    3334extern "C" {
     
    4142#include <CEGUISystem.h>
    4243#include <CEGUIWindow.h>
     44#include <CEGUIWindowManager.h>
    4345#include <ogreceguirenderer/OgreCEGUIRenderer.h>
    4446
     
    5759#include "ConsoleCommand.h"
    5860#include "Core.h"
     61#include "GraphicsManager.h"
    5962#include "LuaState.h"
    6063#include "PathConfig.h"
    6164#include "Resource.h"
     65#include "input/InputManager.h"
     66#include "input/InputState.h"
     67#include "input/KeyBinderManager.h"
    6268
    6369namespace orxonox
     
    108114    @return true if success, otherwise false
    109115    */
    110     GUIManager::GUIManager(Ogre::RenderWindow* renderWindow, const std::pair<int, int>& mousePosition, bool bFullScreen)
    111         : renderWindow_(renderWindow)
    112         , resourceProvider_(0)
     116    GUIManager::GUIManager(const std::pair<int, int>& mousePosition)
     117        : resourceProvider_(NULL)
    113118        , camera_(NULL)
    114         , bShowIngameGUI_(false)
    115119    {
    116120        using namespace CEGUI;
     
    119123
    120124        // Note: No SceneManager specified yet
    121         guiRenderer_.reset(new OgreCEGUIRenderer(renderWindow_, Ogre::RENDER_QUEUE_OVERLAY, false, 3000));
     125        guiRenderer_.reset(new OgreCEGUIRenderer(GraphicsManager::getInstance().getRenderWindow(), Ogre::RENDER_QUEUE_OVERLAY, false, 3000));
    122126        resourceProvider_ = guiRenderer_->createResourceProvider();
    123127        resourceProvider_->setDefaultResourceGroup("GUI");
     
    141145        guiSystem_.reset(new System(guiRenderer_.get(), resourceProvider_, 0, scriptModule_.get()));
    142146
    143         // Initialise the basic Lua code
    144         this->luaState_->doFile("InitialiseGUI.lua");
    145 
    146147        // Align CEGUI mouse with OIS mouse
    147148        guiSystem_->injectMousePosition((float)mousePosition.first, (float)mousePosition.second);
    148149
    149         // Hide the mouse cursor unless playing in full screen mode
    150         if (!bFullScreen)
    151             CEGUI::MouseCursor::getSingleton().hide();
     150        // Initialise the Lua framework and load the schemes
     151        this->luaState_->doFile("InitialiseGUI.lua");
     152
     153        // Create the root nodes
     154        this->rootWindow_ = CEGUI::WindowManager::getSingleton().createWindow("MenuWidgets/StaticImage", "AbsoluteRootWindow");
     155        this->rootWindow_->setProperty("FrameEnabled", "False");
     156        this->hudRootWindow_ = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow", "HUDRootWindow");
     157        this->menuRootWindow_ = CEGUI::WindowManager::getSingleton().createWindow("DefaultWindow", "MenuRootWindow");
     158        // And connect them
     159        CEGUI::System::getSingleton().setGUISheet(this->rootWindow_);
     160        this->rootWindow_->addChildWindow(this->hudRootWindow_);
     161        this->rootWindow_->addChildWindow(this->menuRootWindow_);
     162
     163        // Set up the sheet manager in the Lua framework
     164        this->luaState_->doFile("SheetManager.lua");
    152165    }
    153166
     
    173186    {
    174187        assert(guiSystem_);
    175         guiSystem_->injectTimePulse(time.getDeltaTime());
     188        this->protectedCall(boost::bind(&CEGUI::System::injectTimePulse, _1, time.getDeltaTime()));
    176189    }
    177190
     
    200213    @param str
    201214        reference to string object holding the Lua code which is to be executed
    202 
    203         This function gives total access to the GUI. You can execute ANY Lua code here.
    204215    */
    205216    void GUIManager::executeCode(const std::string& str)
    206217    {
    207218        this->luaState_->doString(str, rootFileInfo_);
     219    }
     220
     221    /** Loads a GUI sheet by Lua script
     222    @param name
     223        The name of the GUI (like the script name, but without the extension)
     224    */
     225    void GUIManager::loadGUI(const std::string& name)
     226    {
     227        this->executeCode("loadSheet(\"" + name + "\")");
    208228    }
    209229
     
    215235
    216236        The function executes the Lua function with the same name in case the GUIManager is ready.
    217         For more details check out loadGUI_2.lua where the function presides.
    218     */
    219     /*static*/ void GUIManager::showGUI(const std::string& name, bool hidePrevious, bool showCursor)
    220     {
    221         GUIManager::getInstance().executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ")");
     237    */
     238    /*static*/ void GUIManager::showGUI(const std::string& name, bool bHidePrevious)
     239    {
     240        GUIManager::getInstance().executeCode("showMenuSheet(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ")");
    222241    }
    223242
     
    226245        Hack-ish. Needed for GUIOverlay.
    227246    */
    228     void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool hidePrevious, bool showCursor)
    229     {
    230         this->executeCode("showGUI(\"" + name + "\", " + multi_cast<std::string>(hidePrevious) + ", " + multi_cast<std::string>(showCursor) + ", " + ptr + ")");
     247    void GUIManager::showGUIExtra(const std::string& name, const std::string& ptr, bool bHidePrevious)
     248    {
     249        this->executeCode("showMenuSheet(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ", " + ptr + ")");
    231250    }
    232251
     
    239258    /*static*/ void GUIManager::hideGUI(const std::string& name)
    240259    {
    241         GUIManager::getInstance().executeCode("hideGUI(\"" + name + "\")");
     260        GUIManager::getInstance().executeCode("hideMenuSheet(\"" + name + "\")");
     261    }
     262
     263    const std::string& GUIManager::createInputState(const std::string& name, TriBool::Value showCursor, TriBool::Value useKeyboard, bool bBlockJoyStick)
     264    {
     265        InputState* state = InputManager::getInstance().createInputState(name);
     266
     267        /* Table that maps isFullScreen() and showCursor to mouseExclusive
     268        isFullscreen / showCursor | True  | False | Dontcare
     269        ----------------------------------------------------
     270        true                      | True  | True  | Dontcare
     271        ----------------------------------------------------
     272        false                     | False | True  | Dontcare
     273        */
     274        if (showCursor == TriBool::Dontcare)
     275            state->setMouseExclusive(TriBool::Dontcare);
     276        else if (GraphicsManager::getInstance().isFullScreen() || showCursor == TriBool::False)
     277            state->setMouseExclusive(TriBool::True);
     278        else
     279            state->setMouseExclusive(TriBool::False);
     280
     281        if (showCursor == TriBool::True)
     282            state->setMouseHandler(this);
     283        else if (showCursor == TriBool::False)
     284            state->setMouseHandler(&InputHandler::EMPTY);
     285
     286        if (useKeyboard == TriBool::True)
     287            state->setKeyHandler(this);
     288        else if (useKeyboard == TriBool::False)
     289            state->setKeyHandler(&InputHandler::EMPTY);
     290
     291        if (bBlockJoyStick)
     292            state->setJoyStickHandler(&InputHandler::EMPTY);
     293
     294        return state->getName();
    242295    }
    243296
     
    247300    }
    248301
    249     void GUIManager::setBackground(const std::string& name)
    250     {
    251         this->executeCode("setBackground(\"" + name + "\")");
     302    void GUIManager::setBackgroundImage(const std::string& imageSet, const std::string imageName)
     303    {
     304        if (imageSet.empty() || imageName.empty())
     305            this->setBackgroundImage("");
     306        else
     307            this->setBackgroundImage("set: " + imageSet + " image: " + imageName);
     308    }
     309
     310    void GUIManager::setBackgroundImage(const std::string& image)
     311    {
     312        if (image.empty())
     313            this->rootWindow_->setProperty("Alpha", "0.0");
     314        else
     315            this->rootWindow_->setProperty("Alpha", "1.0");
     316        this->rootWindow_->setProperty("Image", image);
    252317    }
    253318
    254319    void GUIManager::keyPressed(const KeyEvent& evt)
    255320    {
    256         guiSystem_->injectKeyDown(evt.getKeyCode());
    257         guiSystem_->injectChar(evt.getText());
    258     }
     321        this->protectedCall(boost::bind(&CEGUI::System::injectKeyDown, _1, evt.getKeyCode()));
     322        this->protectedCall(boost::bind(&CEGUI::System::injectChar, _1, evt.getText()));
     323    }
     324
    259325    void GUIManager::keyReleased(const KeyEvent& evt)
    260326    {
    261         guiSystem_->injectKeyUp(evt.getKeyCode());
     327        this->protectedCall(boost::bind(&CEGUI::System::injectKeyUp, _1, evt.getKeyCode()));
    262328    }
    263329
     
    273339    void GUIManager::buttonPressed(MouseButtonCode::ByEnum id)
    274340    {
    275         try
    276         {
    277             guiSystem_->injectMouseButtonDown(convertButton(id));
    278         }
    279         catch (CEGUI::ScriptException& ex)
    280         {
    281             // We simply ignore the exception and proceed
    282             COUT(1) << ex.getMessage() << std::endl;
    283         }
     341        this->protectedCall(boost::bind(&CEGUI::System::injectMouseButtonDown, _1, convertButton(id)));
    284342    }
    285343
     
    295353    void GUIManager::buttonReleased(MouseButtonCode::ByEnum id)
    296354    {
    297         try
    298         {
    299             guiSystem_->injectMouseButtonUp(convertButton(id));
    300         }
    301         catch (CEGUI::ScriptException& ex)
    302         {
    303             // We simply ignore the exception and proceed
    304             COUT(1) << ex.getMessage() << std::endl;
    305         }
     355        this->protectedCall(boost::bind(&CEGUI::System::injectMouseButtonUp, _1, convertButton(id)));
    306356    }
    307357
    308358    void GUIManager::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
    309359    {
    310         guiSystem_->injectMousePosition(static_cast<float>(abs.x), static_cast<float>(abs.y));
    311     }
     360        this->protectedCall(boost::bind(&CEGUI::System::injectMousePosition, _1, (float)abs.x, (float)abs.y));
     361    }
     362
    312363    void GUIManager::mouseScrolled(int abs, int rel)
    313364    {
    314         guiSystem_->injectMouseWheelChange(static_cast<float>(rel));
     365        this->protectedCall(boost::bind(&CEGUI::System::injectMouseWheelChange, _1, (float)rel));
    315366    }
    316367
     
    349400    }
    350401
     402    /** Executes a CEGUI function normally, but catches CEGUI::ScriptException.
     403        When a ScriptException occurs, the error message will be displayed and
     404        the program carries on.
     405    @remarks
     406        The exception behaviour may pose problems if the code is not written
     407        exception-safe (and you can forget about that in Lua). The program might
     408        be left in an undefined state. But otherwise one script error would
     409        terminate the whole program...
     410    @note
     411        Your life gets easier if you use boost::bind to create the object/function.
     412    @param function
     413        Any callable object/function that takes this->guiSystem_ as its only parameter.
     414    @return
     415        True if input was handled, false otherwise. A caught exception yields true.
     416    */
     417    template <typename FunctionType>
     418    bool GUIManager::protectedCall(FunctionType function)
     419    {
     420        try
     421        {
     422            return function(this->guiSystem_);
     423        }
     424        catch (CEGUI::ScriptException& ex)
     425        {
     426            // Display the error and proceed. See @remarks why this can be dangerous.
     427            COUT(1) << ex.getMessage() << std::endl;
     428            return true;
     429        }
     430    }
     431
    351432    void GUIManager::subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function)
    352433    {
  • code/trunk/src/libraries/core/GUIManager.h

    r6417 r6746  
    4141
    4242#include "util/OgreForwardRefs.h"
     43#include "util/TriBool.h"
    4344#include "util/Singleton.h"
    4445#include "input/InputHandler.h"
     46
     47// Tolua includes (have to be relative to the current directory)
     48/*
     49$cfile "../util/TriBool.h" // tolua_export
     50*/
    4551
    4652namespace orxonox // tolua_export
     
    5460
    5561        The GUIManager is a singleton and can be called anywhere when access on the GUI is needed.
    56         Creation of the GUIManager is therefore not possible and the cunstructor is private.
    5762
    5863        Since the GUI needs user input, the GUIManager implements the functions needed to act as a key and/or mouse handler.
     
    6469        friend class Singleton<GUIManager>;
    6570    public:
    66         GUIManager(Ogre::RenderWindow* renderWindow, const std::pair<int, int>& mousePosition, bool bFullScreen);
     71        GUIManager(const std::pair<int, int>& mousePosition);
    6772        ~GUIManager();
    6873
    6974        void preUpdate(const Clock& time);
    7075
    71         static void showGUI(const std::string& name, bool hidePrevious=false, bool showCursor=true);
    72         void showGUIExtra(const std::string& name, const std::string& ptr, bool hidePrevious=false, bool showCursor=true);
     76        void loadGUI(const std::string& name);
     77        static void showGUI(const std::string& name, bool bHidePrevious = false);
     78        void showGUIExtra(const std::string& name, const std::string& ptr, bool bHidePrevious = false);
    7379        static void hideGUI(const std::string& name);
    7480        void keyESC();
    75         void setBackground(const std::string& name);
     81        void setBackgroundImage(const std::string& imageSet, const std::string imageName); // tolua_export
     82        void setBackgroundImage(const std::string& image);
     83
     84        //! Creates a new InputState to be used with a GUI Sheet
     85        const std::string& createInputState(const std::string& name, TriBool::Value showCursor = TriBool::True, TriBool::Value useKeyboard = TriBool::True, bool bBlockJoyStick = false); // tolua_export
     86
     87        //! Returns the root window for all menu sheets
     88        CEGUI::Window* getMenuRootWindow() { return this->menuRootWindow_; } // tolua_export
     89        //! Returns the root window for all HUD sheets
     90        CEGUI::Window* getHUDRootWindow() { return this->hudRootWindow_; } // tolua_export
    7691
    7792        void setCamera(Ogre::Camera* camera);
    7893        Ogre::Camera* getCamera() { return this->camera_; }
    79 
    80         static GUIManager* getInstancePtr() { return singletonPtr_s; }
    8194
    8295        inline void setPlayer(const std::string& guiname, PlayerInfo* player)
     
    88101        static void subscribeEventHelper(CEGUI::Window* window, const std::string& event, const std::string& function); //tolua_export
    89102
     103        static GUIManager& getInstance() { return Singleton<GUIManager>::getInstance(); } // tolua_export
     104
    90105    private:
    91106        GUIManager(const GUIManager& instance); //!< private and undefined copy c'tor (this is a singleton class)
    92107
    93108        void executeCode(const std::string& str);
     109
     110        template <typename FunctionType>
     111        bool protectedCall(FunctionType function);
    94112
    95113        // keyHandler functions
     
    102120        void mouseMoved    (IntVector2 abs, IntVector2 rel, IntVector2 clippingSize);
    103121        void mouseScrolled (int abs, int rel);
    104 
    105122        scoped_ptr<CEGUI::OgreCEGUIRenderer> guiRenderer_;      //!< CEGUI's interface to the Ogre Engine
    106123        scoped_ptr<LuaState>                 luaState_;         //!< LuaState, access point to the Lua engine
     
    108125        scoped_ptr<CEGUI::System>            guiSystem_;        //!< CEGUI's main system
    109126        shared_ptr<ResourceInfo>             rootFileInfo_;     //!< Resource information about the root script
    110         Ogre::RenderWindow*                  renderWindow_;     //!< Ogre's render window to give CEGUI access to it
    111127        CEGUI::ResourceProvider*             resourceProvider_; //!< CEGUI's resource provider
    112128        CEGUI::Logger*                       ceguiLogger_;      //!< CEGUI's logger to be able to log CEGUI errors in our log
    113         std::map<std::string, PlayerInfo*>   players_;          //!< Stores the player (owner) for each gui
     129        CEGUI::Window*                       rootWindow_;       //!< Root node for all windows
     130        CEGUI::Window*                       hudRootWindow_;    //!< Root node for the HUD sheets
     131        CEGUI::Window*                       menuRootWindow_;   //!< Root node for the menu sheets (used by Lua)
     132        std::map<std::string, PlayerInfo*>   players_;          //!< Stores the player (owner) for each GUI
    114133        Ogre::Camera*                        camera_;           //!< Camera used to render the scene with the GUI
    115134
    116135        static GUIManager*                   singletonPtr_s;    //!< Singleton reference to GUIManager
    117         bool                                 bShowIngameGUI_;
    118136
    119137    }; // tolua_export
  • code/trunk/src/libraries/core/Game.h

    r6417 r6746  
    5050#include "util/ScopeGuard.h"
    5151#include "util/Singleton.h"
    52 #include "core/OrxonoxClass.h"
     52#include "OrxonoxClass.h"
    5353
    5454/**
  • code/trunk/src/libraries/core/IOConsole.cc

    r6422 r6746  
    3535#include "util/Clock.h"
    3636#include "util/Math.h"
    37 #include "core/Game.h"
    38 #include "core/input/InputBuffer.h"
     37#include "Game.h"
     38#include "input/InputBuffer.h"
    3939
    4040// ##########################
  • code/trunk/src/libraries/core/IOConsole.h

    r6417 r6746  
    3737#include <vector>
    3838#include "util/Singleton.h"
    39 #include "core/Shell.h"
     39#include "Shell.h"
    4040
    4141#ifdef ORXONOX_PLATFORM_UNIX
  • code/trunk/src/libraries/core/LuaState.cc

    r6417 r6746  
    3737
    3838#include "util/Debug.h"
     39#include "util/Exception.h"
     40#include "util/ScopeGuard.h"
     41#include "IOConsole.h"
    3942#include "Resource.h"
    4043#include "ToluaBindCore.h"
     
    5457        // Create new lua state and configure it
    5558        luaState_ = lua_open();
     59        Loki::ScopeGuard luaStateGuard = Loki::MakeGuard(&lua_close, luaState_);
    5660#if LUA_VERSION_NUM == 501
    5761        luaL_openlibs(luaState_);
     
    7882
    7983        // Parse init script
    80         this->doFile("LuaStateInit.lua");
     84        if (!this->doFile("LuaStateInit.lua"))
     85            ThrowException(InitialisationFailed, "Running LuaStateInit.lua failed");
     86
     87        luaStateGuard.Dismiss();
    8188    }
    8289
     
    96103    }
    97104
    98     void LuaState::includeFile(const std::string& filename)
     105    bool LuaState::includeFile(const std::string& filename)
    99106    {
    100107        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
    101108        if (sourceInfo != NULL)
    102             this->includeString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
    103         else
    104             COUT(2) << "LuaState: Cannot include file '" << filename << "'." << std::endl;
    105     }
    106 
    107     void LuaState::includeString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo)
     109            return this->includeString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
     110        else
     111        {
     112            COUT(2) << "LuaState: Cannot include file '" << filename << "' (not found)." << std::endl;
     113            return false;
     114        }
     115    }
     116
     117    bool LuaState::includeString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo)
    108118    {
    109119        // Parse string with provided include parser (otherwise don't preparse at all)
     
    114124            luaInput = code;
    115125
    116         this->doString(luaInput, sourceFileInfo);
    117     }
    118 
    119     void LuaState::doFile(const std::string& filename)
     126        if (sourceFileInfo != NULL)
     127        {
     128            // Also fill a map with the actual source code. This is just for the include* commands
     129            // where the content of sourceFileInfo->filename doesn't match 'code'
     130            this->sourceCodeMap_[sourceFileInfo->filename] = code;
     131        }
     132
     133        bool returnValue = this->doString(luaInput, sourceFileInfo);
     134
     135        if (sourceFileInfo != NULL)
     136        {
     137            // Delete source code entry
     138            if (sourceFileInfo != NULL)
     139                this->sourceCodeMap_.erase(sourceFileInfo->filename);
     140        }
     141
     142        return returnValue;
     143    }
     144
     145    bool LuaState::doFile(const std::string& filename)
    120146    {
    121147        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
    122148        if (sourceInfo != NULL)
    123             this->doString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
    124         else
    125             COUT(2) << "LuaState: Cannot do file '" << filename << "'." << std::endl;
    126     }
    127 
    128     void LuaState::doString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo)
     149            return this->doString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
     150        else
     151        {
     152            COUT(2) << "LuaState: Cannot do file '" << filename << "' (not found)." << std::endl;
     153            return false;
     154        }
     155    }
     156
     157    bool LuaState::doString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo)
    129158    {
    130159        // Save the old source file info
     
    134163            sourceFileInfo_ = sourceFileInfo;
    135164
    136         int error = 0;
     165        std::string chunkname;
     166        if (sourceFileInfo != NULL)
     167        {
     168            // Provide lua_load with the filename for debug purposes
     169            // The '@' is a Lua convention to identify the chunk name as filename
     170            chunkname = '@' + sourceFileInfo->filename;
     171        }
     172        else
     173        {
     174            // Use the code string to identify the chunk
     175            chunkname = code;
     176        }
     177
     178        // Push custom error handler that uses the debugger
     179        lua_getglobal(this->luaState_, "errorHandler");
     180        int errorHandler = lua_gettop(luaState_);
     181        if (lua_isnil(this->luaState_, -1))
     182        {
     183            lua_pop(this->luaState_, 1);
     184            errorHandler = 0;
     185        }
     186
    137187#if LUA_VERSION_NUM != 501
    138188        LoadS ls;
    139189        ls.s = code.c_str();
    140190        ls.size = code.size();
    141         error = lua_load(luaState_, &orxonox::LuaState::lua_Chunkreader, &ls, code.c_str());
     191        int error = lua_load(luaState_, &orxonox::LuaState::lua_Chunkreader, &ls, chunkname.c_str());
    142192#else
    143         error = luaL_loadstring(luaState_, code.c_str());
     193        int error = luaL_loadbuffer(luaState_, code.c_str(), code.size(), chunkname.c_str());
    144194#endif
    145195
    146         // execute the chunk
     196        switch (error)
     197        {
     198        case LUA_ERRSYNTAX: // Syntax error
     199            COUT(1) << "Lua syntax error: " << lua_tostring(luaState_, -1) << std::endl;
     200            break;
     201        case LUA_ERRMEM:    // Memory allocation error
     202            COUT(1) << "Lua memory allocation error: Consult your dentist immediately!" << std::endl;
     203            break;
     204        }
     205
    147206        if (error == 0)
    148             error = lua_pcall(luaState_, 0, 1, 0);
     207        {
     208            // Execute the chunk in protected mode with an error handler function (stack index)
     209            error = lua_pcall(luaState_, 0, 1, errorHandler);
     210
     211            switch (error)
     212            {
     213            case LUA_ERRRUN: // Runtime error
     214                if (errorHandler)
     215                {
     216                    // Do nothing (we already display the error in the
     217                    // 'errorHandler' Lua function in LuaStateInit.lua)
     218                }
     219                else
     220                {
     221                    std::string errorString = lua_tostring(this->luaState_, -1);
     222                    if (errorString.find("Error propagation") == std::string::npos)
     223                        COUT(1) << "Lua runtime error: " << errorString << std::endl;
     224                }
     225                break;
     226            case LUA_ERRERR: // Error in the error handler
     227                COUT(1) << "Lua error in error handler. No message available." << std::endl;
     228                break;
     229            case LUA_ERRMEM: // Memory allocation error
     230                COUT(1) << "Lua memory allocation error: Consult your dentist immediately!" << std::endl;
     231                break;
     232            }
     233        }
     234
    149235        if (error != 0)
    150236        {
    151             std::string origin;
    152             if (sourceFileInfo != NULL)
    153                 origin = " originating from " + sourceFileInfo_->filename;
    154             COUT(1) << "Error in Lua-script" << origin << ": " << lua_tostring(luaState_, -1) << std::endl;
    155             // return value is nil
    156             lua_pushnil(luaState_);
    157         }
    158         // push return value because it will get lost since the return value of this function is void
     237            lua_pop(luaState_, 1);  // Remove error message
     238            lua_pushnil(luaState_); // Push a nil return value
     239        }
     240
     241        if (errorHandler != 0)
     242            lua_remove(luaState_, errorHandler); // Remove error handler from stack
     243
     244        // Set return value to a global variable because we cannot return a table in this function
     245        // here. It would work for numbers, pointers and strings, but certainly not for Lua tables.
    159246        lua_setglobal(luaState_, "LuaStateReturnValue");
    160247
    161248        // Load the old info again
    162249        sourceFileInfo_ = oldSourceFileInfo;
     250
     251        return (error == 0);
    163252    }
    164253
     
    180269        else
    181270            return true;
     271    }
     272
     273    //! Returns the content of a file
     274    std::string LuaState::getSourceCode(const std::string& filename)
     275    {
     276        // Try the internal map first to get the actual Lua code
     277        // and not just some pseudo Lua-XML code when using include* commands
     278        std::map<std::string, std::string>::const_iterator it = this->sourceCodeMap_.find(filename);
     279        if (it != this->sourceCodeMap_.end())
     280            return it->second;
     281        shared_ptr<ResourceInfo> info = Resource::getInfo(filename);
     282        if (info == NULL)
     283            return "";
     284        else
     285            return Resource::open(info)->getAsString();
     286    }
     287
     288    bool LuaState::usingIOConsole() const
     289    {
     290        return IOConsole::exists();
    182291    }
    183292
  • code/trunk/src/libraries/core/LuaState.h

    r6417 r6746  
    4040
    4141#include "util/ScopeGuard.h"
    42 #include "core/Functor.h"
     42#include "Functor.h"
    4343#include "ToluaInterface.h"
    4444
     
    7171        ~LuaState();
    7272
    73         void doFile(const std::string& filename); // tolua_export
    74         void doString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo = shared_ptr<ResourceInfo>());
     73        bool doFile(const std::string& filename); // tolua_export
     74        bool doString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo = shared_ptr<ResourceInfo>());
    7575
    76         void includeFile(const std::string& filename); // tolua_export
    77         void includeString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo = shared_ptr<ResourceInfo>());
     76        bool includeFile(const std::string& filename); // tolua_export
     77        bool includeString(const std::string& code, const shared_ptr<ResourceInfo>& sourceFileInfo = shared_ptr<ResourceInfo>());
    7878
    7979        void luaPrint(const std::string& str); // tolua_export
    8080        void luaLog(unsigned int level, const std::string& message); // tolua_export
    8181        bool fileExists(const std::string& filename); // tolua_export
     82        std::string getSourceCode(const std::string& filename); // tolua_export
    8283
    8384        const std::stringstream& getOutput() const { return output_; }
     
    9192
    9293        Functor* createLuaFunctor(const std::string& code) { return new LuaFunctor(code, this); } // tolua_export
     94        //! Tells about whether IOConsole was activated. The Lua debugger only works with a normal console.
     95        bool usingIOConsole() const; // tolua_export
    9396
    9497        static bool addToluaInterface(int (*function)(lua_State*), const std::string& name);
     
    114117        bool bIsRunning_;
    115118        shared_ptr<ResourceInfo> sourceFileInfo_;
     119        std::map<std::string, std::string> sourceCodeMap_;
    116120        std::string (*includeParseFunction_)(const std::string&);
    117121
  • code/trunk/src/libraries/core/Resource.cc

    r6501 r6746  
    2929#include "Resource.h"
    3030
     31#include <boost/filesystem/path.hpp>
    3132#include <OgreException.h>
     33#include <OgreFileSystem.h>
    3234#include <OgreResourceGroupManager.h>
    3335
     
    8991                ptr->group = group;
    9092                ptr->size = it->uncompressedSize;
     93                if (dynamic_cast<Ogre::FileSystemArchive*>(it->archive) != NULL)
     94                {
     95                    boost::filesystem::path base(it->archive->getName());
     96                    base /= it->filename;
     97                    ptr->fileSystemPath = base.string();
     98                }
    9199                return ptr;
    92100            }
  • code/trunk/src/libraries/core/Resource.h

    r6417 r6746  
    5757        //! Uncompressed size
    5858        size_t size;
     59        //! Absolute file path ("" for files not on filesystem)
     60        std::string fileSystemPath;
    5961    };
    6062
  • code/trunk/src/libraries/core/Template.cc

    r6417 r6746  
    3333
    3434#include "util/Debug.h"
    35 #include "core/CoreIncludes.h"
    36 #include "core/XMLPort.h"
     35#include "CoreIncludes.h"
     36#include "XMLPort.h"
    3737
    3838namespace orxonox
  • code/trunk/src/libraries/core/input/InputDevice.h

    r6417 r6746  
    159159            for (unsigned int iB = 0; iB < pressedButtons_.size(); ++iB)
    160160                for (unsigned int iS = 0; iS < inputStates_.size(); ++iS)
    161                     inputStates_[iS]->buttonEvent<ButtonEvent::THold, Traits>(
     161                    inputStates_[iS]->buttonEvent<ButtonEvent::THold, typename Traits::ButtonTypeParam>(
    162162                        this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(pressedButtons_[iB]));
    163163
     
    196196            // Call states
    197197            for (unsigned int i = 0; i < inputStates_.size(); ++i)
    198                 inputStates_[i]->buttonEvent<ButtonEvent::TPress, Traits>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
     198                inputStates_[i]->buttonEvent<ButtonEvent::TPress, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
    199199        }
    200200
     
    218218            // Call states
    219219            for (unsigned int i = 0; i < inputStates_.size(); ++i)
    220                 inputStates_[i]->buttonEvent<ButtonEvent::TRelease, Traits>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
     220                inputStates_[i]->buttonEvent<ButtonEvent::TRelease, typename Traits::ButtonTypeParam>(this->getDeviceID(), static_cast<DeviceClass*>(this)->getButtonEventArg(button));
    221221        }
    222222
  • code/trunk/src/libraries/core/input/InputHandler.h

    r6105 r6746  
    112112        virtual ~InputHandler() { }
    113113
    114         template<class T> void buttonEvent(unsigned int device, const T& button, ButtonEvent::TPress)
     114        template<class T> void buttonEvent(unsigned int device, T button, ButtonEvent::TPress)
    115115            { this->buttonPressed(button); }
    116         template<class T> void buttonEvent(unsigned int device, const T& button, ButtonEvent::TRelease)
     116        template<class T> void buttonEvent(unsigned int device, T button, ButtonEvent::TRelease)
    117117            { this->buttonReleased(button); }
    118         template<class T> void buttonEvent(unsigned int device, const T& button, ButtonEvent::THold)
     118        template<class T> void buttonEvent(unsigned int device, T button, ButtonEvent::THold)
    119119            { this->buttonHeld(button); }
    120         void buttonEvent(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TPress)
    121             { this->buttonPressed(device - InputDeviceEnumerator::FirstJoyStick, button); }
    122         void buttonEvent(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TRelease)
    123             { this->buttonReleased(device - InputDeviceEnumerator::FirstJoyStick, button); }
    124         void buttonEvent(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::THold)
    125             { this->buttonHeld(device - InputDeviceEnumerator::FirstJoyStick, button); }
    126120
    127121        virtual void buttonPressed (const KeyEvent& evt) { }
     
    149143        static InputHandler EMPTY;
    150144    };
     145
     146    template<> inline void InputHandler::buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TPress)
     147        { this->buttonPressed(device - InputDeviceEnumerator::FirstJoyStick, button); }
     148    template<> inline void InputHandler::buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::TRelease)
     149        { this->buttonReleased(device - InputDeviceEnumerator::FirstJoyStick, button); }
     150    template<> inline void InputHandler::buttonEvent<JoyStickButtonCode::ByEnum>(unsigned int device, JoyStickButtonCode::ByEnum button, ButtonEvent::THold)
     151        { this->buttonHeld(device - InputDeviceEnumerator::FirstJoyStick, button); }
    151152}
    152153
  • code/trunk/src/libraries/core/input/InputManager.cc

    r6422 r6746  
    8787        , oisInputManager_(0)
    8888        , devices_(2)
    89         , mouseMode_(MouseMode::Nonexclusive)
     89        , exclusiveMouse_(TriBool::False)
    9090        , emptyState_(0)
    9191        , calibratorCallbackHandler_(0)
     
    9595        CCOUT(4) << "Constructing..." << std::endl;
    9696
     97        // Allocate space for the function call buffer
     98        this->callBuffer_.reserve(16);
     99
    97100        this->setConfigValues();
    98101
    99102        if (GraphicsManager::getInstance().isFullScreen())
    100             mouseMode_ = MouseMode::Exclusive;
     103            exclusiveMouse_ = TriBool::True;
    101104        this->loadDevices();
    102105
     
    155158        paramList.insert(std::make_pair("w32_keyboard", "DISCL_FOREGROUND"));
    156159        paramList.insert(std::make_pair("w32_mouse", "DISCL_FOREGROUND"));
    157         if (mouseMode_ == MouseMode::Exclusive || GraphicsManager::getInstance().isFullScreen())
     160        if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
    158161        {
    159162            // Disable Windows key plus special keys (like play, stop, next, etc.)
     
    168171        paramList.insert(std::make_pair("XAutoRepeatOn", "true"));
    169172
    170         if (mouseMode_ == MouseMode::Exclusive || GraphicsManager::getInstance().isFullScreen())
     173        if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
    171174        {
    172175            if (CommandLineParser::getValue("keyboard_no_grab").getBool())
     
    266269        CCOUT(3) << "Destroying..." << std::endl;
    267270
     271        // Leave all active InputStates (except "empty")
     272        while (this->activeStates_.size() > 1)
     273            this->leaveState(this->activeStates_.rbegin()->second->getName());
     274        this->activeStates_.clear();
     275
    268276        // Destroy calibrator helper handler and state
    269277        this->destroyState("calibrator");
    270278        // Destroy KeyDetector and state
    271279        calibratorCallbackHandler_->destroy();
    272         // destroy the empty InputState
     280        // Destroy the empty InputState
    273281        this->destroyStateInternal(this->emptyState_);
    274282
    275         // destroy all user InputStates
     283        // Destroy all user InputStates
    276284        while (statesByName_.size() > 0)
    277285            this->destroyStateInternal(statesByName_.rbegin()->second);
     
    335343    void InputManager::reload()
    336344    {
    337         if (internalState_ & Ticking)
    338         {
    339             // We cannot destroy OIS right now, because reload was probably
    340             // caused by a user clicking on a GUI item. The stack trace would then
    341             // include an OIS method. So it would be a very bad thing to destroy it..
    342             internalState_ |= ReloadRequest;
    343         }
    344         else if (internalState_ & Calibrating)
     345        if (internalState_ & Calibrating)
    345346            CCOUT(2) << "Warning: Cannot reload input system. Joy sticks are currently being calibrated." << std::endl;
    346347        else
     
    351352    void InputManager::reloadInternal()
    352353    {
    353         CCOUT(3) << "Reloading ..." << std::endl;
     354        CCOUT(4) << "Reloading ..." << std::endl;
    354355
    355356        this->destroyDevices();
     
    357358
    358359        internalState_ &= ~Bad;
    359         internalState_ &= ~ReloadRequest;
    360360        CCOUT(4) << "Reloading complete." << std::endl;
    361361    }
     
    370370        if (internalState_ & Bad)
    371371            ThrowException(General, "InputManager was not correctly reloaded.");
    372 
    373         else if (internalState_ & ReloadRequest)
    374             reloadInternal();
    375 
    376         // check for states to leave
    377         if (!stateLeaveRequests_.empty())
    378         {
    379             for (std::set<InputState*>::iterator it = stateLeaveRequests_.begin();
    380                 it != stateLeaveRequests_.end(); ++it)
    381             {
    382                 (*it)->left();
    383                 // just to be sure that the state actually is registered
    384                 assert(statesByName_.find((*it)->getName()) != statesByName_.end());
    385 
    386                 activeStates_.erase((*it)->getPriority());
    387                 if ((*it)->getPriority() < InputStatePriority::HighPriority)
    388                     (*it)->setPriority(0);
    389                 updateActiveStates();
    390             }
    391             stateLeaveRequests_.clear();
    392         }
    393 
    394         // check for states to enter
    395         if (!stateEnterRequests_.empty())
    396         {
    397             for (std::set<InputState*>::const_iterator it = stateEnterRequests_.begin();
    398                 it != stateEnterRequests_.end(); ++it)
    399             {
    400                 // just to be sure that the state actually is registered
    401                 assert(statesByName_.find((*it)->getName()) != statesByName_.end());
    402 
    403                 if ((*it)->getPriority() == 0)
    404                 {
    405                     // Get smallest possible priority between 1 and maxStateStackSize_s
    406                     for (std::map<int, InputState*>::reverse_iterator rit = activeStates_.rbegin();
    407                         rit != activeStates_.rend(); ++rit)
    408                     {
    409                         if (rit->first < InputStatePriority::HighPriority)
    410                         {
    411                             (*it)->setPriority(rit->first + 1);
    412                             break;
    413                         }
    414                     }
    415                     // In case no normal handler was on the stack
    416                     if ((*it)->getPriority() == 0)
    417                         (*it)->setPriority(1);
    418                 }
    419                 activeStates_[(*it)->getPriority()] = (*it);
    420                 updateActiveStates();
    421                 (*it)->entered();
    422             }
    423             stateEnterRequests_.clear();
    424         }
    425 
    426         // check for states to destroy
    427         if (!stateDestroyRequests_.empty())
    428         {
    429             for (std::set<InputState*>::iterator it = stateDestroyRequests_.begin();
    430                 it != stateDestroyRequests_.end(); ++it)
    431             {
    432                 destroyStateInternal((*it));
    433             }
    434             stateDestroyRequests_.clear();
    435         }
    436372
    437373        // check whether a state has changed its EMPTY situation
     
    448384            updateActiveStates();
    449385
    450         // mark that we now start capturing and distributing input
    451         internalState_ |= Ticking;
    452 
    453         // Capture all the input and handle it
     386        // Capture all the input and collect the function calls
     387        // No event gets triggered here yet!
    454388        BOOST_FOREACH(InputDevice* device, devices_)
    455389            if (device != NULL)
    456390                device->update(time);
    457391
    458         // Update the states
     392        // Collect function calls for the update
    459393        for (unsigned int i = 0; i < activeStatesTicked_.size(); ++i)
    460394            activeStatesTicked_[i]->update(time.getDeltaTime());
    461395
    462         internalState_ &= ~Ticking;
     396        // Execute all cached function calls in order
     397        // Why so complicated? The problem is that an InputHandler could trigger
     398        // a reload that would destroy the OIS devices or it could even leave and
     399        // then destroy its own InputState. That would of course lead to access
     400        // violations.
     401        // If we delay the calls, then OIS and and the InputStates are not anymore
     402        // in the call stack and can therefore be edited.
     403        for (size_t i = 0; i < this->callBuffer_.size(); ++i)
     404            this->callBuffer_[i]();
     405
     406        this->callBuffer_.clear();
    463407    }
    464408
     
    470414    void InputManager::updateActiveStates()
    471415    {
    472         assert((internalState_ & InputManager::Ticking) == 0);
    473         // temporary resize
     416        // Calculate the stack of input states
     417        // and assign it to the corresponding device
    474418        for (unsigned int i = 0; i < devices_.size(); ++i)
    475419        {
     
    490434        }
    491435
    492         // update tickables (every state will only appear once)
    493         // Using a std::set to avoid duplicates
     436        // See that we only update each InputState once for each device
     437        // Using an std::set to avoid duplicates
    494438        std::set<InputState*> tempSet;
    495439        for (unsigned int i = 0; i < devices_.size(); ++i)
     
    498442                    tempSet.insert(devices_[i]->getStateListRef()[iState]);
    499443
    500         // copy the content of the std::set back to the actual vector
     444        // Copy the content of the std::set back to the actual vector
    501445        activeStatesTicked_.clear();
    502446        for (std::set<InputState*>::const_iterator it = tempSet.begin();it != tempSet.end(); ++it)
     
    504448
    505449        // Check whether we have to change the mouse mode
    506         MouseMode::Value requestedMode = MouseMode::Dontcare;
     450        TriBool::Value requestedMode = TriBool::Dontcare;
    507451        std::vector<InputState*>& mouseStates = devices_[InputDeviceEnumerator::Mouse]->getStateListRef();
    508452        if (mouseStates.empty())
    509             requestedMode = MouseMode::Nonexclusive;
    510         else
    511             requestedMode = mouseStates.front()->getMouseMode();
    512         if (requestedMode != MouseMode::Dontcare && mouseMode_ != requestedMode)
    513         {
    514             mouseMode_ = requestedMode;
     453            requestedMode = TriBool::False;
     454        else
     455            requestedMode = mouseStates.front()->getMouseExclusive();
     456        if (requestedMode != TriBool::Dontcare && exclusiveMouse_ != requestedMode)
     457        {
     458            exclusiveMouse_ = requestedMode;
    515459            if (!GraphicsManager::getInstance().isFullScreen())
    516460                this->reloadInternal();
     
    622566        // get pointer from the map with all stored handlers
    623567        std::map<std::string, InputState*>::const_iterator it = statesByName_.find(name);
    624         if (it != statesByName_.end())
    625         {
    626             // exists
    627             if (activeStates_.find(it->second->getPriority()) == activeStates_.end())
    628             {
    629                 // not active
    630                 if (stateDestroyRequests_.find(it->second) == stateDestroyRequests_.end())
     568        if (it != statesByName_.end() && activeStates_.find(it->second->getPriority()) == activeStates_.end())
     569        {
     570            // exists and not active
     571            if (it->second->getPriority() == 0)
     572            {
     573                // Get smallest possible priority between 1 and maxStateStackSize_s
     574                for (std::map<int, InputState*>::reverse_iterator rit = activeStates_.rbegin();
     575                    rit != activeStates_.rend(); ++rit)
    631576                {
    632                     // not scheduled for destruction
    633                     // prevents a state from being added multiple times
    634                     stateEnterRequests_.insert(it->second);
    635                     return true;
     577                    if (rit->first < InputStatePriority::HighPriority)
     578                    {
     579                        it->second->setPriority(rit->first + 1);
     580                        break;
     581                    }
    636582                }
    637             }
    638             else if (this->stateLeaveRequests_.find(it->second) != this->stateLeaveRequests_.end())
    639             {
    640                 // State already scheduled for leaving --> cancel
    641                 this->stateLeaveRequests_.erase(this->stateLeaveRequests_.find(it->second));
    642             }
     583                // In case no normal handler was on the stack
     584                if (it->second->getPriority() == 0)
     585                    it->second->setPriority(1);
     586            }
     587            activeStates_[it->second->getPriority()] = it->second;
     588            updateActiveStates();
     589            it->second->entered();
     590
     591            return true;
    643592        }
    644593        return false;
     
    654603        // get pointer from the map with all stored handlers
    655604        std::map<std::string, InputState*>::const_iterator it = statesByName_.find(name);
    656         if (it != statesByName_.end())
    657         {
    658             // exists
    659             if (activeStates_.find(it->second->getPriority()) != activeStates_.end())
    660             {
    661                 // active
    662                 stateLeaveRequests_.insert(it->second);
    663                 return true;
    664             }
    665             else if (this->stateEnterRequests_.find(it->second) != this->stateEnterRequests_.end())
    666             {
    667                 // State already scheduled for entering --> cancel
    668                 this->stateEnterRequests_.erase(this->stateEnterRequests_.find(it->second));
    669             }
     605        if (it != statesByName_.end() && activeStates_.find(it->second->getPriority()) != activeStates_.end())
     606        {
     607            // exists and active
     608
     609            it->second->left();
     610
     611            activeStates_.erase(it->second->getPriority());
     612            if (it->second->getPriority() < InputStatePriority::HighPriority)
     613                it->second->setPriority(0);
     614            updateActiveStates();
     615
     616            return true;
    670617        }
    671618        return false;
     
    682629        if (it != statesByName_.end())
    683630        {
    684             if (activeStates_.find(it->second->getPriority()) != activeStates_.end())
    685             {
    686                 // The state is still active. We have to postpone
    687                 stateLeaveRequests_.insert(it->second);
    688                 stateDestroyRequests_.insert(it->second);
    689             }
    690             else if (this->internalState_ & Ticking)
    691             {
    692                 // cannot remove state while ticking
    693                 stateDestroyRequests_.insert(it->second);
    694             }
    695             else
    696                 destroyStateInternal(it->second);
     631            this->leaveState(name);
     632            destroyStateInternal(it->second);
    697633
    698634            return true;
     
    704640    void InputManager::destroyStateInternal(InputState* state)
    705641    {
    706         assert(state && !(this->internalState_ & Ticking));
    707         std::map<int, InputState*>::iterator it = this->activeStates_.find(state->getPriority());
    708         if (it != this->activeStates_.end())
    709         {
    710             this->activeStates_.erase(it);
    711             updateActiveStates();
    712         }
     642        assert(state && this->activeStates_.find(state->getPriority()) == this->activeStates_.end());
    713643        statesByName_.erase(state->getName());
    714644        state->destroy();
  • code/trunk/src/libraries/core/input/InputManager.h

    r6417 r6746  
    3636#include <string>
    3737#include <vector>
     38#include <boost/function.hpp>
    3839
    3940#include "util/Singleton.h"
     41#include "util/TriBool.h"
    4042#include "core/WindowEventListener.h"
    41 #include "InputState.h"
    4243
    4344// tolua_begin
     
    7576            Nothing       = 0x00,
    7677            Bad           = 0x02,
    77             Ticking       = 0x04,
    78             Calibrating   = 0x08,
    79             ReloadRequest = 0x10,
     78            Calibrating   = 0x04,
    8079        };
    8180
     
    159158            - The removal process is being postponed if InputManager::preUpdate() is currently running.
    160159        */
    161         bool destroyState(const std::string& name);
     160        bool destroyState(const std::string& name); // tolua_export
    162161
    163162        //-------------------------------
     
    169168        //! Returns a pointer to the OIS InputManager. Only you if you know what you're doing!
    170169        OIS::InputManager* getOISInputManager() { return this->oisInputManager_; }
     170        //! Returns the position of the cursor as std::pair of ints
    171171        std::pair<int, int> getMousePosition() const;
     172        //! Tells whether the mouse is used exclusively to the game
     173        bool isMouseExclusive() const { return this->exclusiveMouse_; } // tolua_export
     174
     175        //-------------------------------
     176        // Function call caching
     177        //-------------------------------
     178        void pushCall(const boost::function<void ()>& function)
     179            { this->callBuffer_.push_back(function); }
    172180
    173181        static InputManager& getInstance() { return Singleton<InputManager>::getInstance(); } // tolua_export
     
    196204        OIS::InputManager*                  oisInputManager_;      //!< OIS input manager
    197205        std::vector<InputDevice*>           devices_;              //!< List of all input devices (keyboard, mouse, joy sticks)
    198         MouseMode::Value                    mouseMode_;            //!< Currently applied mouse mode
     206        TriBool::Value                      exclusiveMouse_;       //!< Currently applied mouse mode
    199207
    200208        // some internally handled states and handlers
     
    207215        std::vector<InputState*>            activeStatesTicked_;   //!< Like activeStates_, but only contains the ones that currently receive events
    208216
    209         std::set<InputState*>               stateEnterRequests_;   //!< Requests to enter a new state
    210         std::set<InputState*>               stateLeaveRequests_;   //!< Requests to leave a running state
    211         std::set<InputState*>               stateDestroyRequests_; //!< Requests to destroy a state
     217        std::vector<boost::function<void ()> > callBuffer_;        //!< Caches all calls from InputStates to be executed afterwards (see preUpdate)
    212218
    213219        static InputManager*                singletonPtr_s;        //!< Pointer reference to the singleton
  • code/trunk/src/libraries/core/input/InputPrereqs.h

    r6417 r6746  
    4242#include <ois/OISMouse.h>
    4343#include <ois/OISJoyStick.h>
     44#include "util/OrxEnum.h"
    4445
    4546namespace orxonox
     
    448449        };
    449450    }
     451
     452    //! Enumeration wrapper for input state priorities
     453    struct InputStatePriority : OrxEnum<InputStatePriority>
     454    {
     455        OrxEnumConstructors(InputStatePriority);
     456
     457        static const int Empty        = -1;
     458        static const int Dynamic      = 0;
     459
     460        static const int HighPriority = 1000;
     461        static const int Console      = HighPriority + 0;
     462        static const int Calibrator   = HighPriority + 1;
     463        static const int Detector     = HighPriority + 2;
     464    };
    450465}
    451466
  • code/trunk/src/libraries/core/input/InputState.cc

    r6417 r6746  
    3737        , bAlwaysGetsInput_(bAlwaysGetsInput)
    3838        , bTransparent_(bTransparent)
    39         , mouseMode_(MouseMode::Dontcare)
     39        , exclusiveMouse_(TriBool::Dontcare)
    4040        , bExpired_(true)
    4141        , handlers_(2)
  • code/trunk/src/libraries/core/input/InputState.h

    r5929 r6746  
    3535#include <string>
    3636#include <vector>
    37 
    38 #include "util/OrxEnum.h"
     37#include <boost/function.hpp>
     38#include <boost/bind.hpp>
     39
     40#include "util/TriBool.h"
    3941#include "InputHandler.h"
     42#include "InputManager.h"
    4043#include "JoyStickQuantityListener.h"
     44
     45#define INPUT_STATE_PUSH_CALL(deviceIndex, functionName, ...) \
     46    InputManager::getInstance().pushCall(boost::function<void ()>(boost::bind(&InputHandler::functionName, handlers_[deviceIndex], __VA_ARGS__)))
    4147
    4248namespace orxonox
    4349{
    44     //! Enumeration wrapper for input state priorities
    45     struct InputStatePriority : OrxEnum<InputStatePriority>
    46     {
    47         OrxEnumConstructors(InputStatePriority);
    48 
    49         static const int Empty        = -1;
    50         static const int Dynamic      = 0;
    51 
    52         static const int HighPriority = 1000;
    53         static const int Console      = HighPriority + 0;
    54         static const int Calibrator   = HighPriority + 1;
    55         static const int Detector     = HighPriority + 2;
    56     };
    57 
    58     namespace MouseMode
    59     {
    60         enum Value
    61         {
    62             Exclusive,
    63             Nonexclusive,
    64             Dontcare
    65         };
    66     }
    67 
    6850    /**
    6951    @brief
     
    7355        that stack and only the top one gets the input events. This is done for
    7456        every device (keyboard, mouse, all joy sticks) separately to allow
    75         for intance keyboard input capturing for the console while you can still
     57        for instance keyboard input capturing for the console while you can still
    7658        steer a ship with the mouse.
    7759        There are two exceptions to this behaviour though:
     
    8365          the state will always receive input as long as it is activated.
    8466        - Note: If you mark an InputState with both parameters on, then it will
    85           not influence ony other InputState at all.
     67          not influence only other InputState at all.
    8668
    8769    @par Priorities
     
    9577    @par Exclusive/Non-Exclusive mouse Mode
    9678        You can select a specific mouse mode that tells whether the application
    97         should have exclusive accessto it or not.
     79        should have exclusive access to it or not.
    9880        When in non-exclusive mode, you can move the mouse out of the window
    9981        like with any other normal window (only for windowed mode!).
     
    130112        void setHandler        (InputHandler* handler);
    131113
    132         void setMouseMode(MouseMode::Value value) { mouseMode_ = value; this->bExpired_ = true; }
    133         MouseMode::Value getMouseMode() const { return mouseMode_; }
     114        void setMouseExclusive(TriBool::Value value) { exclusiveMouse_ = value; this->bExpired_ = true; }
     115        TriBool::Value getMouseExclusive() const { return exclusiveMouse_; }
    134116
    135117        //! Returns the name of the state (which is unique!)
     
    152134
    153135        //! Generic function that distributes all 9 button events
    154         template <typename EventType, class Traits>
    155         void buttonEvent(unsigned int device, const typename Traits::ButtonTypeParam button);
     136        template <typename EventType, class ButtonTypeParam>
     137        void buttonEvent(unsigned int device, ButtonTypeParam button);
    156138
    157139        //! Event handler
     
    184166        const bool                  bAlwaysGetsInput_;      //!< See class declaration for explanation
    185167        const bool                  bTransparent_;          //!< See class declaration for explanation
    186         MouseMode::Value            mouseMode_;             //!< See class declaration for explanation
     168        TriBool::Value              exclusiveMouse_;        //!< See class declaration for explanation
    187169        int                         priority_;              //!< Current priority (might change)
    188170        bool                        bExpired_;              //!< See hasExpired()
     
    198180        for (unsigned int i = 0; i < handlers_.size(); ++i)
    199181            if (handlers_[i] != NULL)
    200                 handlers_[i]->allDevicesUpdated(dt);
     182                INPUT_STATE_PUSH_CALL(i, allDevicesUpdated, dt);
    201183    }
    202184
     
    207189        case InputDeviceEnumerator::Keyboard:
    208190            if (handlers_[keyboardIndex_s] != NULL)
    209                 handlers_[keyboardIndex_s]->keyboardUpdated(dt);
     191                INPUT_STATE_PUSH_CALL(keyboardIndex_s, keyboardUpdated, dt);
    210192            break;
    211193
    212194        case InputDeviceEnumerator::Mouse:
    213195            if (handlers_[mouseIndex_s] != NULL)
    214                 handlers_[mouseIndex_s]->mouseUpdated(dt);
     196                INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseUpdated, dt);
    215197            break;
    216198
    217199        default: // joy sticks
    218200            if (handlers_[device] != NULL)
    219                 handlers_[device]->joyStickUpdated(device - firstJoyStickIndex_s, dt);
     201                INPUT_STATE_PUSH_CALL(device, joyStickUpdated, device - firstJoyStickIndex_s, dt);
    220202            break;
    221203        }
    222204    }
    223205
    224     template <typename EventType, class Traits>
    225     FORCEINLINE void InputState::buttonEvent(unsigned int device, const typename Traits::ButtonTypeParam button)
     206    template <typename EventType, class ButtonTypeParam>
     207    FORCEINLINE void InputState::buttonEvent(unsigned int device, ButtonTypeParam button)
    226208    {
    227209        assert(device < handlers_.size());
    228210        if (handlers_[device] != NULL)
    229             handlers_[device]->buttonEvent(device, button, EventType());
     211        {
     212            // We have to store the function pointer to tell the compiler about its actual type because of overloading
     213            void (InputHandler::*function)(unsigned int, ButtonTypeParam, EventType) = &InputHandler::buttonEvent<ButtonTypeParam>;
     214            InputManager::getInstance().pushCall(boost::function<void ()>(boost::bind(function, handlers_[device], device, button, EventType())));
     215        }
    230216    }
    231217
     
    233219    {
    234220        if (handlers_[mouseIndex_s] != NULL)
    235             handlers_[mouseIndex_s]->mouseMoved(abs, rel, clippingSize);
     221            INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseMoved, abs, rel, clippingSize);
    236222    }
    237223
     
    239225    {
    240226        if (handlers_[mouseIndex_s] != NULL)
    241             handlers_[mouseIndex_s]->mouseScrolled(abs, rel);
     227            INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseScrolled, abs, rel);
    242228    }
    243229
     
    246232        assert(device < handlers_.size());
    247233        if (handlers_[device] != NULL)
    248             handlers_[device]->axisMoved(device - firstJoyStickIndex_s, axis, value);
     234            INPUT_STATE_PUSH_CALL(device, axisMoved, device - firstJoyStickIndex_s, axis, value);
    249235    }
    250236}
  • code/trunk/src/libraries/network/TrafficControl.h

    r6417 r6746  
    3434#include <list>
    3535#include <map>
    36 #include "network/ClientConnectionListener.h"
     36#include "ClientConnectionListener.h"
    3737
    3838namespace orxonox {
  • code/trunk/src/libraries/util/Serialise.h

    r6417 r6746  
    3535#define _Serialise_H__
    3636
     37#include "UtilPrereqs.h"
     38
    3739#include <cstring>
    38 #include "util/Math.h"
    39 #include "util/mbool.h"
     40#include "Math.h"
     41#include "mbool.h"
    4042
    4143namespace orxonox{
  • code/trunk/src/libraries/util/Singleton.h

    r6536 r6746  
    4949    public:
    5050        //! Returns a reference to the singleton instance
    51         static T& getInstance()
     51        FORCEINLINE static T& getInstance()
    5252        {
    5353            assert(T::singletonPtr_s != NULL);
     
    5656
    5757        //! Tells whether the singleton has been created
    58         static bool exists()
     58        FORCEINLINE static bool exists()
    5959        {
    6060            return (T::singletonPtr_s != NULL);
     
    6262
    6363        //! Update method called by ClassSingletonManager (if used)
    64         void preUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->preUpdate(time); }
     64        FORCEINLINE void preUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->preUpdate(time); }
    6565        //! Empty update method for the static polymorphism
    66         void preUpdate(const Clock& time) { }
     66        FORCEINLINE void preUpdate(const Clock& time) { }
    6767        //! Update method called by ClassSingletonManager (if used)
    68         void postUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->postUpdate(time); }
     68        FORCEINLINE void postUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->postUpdate(time); }
    6969        //! Empty update method for the static polymorphism
    70         void postUpdate(const Clock& time) { }
     70        FORCEINLINE void postUpdate(const Clock& time) { }
    7171
    7272    protected:
  • code/trunk/src/modules/pickup/PickupManager.cc

    r6728 r6746  
    152152    PickupCarrier* PickupManager::getPawn(void)
    153153    {
    154         Pawn* pawn = dynamic_cast<Pawn*>(GUIManager::getInstancePtr()->getPlayer(PickupManager::guiName_s)->getControllableEntity());
     154        Pawn* pawn = dynamic_cast<Pawn*>(GUIManager::getInstance().getPlayer(PickupManager::guiName_s)->getControllableEntity());
    155155        if(pawn == NULL)
    156156            return NULL;
  • code/trunk/src/modules/questsystem/QuestGUI.cc

    r6417 r6746  
    109109
    110110        //! Create root window.
    111         this->rootWindow_ = this->windowManager_->createWindow("TaharezLook/ScrollablePane", "QuestGUI/Quests");
     111        this->rootWindow_ = this->windowManager_->createWindow("MenuWidgets/ScrollablePane", "QuestGUI/Quests");
    112112        this->rootWindow_->setSize(CEGUI::UVector2(CEGUI::UDim(1, 0),CEGUI::UDim(1, 0)));
    113113
     
    161161        Get a CEGUI Window to use.
    162162        Windows that are no longer used are collected with giveWindow, and are given out again with getWindow, so save some time recreating new windows everytime.
    163         The retreived window is of type "TaharezLook/TabButton".
    164     @return
    165         Returns a CEGUI Window of type "TaharezLook/TabButton".
     163        The retreived window is of type "MenuWidgets/TabButton".
     164    @return
     165        Returns a CEGUI Window of type "MenuWidgets/TabButton".
    166166    */
    167167    CEGUI::Window* QuestGUI::getWindow(void)
     
    177177        std::ostringstream stream;
    178178        stream << "QuestGUI/Quests/EmptyWindows/" << this->windows_.size()+1;
    179         return this->windowManager_->createWindow("TaharezLook/TabButton", stream.str());
     179        return this->windowManager_->createWindow("MenuWidgets/TabButton", stream.str());
    180180    }
    181181
  • code/trunk/src/modules/questsystem/QuestGUINode.cc

    r6502 r6746  
    160160            stream << this->window_->getName() << "/Details";
    161161            const QuestDescription* description = this->item_->getDescription();
    162             this->details_ = this->gui_->getWindowManager()->createWindow("TaharezLook/FrameWindow", stream.str());
     162            this->details_ = this->gui_->getWindowManager()->createWindow("MenuWidgets/FrameWindow", stream.str());
    163163            this->details_->setSize(CEGUI::UVector2(CEGUI::UDim(0.7f, 0),CEGUI::UDim(0.7f, 0)));
    164164            this->details_->setPosition(CEGUI::UVector2(CEGUI::UDim(0.1f, 0),CEGUI::UDim(0.1f, 0)));
     
    171171            //! Create a ScrollablePane.
    172172            stream << "/Scrollable";
    173             CEGUI::Window* window = this->gui_->getWindowManager()->createWindow("TaharezLook/ScrollablePane", stream.str());
     173            CEGUI::Window* window = this->gui_->getWindowManager()->createWindow("MenuWidgets/ScrollablePane", stream.str());
    174174            window->setSize(CEGUI::UVector2(CEGUI::UDim(1.0, -2*QuestGUINode::BORDER_WIDTH),CEGUI::UDim(1.0, -QuestGUINode::TITLE_HEIGHT)));
    175175            window->setPosition(CEGUI::UVector2(CEGUI::UDim(0, (float)QuestGUINode::BORDER_WIDTH),CEGUI::UDim(0, (float)QuestGUINode::TITLE_HEIGHT)));
     
    185185                stream.str("");
    186186                stream << this->details_->getName() << "/Status";
    187                 CEGUI::Window* statusWindow = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
     187                CEGUI::Window* statusWindow = this->gui_->getWindowManager()->createWindow("MenuWidgets/StaticText", stream.str());
    188188                window->addChildWindow(statusWindow);
    189189                std::string status;
     
    214214            stream << this->details_->getName() << "/Description";
    215215            stream << "/Title";
    216             CEGUI::Window* descriptionWindowTitle = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
     216            CEGUI::Window* descriptionWindowTitle = this->gui_->getWindowManager()->createWindow("MenuWidgets/StaticText", stream.str());
    217217            window->addChildWindow(descriptionWindowTitle);
    218218            descriptionWindowTitle->setProperty("HorzFormatting", "HorzCentred");
     
    227227            stream.str("");
    228228            stream << this->details_->getName() << "/Description";
    229             CEGUI::Window* descriptionWindow = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
     229            CEGUI::Window* descriptionWindow = this->gui_->getWindowManager()->createWindow("MenuWidgets/StaticText", stream.str());
    230230            window->addChildWindow(descriptionWindow);
    231231            descriptionWindow->setProperty("HorzFormatting", "WordWrapLeftAligned");
     
    250250                            stream.str("");
    251251                            stream << this->details_->getName() << "/Hints/Title";
    252                             CEGUI::Window* hintsTitle = this->gui_->getWindowManager()->createWindow("TaharezLook/StaticText", stream.str());
     252                            CEGUI::Window* hintsTitle = this->gui_->getWindowManager()->createWindow("MenuWidgets/StaticText", stream.str());
    253253                            window->addChildWindow(hintsTitle);
    254254                            hintsTitle->setProperty("HorzFormatting", "HorzCentred");
  • code/trunk/src/orxonox/CameraManager.h

    r5929 r6746  
    6161            void useCamera(Ogre::Camera* camera);
    6262
    63             static CameraManager* getInstancePtr() { return singletonPtr_s; }
    64 
    6563        private:
    6664            CameraManager(const CameraManager&); // don't use
  • code/trunk/src/orxonox/Level.cc

    r6417 r6746  
    5858        if (this->isInitialized())
    5959        {
    60             if (LevelManager::getInstancePtr())
     60            if (LevelManager::exists())
    6161                LevelManager::getInstance().releaseActivity(this);
    6262
     
    116116            (*it)->setGametype(rootgametype);
    117117
    118         if (LevelManager::getInstancePtr())
     118        if (LevelManager::exists())
    119119            LevelManager::getInstance().requestActivity(this);
    120120    }
  • code/trunk/src/orxonox/LevelManager.h

    r6417 r6746  
    6262            const std::string& getAvailableLevelListItem(unsigned int index) const; //tolua_export
    6363
    64             static LevelManager* getInstancePtr() { return singletonPtr_s; }
    6564            static LevelManager& getInstance()    { return Singleton<LevelManager>::getInstance(); } // tolua_export
    6665
  • code/trunk/src/orxonox/PlayerManager.cc

    r6417 r6746  
    6666            this->clients_[clientID] = player;
    6767
    68             if (LevelManager::getInstancePtr() && LevelManager::getInstance().getActiveLevel())
     68            if (LevelManager::exists() && LevelManager::getInstance().getActiveLevel())
    6969                LevelManager::getInstance().getActiveLevel()->playerEntered(player);
    7070        }
     
    8282            this->clients_.erase(clientID);
    8383
    84             if (LevelManager::getInstancePtr() && LevelManager::getInstance().getActiveLevel())
     84            if (LevelManager::exists() && LevelManager::getInstance().getActiveLevel())
    8585                LevelManager::getInstance().getActiveLevel()->playerLeft(player);
    8686
  • code/trunk/src/orxonox/gamestates/GSLevel.cc

    r6417 r6746  
    6969        {
    7070            gameInputState_ = InputManager::getInstance().createInputState("game");
    71             gameInputState_->setMouseMode(MouseMode::Exclusive);
     71            gameInputState_->setMouseExclusive(TriBool::True);
    7272            gameInputState_->setHandler(KeyBinderManager::getInstance().getDefaultAsHandler());
    7373            KeyBinderManager::getInstance().setToDefault();
    7474
    7575            guiMouseOnlyInputState_ = InputManager::getInstance().createInputState("guiMouseOnly");
    76             guiMouseOnlyInputState_->setMouseMode(MouseMode::Exclusive);
    77             guiMouseOnlyInputState_->setMouseHandler(GUIManager::getInstancePtr());
     76            guiMouseOnlyInputState_->setMouseExclusive(TriBool::True);
     77            guiMouseOnlyInputState_->setMouseHandler(&GUIManager::getInstance());
    7878
    7979            guiKeysOnlyInputState_ = InputManager::getInstance().createInputState("guiKeysOnly");
    80             guiKeysOnlyInputState_->setKeyHandler(GUIManager::getInstancePtr());
     80            guiKeysOnlyInputState_->setKeyHandler(&GUIManager::getInstance());
    8181        }
    8282
  • code/trunk/src/orxonox/gamestates/GSMainMenu.cc

    r6417 r6746  
    3131#include <OgreSceneManager.h>
    3232
    33 #include "core/input/InputManager.h"
    34 #include "core/input/InputState.h"
    3533#include "core/input/KeyBinderManager.h"
    3634#include "core/Game.h"
     
    4240#include "Scene.h"
    4341#include "sound/AmbientSound.h"
     42// HACK
     43#include "core/input/InputManager.h"
     44#include "core/input/InputState.h"
    4445
    4546namespace orxonox
     
    4950    GSMainMenu::GSMainMenu(const GameStateInfo& info)
    5051        : GameState(info)
    51         , inputState_(0)
    5252    {
    5353        RegisterRootObject(GSMainMenu);
    54         inputState_ = InputManager::getInstance().createInputState("mainMenu");
    55         inputState_->setMouseMode(MouseMode::Nonexclusive);
    56         inputState_->setHandler(GUIManager::getInstancePtr());
    57         inputState_->setKeyHandler(KeyBinderManager::getInstance().getDefaultAsHandler());
    58         inputState_->setJoyStickHandler(&InputHandler::EMPTY);
     54
     55        InputManager::getInstance().createInputState("MainMenuHackery")->setKeyHandler(KeyBinderManager::getInstance().getDefaultAsHandler());
    5956
    6057        // create an empty Scene
     
    7673            this->ambient_->destroy();
    7774
    78         InputManager::getInstance().destroyState("mainMenu");
     75        InputManager::getInstance().destroyState("MainMenuHackery");
    7976
    8077        this->scene_->getSceneManager()->destroyCamera(this->camera_);
     
    8582    {
    8683        // show main menu
    87         GUIManager::getInstance().showGUI("MainMenu", true, GraphicsManager::getInstance().isFullScreen());
     84        GUIManager::getInstance().showGUI("MainMenu", true);
    8885        GUIManager::getInstance().setCamera(this->camera_);
    89         GUIManager::getInstance().setBackground("MainMenuBackground");
    90 //         GUIManager::getInstance().setBackground("");
     86        GUIManager::getInstance().setBackgroundImage("MainMenuBackground", "Background");
    9187        GraphicsManager::getInstance().setCamera(this->camera_);
     88
     89        InputManager::getInstance().enterState("MainMenuHackery");
    9290
    9391        CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSMainMenu::startStandalone), "startGame"));
     
    10199
    102100        KeyBinderManager::getInstance().setToDefault();
    103         InputManager::getInstance().enterState("mainMenu");
    104101
    105102        this->setConfigValues();
     
    119116        }
    120117
    121         InputManager::getInstance().leaveState("mainMenu");
     118        InputManager::getInstance().leaveState("MainMenuHackery");
    122119
    123120        GUIManager::getInstance().setCamera(0);
    124         GUIManager::getInstance().setBackground("");
     121        GUIManager::getInstance().setBackgroundImage("");
    125122        GUIManager::hideGUI("MainMenu");
    126123        GraphicsManager::getInstance().setCamera(0);
  • code/trunk/src/orxonox/gamestates/GSMainMenu.h

    r6417 r6746  
    6161
    6262    private:
    63         InputState*       inputState_;
    6463        Scene*            scene_;
    6564        Ogre::Camera*     camera_;
  • code/trunk/src/orxonox/overlays/CMakeLists.txt

    r5929 r6746  
    11ADD_SOURCE_FILES(ORXONOX_SRC_FILES
     2  GUISheet.cc
    23  OrxonoxOverlay.cc
    34  OverlayGroup.cc
Note: See TracChangeset for help on using the changeset viewer.