Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 24, 2018, 1:05:32 AM (7 years ago)
Author:
landauf
Message:

updated Settings.lua and all sub-menus to cegui 0.8

Location:
code/branches/cegui0.8_ogre1.9/data/gui
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cegui0.8_ogre1.9/data/gui/layouts/AudioMenu.layout

    r11793 r11800  
    3333                    <Event function="AudioMenu.AudioMasterScrollbar_started" name="ThumbTrackStarted" />
    3434                    <Event function="AudioMenu.AudioMasterScrollbar_ended" name="ThumbTrackEnded" />
    35                     <Event function="AudioMenu.AudioMasterScrollbar_changed" name="ScrollPosChanged" />
     35                    <Event function="AudioMenu.AudioMasterScrollbar_changed" name="ScrollPositionChanged" />
    3636                </Window>
    3737                <Window name="MasterCheckbox" type="MenuWidgets/Checkbox">
     
    3939                    <Property name="MaxSize" value="{{1,0},{1,0}}" />
    4040                    <Property name="Area" value="{{0.775,0},{0.45,0},{0.96,0},{0.9,0}}" />
    41                     <Event function="AudioMenu.AudioMuteMasterCheckbox_clicked" name="CheckStateChanged" />
     41                    <Event function="AudioMenu.AudioMuteMasterCheckbox_clicked" name="SelectStateChanged" />
    4242                </Window>
    4343            </Window>
     
    6060                    <Event function="AudioMenu.AudioMusicScrollbar_started" name="ThumbTrackStarted" />
    6161                    <Event function="AudioMenu.AudioMusicScrollbar_ended" name="ThumbTrackEnded" />
    62                     <Event function="AudioMenu.AudioMusicScrollbar_changed" name="ScrollPosChanged" />
     62                    <Event function="AudioMenu.AudioMusicScrollbar_changed" name="ScrollPositionChanged" />
    6363                </Window>
    6464                <Window name="MusicCheckbox" type="MenuWidgets/Checkbox">
     
    6666                    <Property name="MaxSize" value="{{1,0},{1,0}}" />
    6767                    <Property name="Area" value="{{0.775,0},{0.45,0},{0.96,0},{0.9,0}}" />
    68                     <Event function="AudioMenu.AudioMuteMusicCheckbox_clicked" name="CheckStateChanged" />
     68                    <Event function="AudioMenu.AudioMuteMusicCheckbox_clicked" name="SelectStateChanged" />
    6969                </Window>
    7070            </Window>
     
    8787                    <Event function="AudioMenu.AudioEffectsScrollbar_started" name="ThumbTrackStarted" />
    8888                    <Event function="AudioMenu.AudioEffectsScrollbar_ended" name="ThumbTrackEnded" />
    89                     <Event function="AudioMenu.AudioEffectsScrollbar_changed" name="ScrollPosChanged" />
     89                    <Event function="AudioMenu.AudioEffectsScrollbar_changed" name="ScrollPositionChanged" />
    9090                </Window>
    9191                <Window name="EffectsCheckbox" type="MenuWidgets/Checkbox">
     
    9393                    <Property name="MaxSize" value="{{1,0},{1,0}}" />
    9494                    <Property name="Area" value="{{0.775,0},{0.45,0},{0.96,0},{0.9,0}}" />
    95                     <Event function="AudioMenu.AudioMuteEffectsCheckbox_clicked" name="CheckStateChanged" />
     95                    <Event function="AudioMenu.AudioMuteEffectsCheckbox_clicked" name="SelectStateChanged" />
    9696                </Window>
    9797            </Window>
     
    106106                    <Property name="MaxSize" value="{{1,0},{1,0}}" />
    107107                    <Property name="Area" value="{{0.05,0},{0.225,0},{0.95,0},{0.92,0}}" />
    108                     <Event function="AudioMenu.AudioThemeListbox_changed" name="ItemSelectionChanged" />
     108                    <Event function="AudioMenu.AudioThemeListbox_changed" name="SelectionChanged" />
    109109                </Window>
    110110            </Window>
  • code/branches/cegui0.8_ogre1.9/data/gui/layouts/GraphicsMenu.layout

    r11793 r11800  
    3434                            <Property name="MaxSize" value="{{1,0},{1,0}}" />
    3535                            <Property name="Area" value="{{0.05,0},{0.15,0},{0.95,0},{0.27,0}}" />
    36                             <Event function="GraphicsMenu.callback_FullscreenCheckbox_CheckStateChanged" name="CheckStateChanged" />
     36                            <Event function="GraphicsMenu.callback_FullscreenCheckbox_SelectStateChanged" name="SelectStateChanged" />
    3737                        </Window>
    3838                        <Window name="Combobox" type="MenuWidgets/Combobox">
     
    4040                            <Property name="ClippedByParent" value="False" />
    4141                            <Property name="Area" value="{{0.05,0},{0.3,0},{0.95,0},{1.2,0}}" />
    42                             <Property name="MaxEditTextLength" value="1073741823" />
    4342                            <Event function="GraphicsMenu.callback_ResolutionCombobox_ListSelectionAccepted" name="ListSelectionAccepted" />
    4443                        </Window>
     
    9392                            <Property name="ClippedByParent" value="False" />
    9493                            <Property name="Area" value="{{0.05,0},{0.5,0},{0.95,0},{1.6,0}}" />
    95                             <Property name="MaxEditTextLength" value="1073741823" />
    9694                            <Event function="GraphicsMenu.callback_ThemeCombobox_ListSelectionAccepted" name="ListSelectionAccepted" />
    9795                        </Window>
     
    104102                            <Property name="MaxSize" value="{{1,0},{1,0}}" />
    105103                            <Property name="Area" value="{{0.05,0},{0.1,0},{0.95,0},{0.45,0}}" />
    106                             <Event function="GraphicsMenu.callback_VSyncCheckbox_CheckStateChanged" name="CheckStateChanged" />
     104                            <Event function="GraphicsMenu.callback_VSyncCheckbox_SelectStateChanged" name="SelectStateChanged" />
    107105                        </Window>
    108106                        <Window name="FSAALabel" type="MenuWidgets/StaticText">
     
    117115                            <Property name="ClippedByParent" value="False" />
    118116                            <Property name="Area" value="{{0.3,0},{0.55,0},{0.95,0},{2.1,0}}" />
    119                             <Property name="MaxEditTextLength" value="1073741823" />
    120117                            <Event function="GraphicsMenu.callback_FSAACombobox_ListSelectionAccepted" name="ListSelectionAccepted" />
    121118                        </Window>
     
    178175                        <Property name="ClippedByParent" value="False" />
    179176                        <Property name="Area" value="{{0.5,0},{0.29,0},{0.7,0},{0.725,0}}" />
    180                         <Property name="MaxEditTextLength" value="1073741823" />
    181177                    </Window>
    182178                    <Window name="MeshLodCheckbox" type="MenuWidgets/Checkbox">
  • code/branches/cegui0.8_ogre1.9/data/gui/layouts/KeyBindMenu.layout

    r11793 r11800  
    11<?xml version='1.0' encoding='utf-8'?>
    22<GUILayout version="4">
    3     <Window name="Background" type="DefaultWindow">
     3    <Window name="KeyBindBackground" type="DefaultWindow">
    44        <Property name="InheritsAlpha" value="False" />
    55        <Property name="MaxSize" value="{{1,0},{1,0}}" />
  • code/branches/cegui0.8_ogre1.9/data/gui/layouts/MiscConfigMenu.layout

    r11793 r11800  
    11<?xml version='1.0' encoding='utf-8'?>
    22<GUILayout version="4">
    3     <Window name="Background" type="MenuWidgets/StaticImage">
     3    <Window name="MiscConfigBackground" type="MenuWidgets/StaticImage">
    44        <Property name="FrameEnabled" value="False" />
    55        <Property name="InheritsAlpha" value="False" />
  • code/branches/cegui0.8_ogre1.9/data/gui/layouts/MouseControlsMenu.layout

    r11793 r11800  
    3333                    <Event function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_started" name="ThumbTrackStarted" />
    3434                    <Event function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_ended" name="ThumbTrackEnded" />
    35                     <Event function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_changed" name="ScrollPosChanged" />
     35                    <Event function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_changed" name="ScrollPositionChanged" />
    3636                </Window>
    3737                <Window name="MouseNormalButton" type="MenuWidgets/RadioButton">
     
    6060                    <Event function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_started" name="ThumbTrackStarted" />
    6161                    <Event function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_ended" name="ThumbTrackEnded" />
    62                     <Event function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_changed" name="ScrollPosChanged" />
     62                    <Event function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_changed" name="ScrollPositionChanged" />
    6363                </Window>
    6464                <Window name="MouseDeriveButton" type="MenuWidgets/RadioButton">
     
    7474                <Property name="MaxSize" value="{{1,0},{1,0}}" />
    7575                <Property name="Area" value="{{0.39,0},{0.85,0},{0.61,0},{0.95,0}}" />
    76                 <Event function="MouseControlsMenu.MouseInvertCheckbox_clicked" name="CheckStateChanged" />
     76                <Event function="MouseControlsMenu.MouseInvertCheckbox_clicked" name="SelectStateChanged" />
    7777            </Window>
    7878        </Window>
  • code/branches/cegui0.8_ogre1.9/data/gui/layouts/SettingsMenu.layout

    r11793 r11800  
    11<?xml version='1.0' encoding='utf-8'?>
    22<GUILayout version="4">
    3     <Window name="Background" type="MenuWidgets/StaticImage">
     3    <Window name="SettingsBackground" type="MenuWidgets/StaticImage">
    44        <Property name="InheritsAlpha" value="False" />
    55        <Property name="FrameEnabled" value="False" />
  • code/branches/cegui0.8_ogre1.9/data/gui/scripts/AudioMenu.lua

    r11795 r11800  
    1515    musicmute = soundMgr:getMute(orxonox.SoundType.Music)
    1616    effectsmute = soundMgr:getMute(orxonox.SoundType.Effects)
    17     masterscrollbarwindow = tolua.cast(winMgr:getWindow("orxonox/MasterScrollbar"),"CEGUI::Scrollbar")
    18     musicscrollbarwindow = tolua.cast(winMgr:getWindow("orxonox/MusicScrollbar"),"CEGUI::Scrollbar")
    19     effectsscrollbarwindow = tolua.cast(winMgr:getWindow("orxonox/EffectsScrollbar"),"CEGUI::Scrollbar")
    20     mastermutewindow = tolua.cast(winMgr:getWindow("orxonox/MasterCheckbox"),"CEGUI::Checkbox")
    21     musicmutewindow = tolua.cast(winMgr:getWindow("orxonox/MusicCheckbox"),"CEGUI::Checkbox")
    22     effectsmutewindow = tolua.cast(winMgr:getWindow("orxonox/EffectsCheckbox"),"CEGUI::Checkbox")
     17    masterscrollbarwindow = tolua.cast(P.window:getChild("AudioWindow/MasterVolume/MasterScrollbar"),"CEGUI::Scrollbar")
     18    musicscrollbarwindow = tolua.cast(P.window:getChild("AudioWindow/MusicVolume/MusicScrollbar"),"CEGUI::Scrollbar")
     19    effectsscrollbarwindow = tolua.cast(P.window:getChild("AudioWindow/EffectsVolume/EffectsScrollbar"),"CEGUI::Scrollbar")
     20    mastermutewindow = tolua.cast(P.window:getChild("AudioWindow/MasterVolume/MasterCheckbox"),"CEGUI::ToggleButton")
     21    musicmutewindow = tolua.cast(P.window:getChild("AudioWindow/MusicVolume/MusicCheckbox"),"CEGUI::ToggleButton")
     22    effectsmutewindow = tolua.cast(P.window:getChild("AudioWindow/EffectsVolume/EffectsCheckbox"),"CEGUI::ToggleButton")
    2323    masterscrollbarwindow:setScrollPosition(mastervolume)
    2424    musicscrollbarwindow:setScrollPosition(musicvolume)
     
    2828    effectsmutewindow:setSelected(effectsmute)
    2929    choice = "Default"
    30     listboxwindow = winMgr:getWindow("orxonox/AudioThemeListbox")
     30    listboxwindow = P.window:getChild("AudioWindow/AudioTheme/AudioThemeListbox")
    3131    local themeList = {}
    3232    table.insert(themeList, "Default")
     
    5353
    5454    P:setButton(1, 1, {
    55             ["button"] = winMgr:getWindow("orxonox/AudioBackButton"),
     55            ["button"] = P.window:getChild("AudioBackButton"),
    5656            ["callback"]  = P.AudioBackButton_clicked
    5757    })
  • code/branches/cegui0.8_ogre1.9/data/gui/scripts/ControlsMenu.lua

    r8079 r11800  
    99    --buttons are arranged in a 3x1 matrix:
    1010    P:setButton(1, 1, {
    11             ["button"] = winMgr:getWindow("orxonox/MouseControlsButton"),
     11            ["button"] = P.window:getChild("ControlsWindow/MouseControlsButton"),
    1212            ["callback"]  = P.ControlsMouseControlsButton_clicked
    1313    })
    1414
    1515    P:setButton(2, 1, {
    16             ["button"] = winMgr:getWindow("orxonox/KeybindingsButton"),
     16            ["button"] = P.window:getChild("ControlsWindow/KeybindingsButton"),
    1717            ["callback"]  = P.ControlsKeyboardControlsButton_clicked
    1818    })
    1919
    2020    P:setButton(3, 1, {
    21             ["button"] = winMgr:getWindow("orxonox/ControlsBackButton"),
     21            ["button"] = P.window:getChild("ControlsBackButton"),
    2222            ["callback"]  = P.ControlsBackButton_clicked
    2323    })
  • code/branches/cegui0.8_ogre1.9/data/gui/scripts/DecisionPopup.lua

    r8079 r11800  
    77    --button are arranged in a 1x2 matrix
    88    P:setButton(1, 1, {
    9             ["button"] = winMgr:getWindow("orxonox/DecisionPopup_button_yes"),
     9            ["button"] = P.window:getChild("DecisionPopup_Background/DecisionPopup_button_yes"),
    1010            ["callback"]  = P.button_yes
    1111    })
    1212
    1313    P:setButton(1, 2, {
    14             ["button"] = winMgr:getWindow("orxonox/DecisionPopup_button_no"),
     14            ["button"] = P.window:getChild("DecisionPopup_Background/DecisionPopup_button_no"),
    1515            ["callback"]  = P.button_no
    1616    })
     
    2626
    2727function P.setText( text )
    28     winMgr:getWindow("orxonox/DecisionPopup_text"):setText( text )
     28    P.window:getChild("DecisionPopup_Background/DecisionPopup_text"):setText( text )
    2929end
    3030
  • code/branches/cegui0.8_ogre1.9/data/gui/scripts/GraphicsMenu.lua

    r11795 r11800  
    1414
    1515    P:setButton(1, 1, {
    16             ["button"] = winMgr:getWindow("orxonox/GraphicsOkButton"),
     16            ["button"] = P.window:getChild("GraphicsOkButton"),
    1717            ["callback"]  = P.callback_Ok_Clicked
    1818    })
    1919
    2020    P:setButton(1, 2, {
    21             ["button"] = winMgr:getWindow("orxonox/GraphicsCancelButton"),
     21            ["button"] = P.window:getChild("GraphicsCancelButton"),
    2222            ["callback"]  = P.callback_Cancel_Clicked
    2323    })
     
    2525    -- place apply button at the bottom in the matrix, even though it's in fact at the top, to make the OK button highlighted by default
    2626    P:setButton(2, 1, {
    27             ["button"] = winMgr:getWindow("orxonox/Display/Resolution/Apply"),
     27            ["button"] = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Apply"),
    2828            ["callback"]  = P.callback_Apply_Clicked
    2929    })
     
    3434
    3535    -- resolution combobox
    36     local resolutionCombobox = CEGUI.toCombobox(winMgr:getWindow("orxonox/Display/Resolution/Combobox"))
     36    local resolutionCombobox = CEGUI.toCombobox(P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Combobox"))
    3737    resolutionCombobox:setReadOnly(true)
    3838
     
    4444
    4545    -- themes combobox
    46     local themeCombobox = CEGUI.toCombobox(winMgr:getWindow("orxonox/Display/Theme/Combobox"))
     46    local themeCombobox = CEGUI.toCombobox(P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Theme/Combobox"))
    4747    themeCombobox:setReadOnly(true)
    4848
     
    5454
    5555    -- fsaa combobox
    56     local fsaaCombobox = CEGUI.toCombobox(winMgr:getWindow("orxonox/Display/More/FSAA"))
     56    local fsaaCombobox = CEGUI.toCombobox(P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/FSAA"))
    5757    fsaaCombobox:setReadOnly(true)
    5858
     
    6464
    6565    -- particle lod combobox
    66     local particleLodCombobox = CEGUI.toCombobox(winMgr:getWindow("orxonox/Settings/ParticleLodCombobox"))
     66    local particleLodCombobox = CEGUI.toCombobox(P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/ParticleLodCombobox"))
    6767    particleLodCombobox:setReadOnly(true)
    6868
     
    8686
    8787    -- aspect ratio editbox
    88     local aspectRatioEditbox = winMgr:getWindow("orxonox/Display/Resolution/AspectRatio")
     88    local aspectRatioEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/AspectRatio")
    8989    local currentAspectRatio = orxonox.CommandExecutor:query("getConfig Camera aspectRatio_")
    9090    aspectRatioEditbox:setText(currentAspectRatio)
    9191
    9292    -- themes combobox
    93     local themeCombobox =  CEGUI.toCombobox(winMgr:getWindow("orxonox/Display/Theme/Combobox"))
     93    local themeCombobox =  CEGUI.toCombobox(P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Theme/Combobox"))
    9494    local currentTheme = orxonox.CommandExecutor:query("getConfig GUIManager guiScheme_")
    9595
     
    100100
    101101    -- vsync checkbox
    102     local vsyncCheckbox = winMgr:getWindow("orxonox/Display/More/VSync")
     102    local vsyncCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/VSync")
    103103    local hasVSync = orxonox.GraphicsManager:getInstance():hasVSyncEnabled()
    104104    CEGUI.toCheckbox(vsyncCheckbox):setSelected(hasVSync)
    105105
    106106    -- fsaa combobox
    107     local fsaaCombobox = CEGUI.toCombobox(winMgr:getWindow("orxonox/Display/More/FSAA"))
     107    local fsaaCombobox = CEGUI.toCombobox(P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/FSAA"))
    108108    local currentFSAAMode = orxonox.GraphicsManager:getInstance():getFSAAMode()
    109109
     
    121121
    122122    -- fov editbox
    123     local fovEditbox = winMgr:getWindow("orxonox/Settings/Fov")
     123    local fovEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/Fov")
    124124    local currentFov = orxonox.CommandExecutor:query("getConfig Camera fov_")
    125125    fovEditbox:setText(currentFov)
    126126
    127127    -- fps limit editbox
    128     local fpsEditbox = winMgr:getWindow("orxonox/Settings/FpsLimit")
     128    local fpsEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/FpsLimit")
    129129    local currentFpsLimit = orxonox.CommandExecutor:query("getConfig GraphicsSettings fpsLimit")
    130130    fpsEditbox:setText(currentFpsLimit)
    131131
    132132    -- particle lod combobox
    133     local particleLodCombobox = CEGUI.toCombobox(winMgr:getWindow("orxonox/Settings/ParticleLodCombobox"))
     133    local particleLodCombobox = CEGUI.toCombobox(P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/ParticleLodCombobox"))
    134134    local currentParticleLod = orxonox.CommandExecutor:query("getConfig GraphicsSettings particlesDetailLevel")
    135135
     
    146146
    147147    -- mesh lod checkbox
    148     local meshLodCheckbox = winMgr:getWindow("orxonox/Settings/MeshLodCheckbox")
     148    local meshLodCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/MeshLodCheckbox")
    149149    local hasMeshLod = orxonox.CommandExecutor:query("getConfig GraphicsSettings enableMeshLoD")
    150150    if hasMeshLod == "true" then
     
    156156
    157157    -- motion blur checkbox
    158     local motionBlurCheckbox = winMgr:getWindow("orxonox/Settings/MotionBlurCheckbox")
     158    local motionBlurCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/MotionBlurCheckbox")
    159159    local hasMotionBlur = orxonox.CommandExecutor:query("getConfig GraphicsSettings enableMotionBlur")
    160160    if hasMotionBlur == "true" then
     
    168168function P:onWindowResized()
    169169    -- fullscreen checkbox
    170     local fullscreenCheckbox = winMgr:getWindow("orxonox/Display/Resolution/Fullscreen")
     170    local fullscreenCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Fullscreen")
    171171    local isFullscreen = orxonox.GraphicsManager:getInstance():isFullScreen()
    172172    CEGUI.toCheckbox(fullscreenCheckbox):setSelected(isFullscreen)
    173173
    174174    -- resolution combobox
    175     local resolutionCombobox = CEGUI.toCombobox(winMgr:getWindow("orxonox/Display/Resolution/Combobox"))
     175    local resolutionCombobox = CEGUI.toCombobox(P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Combobox"))
    176176
    177177    local currentWidth = orxonox.GraphicsManager:getInstance():getWindowWidth()
     
    202202function P.updateResolutionEditboxes()
    203203    -- resolution combobox
    204     local resolutionCombobox = CEGUI.toCombobox(winMgr:getWindow("orxonox/Display/Resolution/Combobox"))
     204    local resolutionCombobox = CEGUI.toCombobox(P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Combobox"))
    205205
    206206    local currentWidth = orxonox.GraphicsManager:getInstance():getWindowWidth()
     
    208208
    209209    -- resolution editboxes
    210     local widthEditbox = winMgr:getWindow("orxonox/Display/Resolution/EditboxWidth")
    211     local heightEditbox = winMgr:getWindow("orxonox/Display/Resolution/EditboxHeight")
     210    local widthEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/EditboxWidth")
     211    local heightEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/EditboxHeight")
    212212    widthEditbox:disable()
    213213    heightEditbox:disable()
     
    233233function P.updateApplyButton()
    234234    -- fullscreen checkbox
    235     local fullscreenCheckbox = winMgr:getWindow("orxonox/Display/Resolution/Fullscreen")
     235    local fullscreenCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Fullscreen")
    236236    local isFullscreen = orxonox.GraphicsManager:getInstance():isFullScreen()
    237237    local fullscreenChanged = (isFullscreen ~= CEGUI.toCheckbox(fullscreenCheckbox):isSelected())
    238238
    239239    -- resolution editboxes
    240     local widthEditbox = winMgr:getWindow("orxonox/Display/Resolution/EditboxWidth")
    241     local heightEditbox = winMgr:getWindow("orxonox/Display/Resolution/EditboxHeight")
     240    local widthEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/EditboxWidth")
     241    local heightEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/EditboxHeight")
    242242    local currentWidth = tostring(orxonox.GraphicsManager:getInstance():getWindowWidth())
    243243    local currentHeight = tostring(orxonox.GraphicsManager:getInstance():getWindowHeight())
     
    247247
    248248    -- apply button
    249     local applyButton = winMgr:getWindow("orxonox/Display/Resolution/Apply")
     249    local applyButton = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Apply")
    250250
    251251    if fullscreenChanged or widthChanged or heightChanged or resolutionEditboxesEnabled then
     
    258258function P.updateRedLabel()
    259259    -- theme
    260     local themeCombobox = winMgr:getWindow("orxonox/Display/Theme/Combobox")
     260    local themeCombobox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Theme/Combobox")
    261261    local currentTheme = orxonox.CommandExecutor:query("getConfig GUIManager guiScheme_")
    262262    local themeChanged = (currentTheme ~= themeCombobox:getText())
    263263
    264264    -- vsync
    265     local vsyncCheckbox = winMgr:getWindow("orxonox/Display/More/VSync")
     265    local vsyncCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/VSync")
    266266    local hasVSync = orxonox.GraphicsManager:getInstance():hasVSyncEnabled()
    267267    local vsyncChanged = (hasVSync ~= CEGUI.toCheckbox(vsyncCheckbox):isSelected())
    268268
    269269    -- fsaa
    270     local fsaaCombobox = winMgr:getWindow("orxonox/Display/More/FSAA")
     270    local fsaaCombobox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/FSAA")
    271271    local currentFSAAMode = orxonox.GraphicsManager:getInstance():getFSAAMode()
    272272    local fsaaChanged = (currentFSAAMode ~= fsaaCombobox:getText())
     
    274274    local needRestart = themeChanged or vsyncChanged or fsaaChanged
    275275
    276     local notice = winMgr:getWindow("orxonox/Display/Notice")
     276    local notice = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Notice")
    277277    notice:setVisible(not needRestart)
    278     local noticeRed = winMgr:getWindow("orxonox/Display/NoticeRed")
     278    local noticeRed = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/NoticeRed")
    279279    noticeRed:setVisible(needRestart)
    280280end
     
    286286-- resolution
    287287
    288 function P.callback_FullscreenCheckbox_CheckStateChanged(e)
     288function P.callback_FullscreenCheckbox_SelectStateChanged(e)
    289289    P.updateApplyButton()
    290290end
     
    310310-- vsync
    311311
    312 function P.callback_VSyncCheckbox_CheckStateChanged(e)
     312function P.callback_VSyncCheckbox_SelectStateChanged(e)
    313313    P.updateRedLabel()
    314314end
     
    324324function P.callback_Apply_Clicked(e)
    325325    -- resolution
    326     local fullscreenCheckbox = winMgr:getWindow("orxonox/Display/Resolution/Fullscreen")
     326    local fullscreenCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Fullscreen")
    327327    local checkedFullscreen = tostring(CEGUI.toCheckbox(fullscreenCheckbox):isSelected())
    328328
    329     local widthEditbox = winMgr:getWindow("orxonox/Display/Resolution/EditboxWidth")
    330     local heightEditbox = winMgr:getWindow("orxonox/Display/Resolution/EditboxHeight")
     329    local widthEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/EditboxWidth")
     330    local heightEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/EditboxHeight")
    331331
    332332    P.newWidth = widthEditbox:getText()
     
    339339    P.oldFullscreen = orxonox.GraphicsManager:getInstance():isFullScreen()
    340340
    341     P.revertTimerHandle = orxonox.CommandExecutor:query("delayreal 10 {hideGUI DecisionPopup; GraphicsManager setScreenResolution " .. P.oldWidth .. " " .. P.oldHeight .. " " .. tostring(P.oldFullscreen) .. "; config Core lastLevelTimestamp_ [expr [getConfig Core ogreConfigTimestamp_] + 1]}")
     341    P.revertTimerHandle = orxonox.CommandExecutor:query("delayreal 10 {hideGUI DecisionPopup; GraphicsManager setScreenResolution " .. P.oldWidth .. " " .. P.oldHeight .. " " .. tostring(P.oldFullscreen) .. "; config CoreConfig lastLevelTimestamp_ [expr [getConfig CoreConfig ogreConfigTimestamp_] + 1]}")
    342342
    343343    -- change settings
     
    362362
    363363    -- update timestamp to avoid showing the ogre config dialog again after the user accepted or reverted the resolution
    364     orxonox.CommandExecutor:execute("config Core lastLevelTimestamp_ [expr [getConfig Core ogreConfigTimestamp_] + 1]")
     364    orxonox.CommandExecutor:execute("config CoreConfig lastLevelTimestamp_ [expr [getConfig CoreConfig ogreConfigTimestamp_] + 1]")
    365365end
    366366
    367367function P.callback_Ok_Clicked(e)
    368368    -- aspect ratio
    369     local aspectRatioEditbox = winMgr:getWindow("orxonox/Display/Resolution/AspectRatio")
     369    local aspectRatioEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/AspectRatio")
    370370    orxonox.CommandExecutor:execute("config Camera aspectRatio_ " .. aspectRatioEditbox:getText())
    371371
    372372    -- theme
    373     local themeCombobox = winMgr:getWindow("orxonox/Display/Theme/Combobox")
     373    local themeCombobox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Theme/Combobox")
    374374    orxonox.CommandExecutor:execute("config GUIManager guiScheme_ " .. themeCombobox:getText())
    375375
    376376    -- vsync
    377     local vsyncCheckbox = winMgr:getWindow("orxonox/Display/More/VSync")
     377    local vsyncCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/VSync")
    378378    local hasVSync = orxonox.GraphicsManager:getInstance():hasVSyncEnabled()
    379379    if hasVSync ~= CEGUI.toCheckbox(vsyncCheckbox):isSelected() then
     
    382382
    383383    -- fsaa
    384     local fsaaCombobox = winMgr:getWindow("orxonox/Display/More/FSAA")
     384    local fsaaCombobox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/FSAA")
    385385    local currentFSAAMode = orxonox.GraphicsManager:getInstance():getFSAAMode()
    386386    if currentFSAAMode ~= fsaaCombobox:getText() then
     
    389389
    390390    -- fov
    391     local fovEditbox = winMgr:getWindow("orxonox/Settings/Fov")
     391    local fovEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/Fov")
    392392    orxonox.CommandExecutor:execute("config Camera fov_ " .. fovEditbox:getText())
    393393
    394394    -- fps limit
    395     local fpsEditbox = winMgr:getWindow("orxonox/Settings/FpsLimit")
     395    local fpsEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/FpsLimit")
    396396    orxonox.CommandExecutor:execute("config GraphicsSettings fpsLimit " .. fpsEditbox:getText())
    397397
    398398    -- particle lod
    399     local particleLodCombobox = CEGUI.toCombobox(winMgr:getWindow("orxonox/Settings/ParticleLodCombobox"))
     399    local particleLodCombobox = CEGUI.toCombobox(P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/ParticleLodCombobox"))
    400400    local item = particleLodCombobox:getSelectedItem()
    401401    if item then
     
    404404
    405405    -- mesh lod
    406     local meshLodCheckbox = winMgr:getWindow("orxonox/Settings/MeshLodCheckbox")
     406    local meshLodCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/MeshLodCheckbox")
    407407    orxonox.CommandExecutor:execute("config GraphicsSettings enableMeshLoD " .. tostring(CEGUI.toCheckbox(meshLodCheckbox):isSelected()))
    408408
    409409    -- motion blur
    410     local motionBlurCheckbox = winMgr:getWindow("orxonox/Settings/MotionBlurCheckbox")
     410    local motionBlurCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/MotionBlurCheckbox")
    411411    orxonox.CommandExecutor:execute("config GraphicsSettings enableMotionBlur " .. tostring(CEGUI.toCheckbox(motionBlurCheckbox):isSelected()))
    412412
  • code/branches/cegui0.8_ogre1.9/data/gui/scripts/InfoPopup.lua

    r6746 r11800  
    1414
    1515function P.setText(text)
    16     winMgr:getWindow("orxonox/InfoPopup_text"):setText( text )
     16    P.window:getChild("InfoPopup_Background/InfoPopup_text"):setText( text )
    1717end
    1818
    1919function P.setCloseButton(closeButton)
    20     close = winMgr:getWindow("orxonox/InfoPopup_close")
     20    close = P.window:getChild("InfoPopup_Background/InfoPopup_close")
    2121    close:setVisible(closeButton)
    2222    if(not closeButton) then
  • code/branches/cegui0.8_ogre1.9/data/gui/scripts/KeyBindMenu.lua

    r11704 r11800  
    7979
    8080    --Calculate design parameters:
    81     sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/KeyBindPane/SampleWindow")
     81    sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "KeyBindPane/SampleWindow")
    8282    sampleWindow:setText("SampleText")
    8383
     
    112112
    113113    P:setButton(1, 1, {
    114             ["button"] = winMgr:getWindow("orxonox/KeyBindBackButton"),
     114            ["button"] = P.window:getChild("KeyBindBackButton"),
    115115            ["callback"]  = P.KeyBindBackButton_clicked
    116116    })
     
    137137function P.createLine(k)
    138138    local offset = 0
    139     local line = winMgr:createWindow("DefaultWindow", "orxonox/KeyBindPane/Binding" .. k)
     139    local line = winMgr:createWindow("DefaultWindow", "Binding" .. k)
    140140    line:setHeight(CEGUI.UDim(0, lineHeight))
    141141    line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, lineHeight*(k-1))))
    142142
    143     local command = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/KeyBindPane/Binding" .. k .. "/Command")
     143    local command = winMgr:createWindow("MenuWidgets/StaticText", "Command")
    144144    command:setText(nameList[k])
    145     command:setSize(CEGUI.UVector2(CEGUI.UDim(0, commandWidth), CEGUI.UDim(1, 0)))
     145    command:setSize(CEGUI.USize(CEGUI.UDim(0, commandWidth), CEGUI.UDim(1, 0)))
    146146    command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0, 0)))
    147     line:addChildWindow(command)
     147    line:addChild(command)
    148148    offset = offset + commandWidth + spaceWidth
    149149
    150     local plus = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Plus")
    151     plus:setSize(CEGUI.UVector2(CEGUI.UDim(0, addWidth), CEGUI.UDim(0.7, 0)))
     150    local plus = winMgr:createWindow("MenuWidgets/TabButton", "Plus")
     151    plus:setSize(CEGUI.USize(CEGUI.UDim(0, addWidth), CEGUI.UDim(0.7, 0)))
    152152    plus:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
    153153    plus:setText("add")
    154154    orxonox.GUIManager:subscribeEventHelper(plus, "Clicked", P.name .. ".KeyBindPlus_clicked")
    155     line:addChildWindow(plus)
     155    line:addChild(plus)
    156156    offset = offset + addWidth + spaceWidth
    157157
    158158    local numButtons = orxonox.KeyBinderManager:getInstance():getCurrent():getNumberOfBindings(commandList[k]);
    159159    for i=0,(numButtons-1) do
    160         local button = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Button" .. i)
     160        local button = winMgr:createWindow("MenuWidgets/TabButton", "Button" .. i)
    161161        local name = orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[k],i)
    162162        name = P.KeyNameNiceifier(name)
     
    165165        local size = getMinTextSize(sampleWindow)
    166166        local buttonWidth = size[2]
    167         button:setSize(CEGUI.UVector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0.7, 0)))
     167        button:setSize(CEGUI.USize(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0.7, 0)))
    168168        button:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
    169169        orxonox.GUIManager:subscribeEventHelper(button, "Clicked", P.name .. ".KeyBindButton_clicked")
    170170        --button:subscribeScriptedEvent("EventClicked", P.name .. ".KeyBindButton_clicked")
    171         line:addChildWindow(button)
     171        line:addChild(button)
    172172        offset = offset + buttonWidth
    173173
    174         local clear = winMgr:createWindow("MenuWidgets/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Clear" .. i)
    175         clear:setSize(CEGUI.UVector2(CEGUI.UDim(0, clearWidth), CEGUI.UDim(0.7, 0)))
     174        local clear = winMgr:createWindow("MenuWidgets/TabButton", "Clear" .. i)
     175        clear:setSize(CEGUI.USize(CEGUI.UDim(0, clearWidth), CEGUI.UDim(0.7, 0)))
    176176        clear:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0)))
    177177        clear:setText("X")
    178178        orxonox.GUIManager:subscribeEventHelper(clear, "Clicked", P.name .. ".KeyBindClear_clicked")
    179         line:addChildWindow(clear)
     179        line:addChild(clear)
    180180        offset = offset + clearWidth + spaceWidth
    181181    end
     
    187187
    188188function P.createLines()
    189     local window = winMgr:getWindow("orxonox/KeyBindPane")
     189    local window = P.window:getChild("KeyBindWindow/KeyBindWrapper/KeyBindPane")
    190190
    191191    for k,v in pairs(commandList) do
    192192        local line = P.createLine(k)
    193193        table.insert(linesList, line)
    194         window:addChildWindow(line)
     194        window:addChild(line)
    195195    end
    196196
     
    201201function P.KeyBindButton_clicked(e)
    202202    local we = CEGUI.toWindowEventArgs(e)
    203     local name = we.window:getName()
     203    local name = we.window:getNamePath()
    204204
    205205    local match = string.gmatch(name, "%d+")
     
    215215function P.KeyBindPlus_clicked(e)
    216216    local we = CEGUI.toWindowEventArgs(e)
    217     local name = we.window:getName()
     217    local name = we.window:getNamePath()
    218218
    219219    local match = string.gmatch(name, "%d+")
     
    227227function P.KeyBindClear_clicked(e)
    228228    local we = CEGUI.toWindowEventArgs(e)
    229     local name = we.window:getName()
     229    local name = we.window:getNamePath()
    230230
    231231    local match = string.gmatch(name, "%d+")
     
    251251
    252252function P.callback()
    253     local pane = tolua.cast(winMgr:getWindow("orxonox/KeyBindPane"), "CEGUI::ScrollablePane")
     253    local pane = tolua.cast(P.window:getChild("KeyBindWindow/KeyBindWrapper/KeyBindPane"), "CEGUI::ScrollablePane")
    254254    local position = pane:getVerticalScrollPosition()
    255255    while table.getn(linesList) ~= 0 do
    256256        if linesList[1] ~= nil then
    257             winMgr:destroyWindow(linesList[1]:getName())
     257            winMgr:destroyWindow(pane:getChild(linesList[1]:getName()))
    258258        end
    259259        table.remove(linesList, 1)
  • code/branches/cegui0.8_ogre1.9/data/gui/scripts/MiscConfigMenu.lua

    r11356 r11800  
    1818
    1919    P.commandList = {}
    20     table.insert(P.commandList, "Highscore playerName_")
    2120    table.insert(P.commandList, "KeyBinder mouseSensitivity_")
    2221    table.insert(P.commandList, "KeyBinder mouseSensitivityDerived_")
     
    2423    table.insert(P.commandList, "KeyBinder mouseWheelStepSize_")
    2524    table.insert(P.commandList, "Shell maxHistoryLength_")
    26     table.insert(P.commandList, "Core bStartIOConsole_")
    27     table.insert(P.commandList, "Game fpsLimit_")
     25    table.insert(P.commandList, "CoreConfig bStartIOConsole_")
     26    table.insert(P.commandList, "GraphicsSettings fpsLimit")
    2827    table.insert(P.commandList, "Spectator speed_")
    2928    table.insert(P.commandList, "SpaceShip bInvertYAxis_")
     
    3433    table.insert(P.commandList, "Gametype numberOfBots_")
    3534    table.insert(P.commandList, "UnderAttack gameTime_")
    36     table.insert(P.commandList, "TeamDeathmatch teams_")
     35    table.insert(P.commandList, "TeamGametype teams_")
    3736    table.insert(P.commandList, "TeamDeathmatch maxScore_")
    3837    table.insert(P.commandList, "HumanPlayer nick_")
    3938    table.insert(P.commandList, "ChatOverlay displayTime_")
    40     table.insert(P.commandList, "Core bDevMode_")
     39    table.insert(P.commandList, "CoreConfig bDevMode_")
    4140    table.insert(P.commandList, "HUDNavigation MarkerLimit_")
    42     table.insert(P.commandList, "HUDNavigation showDistance")
     41    table.insert(P.commandList, "HUDNavigation showDistance_")
    4342    table.insert(P.commandList, "HUDRadar RadarMode_")
    4443
    4544    P.nameList = {}
    46     table.insert(P.nameList, "Playername")
    4745    table.insert(P.nameList, "Mouse sensitivity")
    4846    table.insert(P.nameList, "Mouse acceleration")
     
    6058    table.insert(P.nameList, "Number of Bots")
    6159    table.insert(P.nameList, "UnderAttack: game time")
    62     table.insert(P.nameList, "TeamDeathmatch: Number of teams")
     60    table.insert(P.nameList, "TeamGametype: Number of teams")
    6361    table.insert(P.nameList, "TeamDeathmatch: Score needed to end the game")
    6462    table.insert(P.nameList, "Playername")
     
    7270
    7371    --Calculate design parameters:
    74     P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/MiscConfigMenu/MiscConfigPane/SampleWindow")
     72    P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "MiscConfigMenu/MiscConfigPane/SampleWindow")
    7573    P.sampleWindow:setText("SampleText")
    7674
     
    9391    P.spaceWidth = 10
    9492   
    95     local pane = tolua.cast(winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane"), "CEGUI::ScrollablePane")
     93    local pane = tolua.cast(P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane"), "CEGUI::ScrollablePane")
    9694    size = pane:getViewableArea()
    9795    P.editboxWidth = size:getWidth() - P.commandWidth - P.resetWidth - 5*P.spaceWidth
     
    10098
    10199    P:setButton(1, 1, {
    102             ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/CancelButton"),
     100            ["button"] = P.window:getChild("CancelButton"),
    103101            ["callback"]  = P.MiscConfigCancelButton_clicked
    104102    })
    105103   
    106104    P:setButton(1, 2, {
    107             ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/OKButton"),
     105            ["button"] = P.window:getChild("OKButton"),
    108106            ["callback"]  = P.MiscConfigOKButton_clicked
    109107    })
     
    113111    local offset = 0
    114112    -- content window for the entire line
    115     local line = winMgr:createWindow("DefaultWindow", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k)
     113    local line = winMgr:createWindow("DefaultWindow", "ConfigCommand" .. k)
    116114    line:setHeight(CEGUI.UDim(0, P.lineHeight))
    117115    line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, P.lineHeight*(k-1))))
    118116
    119117    -- config name
    120     local command = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Command")
     118    local command = winMgr:createWindow("MenuWidgets/StaticText", "Command")
    121119    command:setText(P.nameList[k])
    122     command:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.commandWidth), CEGUI.UDim(1, 0)))
     120    command:setSize(CEGUI.USize(CEGUI.UDim(0, P.commandWidth), CEGUI.UDim(1, 0)))
    123121    command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0, 0)))
    124     line:addChildWindow(command)
     122    line:addChild(command)
    125123    offset = offset + P.commandWidth + P.spaceWidth
    126124
    127125    -- config value (editable)
    128     local configvalue = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
     126    local configvalue = winMgr:createWindow("MenuWidgets/Editbox", "Configvalue")
    129127    configvalue:setProperty("ReadOnly", "set:False")
    130128    local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[k])
    131129    configvalue:setText(value)
    132     configvalue:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.editboxWidth), CEGUI.UDim(0.9, 0)))
     130    configvalue:setSize(CEGUI.USize(CEGUI.UDim(0, P.editboxWidth), CEGUI.UDim(0.9, 0)))
    133131    configvalue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
    134132    -- enable the reset button if the value changed
    135133    orxonox.GUIManager:subscribeEventHelper(configvalue, "TextAccepted", P.name .. ".MiscConfigEditbox_textAccepted")
    136     line:addChildWindow(configvalue)
     134    line:addChild(configvalue)
    137135    offset = offset + P.editboxWidth + P.spaceWidth
    138136
    139137    -- reset button (only available when value changed)
    140     local reset = winMgr:createWindow("MenuWidgets/Button", "orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
    141     reset:setSize(CEGUI.UVector2(CEGUI.UDim(0, P.resetWidth), CEGUI.UDim(0.9, 0)))
     138    local reset = winMgr:createWindow("MenuWidgets/Button", "Reset")
     139    reset:setSize(CEGUI.USize(CEGUI.UDim(0, P.resetWidth), CEGUI.UDim(0.9, 0)))
    142140    reset:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0)))
    143141    reset:setText("reset")
    144142    orxonox.GUIManager:subscribeEventHelper(reset, "Clicked", P.name .. ".MiscConfigResetButton_clicked")
    145     line:addChildWindow(reset)
     143    line:addChild(reset)
    146144    reset:setEnabled(false)
    147145    offset = offset + P.resetWidth + P.spaceWidth
     
    153151
    154152function P.createLines()
    155     local window = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane")
     153    local window = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane")
    156154
    157155    for k,v in pairs(P.commandList) do
    158156        local line = P.createLine(k)
    159157        table.insert(P.linesList, line)
    160         window:addChildWindow(line)
     158        window:addChild(line)
    161159    end
    162160
     
    168166    for k,v in pairs(P.commandList) do
    169167        -- save the changes
    170         local editbox = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
     168        local editbox = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")
    171169        orxonox.CommandExecutor:execute("config " .. P.commandList[k] .. " " .. editbox:getText())
    172         local resetButton = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
     170        local resetButton = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane/ConfigCommand" .. k .. "/Reset")
    173171        resetButton:setEnabled(false)
    174172    end
     
    183181function P.MiscConfigEditbox_textAccepted(e)
    184182    local we = CEGUI.toWindowEventArgs(e)
    185     local name = we.window:getName()
     183    local name = we.window:getNamePath()
    186184
    187185    local match = string.gmatch(name, "%d+")
    188186    local commandNr = tonumber(match())
    189187
    190     local resetButton = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Reset")
     188    local resetButton = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane/ConfigCommand" .. commandNr .. "/Reset")
    191189    resetButton:setEnabled(true)
    192190end
     
    194192function P.MiscConfigResetButton_clicked(e)
    195193    local we = CEGUI.toWindowEventArgs(e)
    196     local name = we.window:getName()
     194    local name = we.window:getNamePath()
    197195
    198196    local match = string.gmatch(name, "%d+")
     
    200198
    201199    -- reload the old value
    202     local editbox = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Configvalue")
     200    local editbox = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane/ConfigCommand" .. commandNr .. "/Configvalue")
    203201    local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[commandNr])
    204202    editbox:setText(value)
  • code/branches/cegui0.8_ogre1.9/data/gui/scripts/MouseControlsMenu.lua

    r8079 r11800  
    55function P.onLoad()
    66    block = false
    7     mousenormalscrollbarwindow = tolua.cast(winMgr:getWindow("orxonox/MouseNormalScrollbar"),"CEGUI::Scrollbar")
    8     mousederivescrollbarwindow = tolua.cast(winMgr:getWindow("orxonox/MouseDeriveScrollbar"),"CEGUI::Scrollbar")
    9     normalwindow = tolua.cast(winMgr:getWindow("orxonox/MouseNormalButton"),"CEGUI::RadioButton")
    10     derivewindow = tolua.cast(winMgr:getWindow("orxonox/MouseDeriveButton"),"CEGUI::RadioButton")
    11     invertwindow = tolua.cast(winMgr:getWindow("orxonox/MouseInvertCheckbox"),"CEGUI::Checkbox")
     7    mousenormalscrollbarwindow = tolua.cast(P.window:getChild("MouseControlsWindow/MouseNormalSensitivity/MouseNormalScrollbar"),"CEGUI::Scrollbar")
     8    mousederivescrollbarwindow = tolua.cast(P.window:getChild("MouseControlsWindow/MouseDeriveSensitivity/MouseDeriveScrollbar"),"CEGUI::Scrollbar")
     9    normalwindow = tolua.cast(P.window:getChild("MouseControlsWindow/MouseNormalSensitivity/MouseNormalButton"),"CEGUI::RadioButton")
     10    derivewindow = tolua.cast(P.window:getChild("MouseControlsWindow/MouseDeriveSensitivity/MouseDeriveButton"),"CEGUI::RadioButton")
     11    invertwindow = tolua.cast(P.window:getChild("MouseControlsWindow/MouseInvertCheckbox"),"CEGUI::ToggleButton")
    1212    mousenormalscrollbar_active = false
    1313    mousederivescrollbar_active = false
     
    3434
    3535    P:setButton(1, 1, {
    36             ["button"] = winMgr:getWindow("orxonox/MouseControlsBackButton"),
     36            ["button"] = P.window:getChild("MouseControlsBackButton"),
    3737            ["callback"]  = P.MouseControlsBackButton_clicked
    3838    })
  • code/branches/cegui0.8_ogre1.9/data/gui/scripts/SettingsMenu.lua

    r8351 r11800  
    88    --buttons are arranged in a 4x2 matrix.
    99    P:setButton(1, 2, {
    10             ["button"] = winMgr:getWindow("orxonox/SettingsMenu/GraphicsButton"),
     10            ["button"] = P.window:getChild("SettingsWindow/GraphicsButton"),
    1111            ["callback"]  = P.SettingsGraphicsButton_clicked
    1212    })
    1313
    1414    P:setButton(2, 2, {
    15             ["button"] = winMgr:getWindow("orxonox/SettingsMenu/AudioButton"),
     15            ["button"] = P.window:getChild("SettingsWindow/AudioButton"),
    1616            ["callback"]  = P.SettingsAudioButton_clicked
    1717    })
    1818
    1919    P:setButton(3, 1, {
    20             ["button"] = winMgr:getWindow("orxonox/SettingsMenu/ControlsButton"),
     20            ["button"] = P.window:getChild("SettingsWindow/ControlsButton"),
    2121            ["callback"]  = P.SettingsControlsButton_clicked
    2222    })
    2323
    2424    P:setButton(3, 2, {
    25             ["button"] = winMgr:getWindow("orxonox/SettingsMenu/MiscellaneousButton"),
     25            ["button"] = P.window:getChild("SettingsWindow/MiscellaneousButton"),
    2626            ["callback"]  = P.SettingsMiscellaneousButton_clicked
    2727    })
    2828
    2929    P:setButton(4, 1, {
    30             ["button"] = winMgr:getWindow("orxonox/SettingsMenu/SettingsBackButton"),
     30            ["button"] = P.window:getChild("SettingsBackButton"),
    3131            ["callback"]  = P.SettingsBackButton_clicked
    3232    })
     
    3636
    3737function P.onShow()
    38     local window = winMgr:getWindow("orxonox/SettingsMenu/AudioButton")
     38    local window = P.window:getChild("SettingsWindow/AudioButton")
    3939    if not orxonox.SoundManager:exists() then
    4040        window:setProperty("Disabled", "true")
Note: See TracChangeset for help on using the changeset viewer.