Changeset 11800 for code/branches/cegui0.8_ogre1.9/data/gui
- Timestamp:
- Feb 24, 2018, 1:05:32 AM (7 years ago)
- 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 33 33 <Event function="AudioMenu.AudioMasterScrollbar_started" name="ThumbTrackStarted" /> 34 34 <Event function="AudioMenu.AudioMasterScrollbar_ended" name="ThumbTrackEnded" /> 35 <Event function="AudioMenu.AudioMasterScrollbar_changed" name="ScrollPos Changed" />35 <Event function="AudioMenu.AudioMasterScrollbar_changed" name="ScrollPositionChanged" /> 36 36 </Window> 37 37 <Window name="MasterCheckbox" type="MenuWidgets/Checkbox"> … … 39 39 <Property name="MaxSize" value="{{1,0},{1,0}}" /> 40 40 <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" /> 42 42 </Window> 43 43 </Window> … … 60 60 <Event function="AudioMenu.AudioMusicScrollbar_started" name="ThumbTrackStarted" /> 61 61 <Event function="AudioMenu.AudioMusicScrollbar_ended" name="ThumbTrackEnded" /> 62 <Event function="AudioMenu.AudioMusicScrollbar_changed" name="ScrollPos Changed" />62 <Event function="AudioMenu.AudioMusicScrollbar_changed" name="ScrollPositionChanged" /> 63 63 </Window> 64 64 <Window name="MusicCheckbox" type="MenuWidgets/Checkbox"> … … 66 66 <Property name="MaxSize" value="{{1,0},{1,0}}" /> 67 67 <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" /> 69 69 </Window> 70 70 </Window> … … 87 87 <Event function="AudioMenu.AudioEffectsScrollbar_started" name="ThumbTrackStarted" /> 88 88 <Event function="AudioMenu.AudioEffectsScrollbar_ended" name="ThumbTrackEnded" /> 89 <Event function="AudioMenu.AudioEffectsScrollbar_changed" name="ScrollPos Changed" />89 <Event function="AudioMenu.AudioEffectsScrollbar_changed" name="ScrollPositionChanged" /> 90 90 </Window> 91 91 <Window name="EffectsCheckbox" type="MenuWidgets/Checkbox"> … … 93 93 <Property name="MaxSize" value="{{1,0},{1,0}}" /> 94 94 <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" /> 96 96 </Window> 97 97 </Window> … … 106 106 <Property name="MaxSize" value="{{1,0},{1,0}}" /> 107 107 <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" /> 109 109 </Window> 110 110 </Window> -
code/branches/cegui0.8_ogre1.9/data/gui/layouts/GraphicsMenu.layout
r11793 r11800 34 34 <Property name="MaxSize" value="{{1,0},{1,0}}" /> 35 35 <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" /> 37 37 </Window> 38 38 <Window name="Combobox" type="MenuWidgets/Combobox"> … … 40 40 <Property name="ClippedByParent" value="False" /> 41 41 <Property name="Area" value="{{0.05,0},{0.3,0},{0.95,0},{1.2,0}}" /> 42 <Property name="MaxEditTextLength" value="1073741823" />43 42 <Event function="GraphicsMenu.callback_ResolutionCombobox_ListSelectionAccepted" name="ListSelectionAccepted" /> 44 43 </Window> … … 93 92 <Property name="ClippedByParent" value="False" /> 94 93 <Property name="Area" value="{{0.05,0},{0.5,0},{0.95,0},{1.6,0}}" /> 95 <Property name="MaxEditTextLength" value="1073741823" />96 94 <Event function="GraphicsMenu.callback_ThemeCombobox_ListSelectionAccepted" name="ListSelectionAccepted" /> 97 95 </Window> … … 104 102 <Property name="MaxSize" value="{{1,0},{1,0}}" /> 105 103 <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" /> 107 105 </Window> 108 106 <Window name="FSAALabel" type="MenuWidgets/StaticText"> … … 117 115 <Property name="ClippedByParent" value="False" /> 118 116 <Property name="Area" value="{{0.3,0},{0.55,0},{0.95,0},{2.1,0}}" /> 119 <Property name="MaxEditTextLength" value="1073741823" />120 117 <Event function="GraphicsMenu.callback_FSAACombobox_ListSelectionAccepted" name="ListSelectionAccepted" /> 121 118 </Window> … … 178 175 <Property name="ClippedByParent" value="False" /> 179 176 <Property name="Area" value="{{0.5,0},{0.29,0},{0.7,0},{0.725,0}}" /> 180 <Property name="MaxEditTextLength" value="1073741823" />181 177 </Window> 182 178 <Window name="MeshLodCheckbox" type="MenuWidgets/Checkbox"> -
code/branches/cegui0.8_ogre1.9/data/gui/layouts/KeyBindMenu.layout
r11793 r11800 1 1 <?xml version='1.0' encoding='utf-8'?> 2 2 <GUILayout version="4"> 3 <Window name=" Background" type="DefaultWindow">3 <Window name="KeyBindBackground" type="DefaultWindow"> 4 4 <Property name="InheritsAlpha" value="False" /> 5 5 <Property name="MaxSize" value="{{1,0},{1,0}}" /> -
code/branches/cegui0.8_ogre1.9/data/gui/layouts/MiscConfigMenu.layout
r11793 r11800 1 1 <?xml version='1.0' encoding='utf-8'?> 2 2 <GUILayout version="4"> 3 <Window name=" Background" type="MenuWidgets/StaticImage">3 <Window name="MiscConfigBackground" type="MenuWidgets/StaticImage"> 4 4 <Property name="FrameEnabled" value="False" /> 5 5 <Property name="InheritsAlpha" value="False" /> -
code/branches/cegui0.8_ogre1.9/data/gui/layouts/MouseControlsMenu.layout
r11793 r11800 33 33 <Event function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_started" name="ThumbTrackStarted" /> 34 34 <Event function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_ended" name="ThumbTrackEnded" /> 35 <Event function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_changed" name="ScrollPos Changed" />35 <Event function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_changed" name="ScrollPositionChanged" /> 36 36 </Window> 37 37 <Window name="MouseNormalButton" type="MenuWidgets/RadioButton"> … … 60 60 <Event function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_started" name="ThumbTrackStarted" /> 61 61 <Event function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_ended" name="ThumbTrackEnded" /> 62 <Event function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_changed" name="ScrollPos Changed" />62 <Event function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_changed" name="ScrollPositionChanged" /> 63 63 </Window> 64 64 <Window name="MouseDeriveButton" type="MenuWidgets/RadioButton"> … … 74 74 <Property name="MaxSize" value="{{1,0},{1,0}}" /> 75 75 <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" /> 77 77 </Window> 78 78 </Window> -
code/branches/cegui0.8_ogre1.9/data/gui/layouts/SettingsMenu.layout
r11793 r11800 1 1 <?xml version='1.0' encoding='utf-8'?> 2 2 <GUILayout version="4"> 3 <Window name=" Background" type="MenuWidgets/StaticImage">3 <Window name="SettingsBackground" type="MenuWidgets/StaticImage"> 4 4 <Property name="InheritsAlpha" value="False" /> 5 5 <Property name="FrameEnabled" value="False" /> -
code/branches/cegui0.8_ogre1.9/data/gui/scripts/AudioMenu.lua
r11795 r11800 15 15 musicmute = soundMgr:getMute(orxonox.SoundType.Music) 16 16 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") 23 23 masterscrollbarwindow:setScrollPosition(mastervolume) 24 24 musicscrollbarwindow:setScrollPosition(musicvolume) … … 28 28 effectsmutewindow:setSelected(effectsmute) 29 29 choice = "Default" 30 listboxwindow = winMgr:getWindow("orxonox/AudioThemeListbox")30 listboxwindow = P.window:getChild("AudioWindow/AudioTheme/AudioThemeListbox") 31 31 local themeList = {} 32 32 table.insert(themeList, "Default") … … 53 53 54 54 P:setButton(1, 1, { 55 ["button"] = winMgr:getWindow("orxonox/AudioBackButton"),55 ["button"] = P.window:getChild("AudioBackButton"), 56 56 ["callback"] = P.AudioBackButton_clicked 57 57 }) -
code/branches/cegui0.8_ogre1.9/data/gui/scripts/ControlsMenu.lua
r8079 r11800 9 9 --buttons are arranged in a 3x1 matrix: 10 10 P:setButton(1, 1, { 11 ["button"] = winMgr:getWindow("orxonox/MouseControlsButton"),11 ["button"] = P.window:getChild("ControlsWindow/MouseControlsButton"), 12 12 ["callback"] = P.ControlsMouseControlsButton_clicked 13 13 }) 14 14 15 15 P:setButton(2, 1, { 16 ["button"] = winMgr:getWindow("orxonox/KeybindingsButton"),16 ["button"] = P.window:getChild("ControlsWindow/KeybindingsButton"), 17 17 ["callback"] = P.ControlsKeyboardControlsButton_clicked 18 18 }) 19 19 20 20 P:setButton(3, 1, { 21 ["button"] = winMgr:getWindow("orxonox/ControlsBackButton"),21 ["button"] = P.window:getChild("ControlsBackButton"), 22 22 ["callback"] = P.ControlsBackButton_clicked 23 23 }) -
code/branches/cegui0.8_ogre1.9/data/gui/scripts/DecisionPopup.lua
r8079 r11800 7 7 --button are arranged in a 1x2 matrix 8 8 P:setButton(1, 1, { 9 ["button"] = winMgr:getWindow("orxonox/DecisionPopup_button_yes"),9 ["button"] = P.window:getChild("DecisionPopup_Background/DecisionPopup_button_yes"), 10 10 ["callback"] = P.button_yes 11 11 }) 12 12 13 13 P:setButton(1, 2, { 14 ["button"] = winMgr:getWindow("orxonox/DecisionPopup_button_no"),14 ["button"] = P.window:getChild("DecisionPopup_Background/DecisionPopup_button_no"), 15 15 ["callback"] = P.button_no 16 16 }) … … 26 26 27 27 function P.setText( text ) 28 winMgr:getWindow("orxonox/DecisionPopup_text"):setText( text )28 P.window:getChild("DecisionPopup_Background/DecisionPopup_text"):setText( text ) 29 29 end 30 30 -
code/branches/cegui0.8_ogre1.9/data/gui/scripts/GraphicsMenu.lua
r11795 r11800 14 14 15 15 P:setButton(1, 1, { 16 ["button"] = winMgr:getWindow("orxonox/GraphicsOkButton"),16 ["button"] = P.window:getChild("GraphicsOkButton"), 17 17 ["callback"] = P.callback_Ok_Clicked 18 18 }) 19 19 20 20 P:setButton(1, 2, { 21 ["button"] = winMgr:getWindow("orxonox/GraphicsCancelButton"),21 ["button"] = P.window:getChild("GraphicsCancelButton"), 22 22 ["callback"] = P.callback_Cancel_Clicked 23 23 }) … … 25 25 -- 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 26 26 P:setButton(2, 1, { 27 ["button"] = winMgr:getWindow("orxonox/Display/Resolution/Apply"),27 ["button"] = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Apply"), 28 28 ["callback"] = P.callback_Apply_Clicked 29 29 }) … … 34 34 35 35 -- 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")) 37 37 resolutionCombobox:setReadOnly(true) 38 38 … … 44 44 45 45 -- 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")) 47 47 themeCombobox:setReadOnly(true) 48 48 … … 54 54 55 55 -- 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")) 57 57 fsaaCombobox:setReadOnly(true) 58 58 … … 64 64 65 65 -- 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")) 67 67 particleLodCombobox:setReadOnly(true) 68 68 … … 86 86 87 87 -- aspect ratio editbox 88 local aspectRatioEditbox = winMgr:getWindow("orxonox/Display/Resolution/AspectRatio")88 local aspectRatioEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/AspectRatio") 89 89 local currentAspectRatio = orxonox.CommandExecutor:query("getConfig Camera aspectRatio_") 90 90 aspectRatioEditbox:setText(currentAspectRatio) 91 91 92 92 -- 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")) 94 94 local currentTheme = orxonox.CommandExecutor:query("getConfig GUIManager guiScheme_") 95 95 … … 100 100 101 101 -- vsync checkbox 102 local vsyncCheckbox = winMgr:getWindow("orxonox/Display/More/VSync")102 local vsyncCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/VSync") 103 103 local hasVSync = orxonox.GraphicsManager:getInstance():hasVSyncEnabled() 104 104 CEGUI.toCheckbox(vsyncCheckbox):setSelected(hasVSync) 105 105 106 106 -- 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")) 108 108 local currentFSAAMode = orxonox.GraphicsManager:getInstance():getFSAAMode() 109 109 … … 121 121 122 122 -- fov editbox 123 local fovEditbox = winMgr:getWindow("orxonox/Settings/Fov")123 local fovEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/Fov") 124 124 local currentFov = orxonox.CommandExecutor:query("getConfig Camera fov_") 125 125 fovEditbox:setText(currentFov) 126 126 127 127 -- fps limit editbox 128 local fpsEditbox = winMgr:getWindow("orxonox/Settings/FpsLimit")128 local fpsEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/FpsLimit") 129 129 local currentFpsLimit = orxonox.CommandExecutor:query("getConfig GraphicsSettings fpsLimit") 130 130 fpsEditbox:setText(currentFpsLimit) 131 131 132 132 -- 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")) 134 134 local currentParticleLod = orxonox.CommandExecutor:query("getConfig GraphicsSettings particlesDetailLevel") 135 135 … … 146 146 147 147 -- mesh lod checkbox 148 local meshLodCheckbox = winMgr:getWindow("orxonox/Settings/MeshLodCheckbox")148 local meshLodCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/MeshLodCheckbox") 149 149 local hasMeshLod = orxonox.CommandExecutor:query("getConfig GraphicsSettings enableMeshLoD") 150 150 if hasMeshLod == "true" then … … 156 156 157 157 -- motion blur checkbox 158 local motionBlurCheckbox = winMgr:getWindow("orxonox/Settings/MotionBlurCheckbox")158 local motionBlurCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/MotionBlurCheckbox") 159 159 local hasMotionBlur = orxonox.CommandExecutor:query("getConfig GraphicsSettings enableMotionBlur") 160 160 if hasMotionBlur == "true" then … … 168 168 function P:onWindowResized() 169 169 -- fullscreen checkbox 170 local fullscreenCheckbox = winMgr:getWindow("orxonox/Display/Resolution/Fullscreen")170 local fullscreenCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Fullscreen") 171 171 local isFullscreen = orxonox.GraphicsManager:getInstance():isFullScreen() 172 172 CEGUI.toCheckbox(fullscreenCheckbox):setSelected(isFullscreen) 173 173 174 174 -- 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")) 176 176 177 177 local currentWidth = orxonox.GraphicsManager:getInstance():getWindowWidth() … … 202 202 function P.updateResolutionEditboxes() 203 203 -- 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")) 205 205 206 206 local currentWidth = orxonox.GraphicsManager:getInstance():getWindowWidth() … … 208 208 209 209 -- 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") 212 212 widthEditbox:disable() 213 213 heightEditbox:disable() … … 233 233 function P.updateApplyButton() 234 234 -- fullscreen checkbox 235 local fullscreenCheckbox = winMgr:getWindow("orxonox/Display/Resolution/Fullscreen")235 local fullscreenCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Fullscreen") 236 236 local isFullscreen = orxonox.GraphicsManager:getInstance():isFullScreen() 237 237 local fullscreenChanged = (isFullscreen ~= CEGUI.toCheckbox(fullscreenCheckbox):isSelected()) 238 238 239 239 -- 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") 242 242 local currentWidth = tostring(orxonox.GraphicsManager:getInstance():getWindowWidth()) 243 243 local currentHeight = tostring(orxonox.GraphicsManager:getInstance():getWindowHeight()) … … 247 247 248 248 -- apply button 249 local applyButton = winMgr:getWindow("orxonox/Display/Resolution/Apply")249 local applyButton = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Apply") 250 250 251 251 if fullscreenChanged or widthChanged or heightChanged or resolutionEditboxesEnabled then … … 258 258 function P.updateRedLabel() 259 259 -- theme 260 local themeCombobox = winMgr:getWindow("orxonox/Display/Theme/Combobox")260 local themeCombobox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Theme/Combobox") 261 261 local currentTheme = orxonox.CommandExecutor:query("getConfig GUIManager guiScheme_") 262 262 local themeChanged = (currentTheme ~= themeCombobox:getText()) 263 263 264 264 -- vsync 265 local vsyncCheckbox = winMgr:getWindow("orxonox/Display/More/VSync")265 local vsyncCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/VSync") 266 266 local hasVSync = orxonox.GraphicsManager:getInstance():hasVSyncEnabled() 267 267 local vsyncChanged = (hasVSync ~= CEGUI.toCheckbox(vsyncCheckbox):isSelected()) 268 268 269 269 -- fsaa 270 local fsaaCombobox = winMgr:getWindow("orxonox/Display/More/FSAA")270 local fsaaCombobox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/FSAA") 271 271 local currentFSAAMode = orxonox.GraphicsManager:getInstance():getFSAAMode() 272 272 local fsaaChanged = (currentFSAAMode ~= fsaaCombobox:getText()) … … 274 274 local needRestart = themeChanged or vsyncChanged or fsaaChanged 275 275 276 local notice = winMgr:getWindow("orxonox/Display/Notice")276 local notice = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Notice") 277 277 notice:setVisible(not needRestart) 278 local noticeRed = winMgr:getWindow("orxonox/Display/NoticeRed")278 local noticeRed = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/NoticeRed") 279 279 noticeRed:setVisible(needRestart) 280 280 end … … 286 286 -- resolution 287 287 288 function P.callback_FullscreenCheckbox_ CheckStateChanged(e)288 function P.callback_FullscreenCheckbox_SelectStateChanged(e) 289 289 P.updateApplyButton() 290 290 end … … 310 310 -- vsync 311 311 312 function P.callback_VSyncCheckbox_ CheckStateChanged(e)312 function P.callback_VSyncCheckbox_SelectStateChanged(e) 313 313 P.updateRedLabel() 314 314 end … … 324 324 function P.callback_Apply_Clicked(e) 325 325 -- resolution 326 local fullscreenCheckbox = winMgr:getWindow("orxonox/Display/Resolution/Fullscreen")326 local fullscreenCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/Fullscreen") 327 327 local checkedFullscreen = tostring(CEGUI.toCheckbox(fullscreenCheckbox):isSelected()) 328 328 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") 331 331 332 332 P.newWidth = widthEditbox:getText() … … 339 339 P.oldFullscreen = orxonox.GraphicsManager:getInstance():isFullScreen() 340 340 341 P.revertTimerHandle = orxonox.CommandExecutor:query("delayreal 10 {hideGUI DecisionPopup; GraphicsManager setScreenResolution " .. P.oldWidth .. " " .. P.oldHeight .. " " .. tostring(P.oldFullscreen) .. "; config Core lastLevelTimestamp_ [expr [getConfig CoreogreConfigTimestamp_] + 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]}") 342 342 343 343 -- change settings … … 362 362 363 363 -- 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 CoreogreConfigTimestamp_] + 1]")364 orxonox.CommandExecutor:execute("config CoreConfig lastLevelTimestamp_ [expr [getConfig CoreConfig ogreConfigTimestamp_] + 1]") 365 365 end 366 366 367 367 function P.callback_Ok_Clicked(e) 368 368 -- aspect ratio 369 local aspectRatioEditbox = winMgr:getWindow("orxonox/Display/Resolution/AspectRatio")369 local aspectRatioEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Resolution/AspectRatio") 370 370 orxonox.CommandExecutor:execute("config Camera aspectRatio_ " .. aspectRatioEditbox:getText()) 371 371 372 372 -- theme 373 local themeCombobox = winMgr:getWindow("orxonox/Display/Theme/Combobox")373 local themeCombobox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/Theme/Combobox") 374 374 orxonox.CommandExecutor:execute("config GUIManager guiScheme_ " .. themeCombobox:getText()) 375 375 376 376 -- vsync 377 local vsyncCheckbox = winMgr:getWindow("orxonox/Display/More/VSync")377 local vsyncCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/VSync") 378 378 local hasVSync = orxonox.GraphicsManager:getInstance():hasVSyncEnabled() 379 379 if hasVSync ~= CEGUI.toCheckbox(vsyncCheckbox):isSelected() then … … 382 382 383 383 -- fsaa 384 local fsaaCombobox = winMgr:getWindow("orxonox/Display/More/FSAA")384 local fsaaCombobox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Display/More/FSAA") 385 385 local currentFSAAMode = orxonox.GraphicsManager:getInstance():getFSAAMode() 386 386 if currentFSAAMode ~= fsaaCombobox:getText() then … … 389 389 390 390 -- fov 391 local fovEditbox = winMgr:getWindow("orxonox/Settings/Fov")391 local fovEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/Fov") 392 392 orxonox.CommandExecutor:execute("config Camera fov_ " .. fovEditbox:getText()) 393 393 394 394 -- fps limit 395 local fpsEditbox = winMgr:getWindow("orxonox/Settings/FpsLimit")395 local fpsEditbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/FpsLimit") 396 396 orxonox.CommandExecutor:execute("config GraphicsSettings fpsLimit " .. fpsEditbox:getText()) 397 397 398 398 -- particle lod 399 local particleLodCombobox = CEGUI.toCombobox( winMgr:getWindow("orxonox/Settings/ParticleLodCombobox"))399 local particleLodCombobox = CEGUI.toCombobox(P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/ParticleLodCombobox")) 400 400 local item = particleLodCombobox:getSelectedItem() 401 401 if item then … … 404 404 405 405 -- mesh lod 406 local meshLodCheckbox = winMgr:getWindow("orxonox/Settings/MeshLodCheckbox")406 local meshLodCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/MeshLodCheckbox") 407 407 orxonox.CommandExecutor:execute("config GraphicsSettings enableMeshLoD " .. tostring(CEGUI.toCheckbox(meshLodCheckbox):isSelected())) 408 408 409 409 -- motion blur 410 local motionBlurCheckbox = winMgr:getWindow("orxonox/Settings/MotionBlurCheckbox")410 local motionBlurCheckbox = P.window:getChild("GraphicsWindow/GraphicsTabControl/Settings/MotionBlurCheckbox") 411 411 orxonox.CommandExecutor:execute("config GraphicsSettings enableMotionBlur " .. tostring(CEGUI.toCheckbox(motionBlurCheckbox):isSelected())) 412 412 -
code/branches/cegui0.8_ogre1.9/data/gui/scripts/InfoPopup.lua
r6746 r11800 14 14 15 15 function P.setText(text) 16 winMgr:getWindow("orxonox/InfoPopup_text"):setText( text )16 P.window:getChild("InfoPopup_Background/InfoPopup_text"):setText( text ) 17 17 end 18 18 19 19 function P.setCloseButton(closeButton) 20 close = winMgr:getWindow("orxonox/InfoPopup_close")20 close = P.window:getChild("InfoPopup_Background/InfoPopup_close") 21 21 close:setVisible(closeButton) 22 22 if(not closeButton) then -
code/branches/cegui0.8_ogre1.9/data/gui/scripts/KeyBindMenu.lua
r11704 r11800 79 79 80 80 --Calculate design parameters: 81 sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", " orxonox/KeyBindPane/SampleWindow")81 sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "KeyBindPane/SampleWindow") 82 82 sampleWindow:setText("SampleText") 83 83 … … 112 112 113 113 P:setButton(1, 1, { 114 ["button"] = winMgr:getWindow("orxonox/KeyBindBackButton"),114 ["button"] = P.window:getChild("KeyBindBackButton"), 115 115 ["callback"] = P.KeyBindBackButton_clicked 116 116 }) … … 137 137 function P.createLine(k) 138 138 local offset = 0 139 local line = winMgr:createWindow("DefaultWindow", " orxonox/KeyBindPane/Binding" .. k)139 local line = winMgr:createWindow("DefaultWindow", "Binding" .. k) 140 140 line:setHeight(CEGUI.UDim(0, lineHeight)) 141 141 line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, lineHeight*(k-1)))) 142 142 143 local command = winMgr:createWindow("MenuWidgets/StaticText", " orxonox/KeyBindPane/Binding" .. k .. "/Command")143 local command = winMgr:createWindow("MenuWidgets/StaticText", "Command") 144 144 command:setText(nameList[k]) 145 command:setSize(CEGUI.U Vector2(CEGUI.UDim(0, commandWidth), CEGUI.UDim(1, 0)))145 command:setSize(CEGUI.USize(CEGUI.UDim(0, commandWidth), CEGUI.UDim(1, 0))) 146 146 command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0, 0))) 147 line:addChild Window(command)147 line:addChild(command) 148 148 offset = offset + commandWidth + spaceWidth 149 149 150 local plus = winMgr:createWindow("MenuWidgets/TabButton", " orxonox/KeyBindPane/Binding" .. k .. "/Plus")151 plus:setSize(CEGUI.U Vector2(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))) 152 152 plus:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0))) 153 153 plus:setText("add") 154 154 orxonox.GUIManager:subscribeEventHelper(plus, "Clicked", P.name .. ".KeyBindPlus_clicked") 155 line:addChild Window(plus)155 line:addChild(plus) 156 156 offset = offset + addWidth + spaceWidth 157 157 158 158 local numButtons = orxonox.KeyBinderManager:getInstance():getCurrent():getNumberOfBindings(commandList[k]); 159 159 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) 161 161 local name = orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(commandList[k],i) 162 162 name = P.KeyNameNiceifier(name) … … 165 165 local size = getMinTextSize(sampleWindow) 166 166 local buttonWidth = size[2] 167 button:setSize(CEGUI.U Vector2(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0.7, 0)))167 button:setSize(CEGUI.USize(CEGUI.UDim(0, buttonWidth), CEGUI.UDim(0.7, 0))) 168 168 button:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0))) 169 169 orxonox.GUIManager:subscribeEventHelper(button, "Clicked", P.name .. ".KeyBindButton_clicked") 170 170 --button:subscribeScriptedEvent("EventClicked", P.name .. ".KeyBindButton_clicked") 171 line:addChild Window(button)171 line:addChild(button) 172 172 offset = offset + buttonWidth 173 173 174 local clear = winMgr:createWindow("MenuWidgets/TabButton", " orxonox/KeyBindPane/Binding" .. k .. "/Clear" .. i)175 clear:setSize(CEGUI.U Vector2(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))) 176 176 clear:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.15, 0))) 177 177 clear:setText("X") 178 178 orxonox.GUIManager:subscribeEventHelper(clear, "Clicked", P.name .. ".KeyBindClear_clicked") 179 line:addChild Window(clear)179 line:addChild(clear) 180 180 offset = offset + clearWidth + spaceWidth 181 181 end … … 187 187 188 188 function P.createLines() 189 local window = winMgr:getWindow("orxonox/KeyBindPane")189 local window = P.window:getChild("KeyBindWindow/KeyBindWrapper/KeyBindPane") 190 190 191 191 for k,v in pairs(commandList) do 192 192 local line = P.createLine(k) 193 193 table.insert(linesList, line) 194 window:addChild Window(line)194 window:addChild(line) 195 195 end 196 196 … … 201 201 function P.KeyBindButton_clicked(e) 202 202 local we = CEGUI.toWindowEventArgs(e) 203 local name = we.window:getName ()203 local name = we.window:getNamePath() 204 204 205 205 local match = string.gmatch(name, "%d+") … … 215 215 function P.KeyBindPlus_clicked(e) 216 216 local we = CEGUI.toWindowEventArgs(e) 217 local name = we.window:getName ()217 local name = we.window:getNamePath() 218 218 219 219 local match = string.gmatch(name, "%d+") … … 227 227 function P.KeyBindClear_clicked(e) 228 228 local we = CEGUI.toWindowEventArgs(e) 229 local name = we.window:getName ()229 local name = we.window:getNamePath() 230 230 231 231 local match = string.gmatch(name, "%d+") … … 251 251 252 252 function 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") 254 254 local position = pane:getVerticalScrollPosition() 255 255 while table.getn(linesList) ~= 0 do 256 256 if linesList[1] ~= nil then 257 winMgr:destroyWindow( linesList[1]:getName())257 winMgr:destroyWindow(pane:getChild(linesList[1]:getName())) 258 258 end 259 259 table.remove(linesList, 1) -
code/branches/cegui0.8_ogre1.9/data/gui/scripts/MiscConfigMenu.lua
r11356 r11800 18 18 19 19 P.commandList = {} 20 table.insert(P.commandList, "Highscore playerName_")21 20 table.insert(P.commandList, "KeyBinder mouseSensitivity_") 22 21 table.insert(P.commandList, "KeyBinder mouseSensitivityDerived_") … … 24 23 table.insert(P.commandList, "KeyBinder mouseWheelStepSize_") 25 24 table.insert(P.commandList, "Shell maxHistoryLength_") 26 table.insert(P.commandList, "Core bStartIOConsole_")27 table.insert(P.commandList, "G ame fpsLimit_")25 table.insert(P.commandList, "CoreConfig bStartIOConsole_") 26 table.insert(P.commandList, "GraphicsSettings fpsLimit") 28 27 table.insert(P.commandList, "Spectator speed_") 29 28 table.insert(P.commandList, "SpaceShip bInvertYAxis_") … … 34 33 table.insert(P.commandList, "Gametype numberOfBots_") 35 34 table.insert(P.commandList, "UnderAttack gameTime_") 36 table.insert(P.commandList, "Team Deathmatchteams_")35 table.insert(P.commandList, "TeamGametype teams_") 37 36 table.insert(P.commandList, "TeamDeathmatch maxScore_") 38 37 table.insert(P.commandList, "HumanPlayer nick_") 39 38 table.insert(P.commandList, "ChatOverlay displayTime_") 40 table.insert(P.commandList, "Core bDevMode_")39 table.insert(P.commandList, "CoreConfig bDevMode_") 41 40 table.insert(P.commandList, "HUDNavigation MarkerLimit_") 42 table.insert(P.commandList, "HUDNavigation showDistance ")41 table.insert(P.commandList, "HUDNavigation showDistance_") 43 42 table.insert(P.commandList, "HUDRadar RadarMode_") 44 43 45 44 P.nameList = {} 46 table.insert(P.nameList, "Playername")47 45 table.insert(P.nameList, "Mouse sensitivity") 48 46 table.insert(P.nameList, "Mouse acceleration") … … 60 58 table.insert(P.nameList, "Number of Bots") 61 59 table.insert(P.nameList, "UnderAttack: game time") 62 table.insert(P.nameList, "Team Deathmatch: Number of teams")60 table.insert(P.nameList, "TeamGametype: Number of teams") 63 61 table.insert(P.nameList, "TeamDeathmatch: Score needed to end the game") 64 62 table.insert(P.nameList, "Playername") … … 72 70 73 71 --Calculate design parameters: 74 P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", " orxonox/MiscConfigMenu/MiscConfigPane/SampleWindow")72 P.sampleWindow = winMgr:createWindow("MenuWidgets/StaticText", "MiscConfigMenu/MiscConfigPane/SampleWindow") 75 73 P.sampleWindow:setText("SampleText") 76 74 … … 93 91 P.spaceWidth = 10 94 92 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") 96 94 size = pane:getViewableArea() 97 95 P.editboxWidth = size:getWidth() - P.commandWidth - P.resetWidth - 5*P.spaceWidth … … 100 98 101 99 P:setButton(1, 1, { 102 ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/CancelButton"),100 ["button"] = P.window:getChild("CancelButton"), 103 101 ["callback"] = P.MiscConfigCancelButton_clicked 104 102 }) 105 103 106 104 P:setButton(1, 2, { 107 ["button"] = winMgr:getWindow("orxonox/MiscConfigMenu/OKButton"),105 ["button"] = P.window:getChild("OKButton"), 108 106 ["callback"] = P.MiscConfigOKButton_clicked 109 107 }) … … 113 111 local offset = 0 114 112 -- 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) 116 114 line:setHeight(CEGUI.UDim(0, P.lineHeight)) 117 115 line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, P.lineHeight*(k-1)))) 118 116 119 117 -- config name 120 local command = winMgr:createWindow("MenuWidgets/StaticText", " orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Command")118 local command = winMgr:createWindow("MenuWidgets/StaticText", "Command") 121 119 command:setText(P.nameList[k]) 122 command:setSize(CEGUI.U Vector2(CEGUI.UDim(0, P.commandWidth), CEGUI.UDim(1, 0)))120 command:setSize(CEGUI.USize(CEGUI.UDim(0, P.commandWidth), CEGUI.UDim(1, 0))) 123 121 command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0, 0))) 124 line:addChild Window(command)122 line:addChild(command) 125 123 offset = offset + P.commandWidth + P.spaceWidth 126 124 127 125 -- config value (editable) 128 local configvalue = winMgr:createWindow("MenuWidgets/Editbox", " orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Configvalue")126 local configvalue = winMgr:createWindow("MenuWidgets/Editbox", "Configvalue") 129 127 configvalue:setProperty("ReadOnly", "set:False") 130 128 local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[k]) 131 129 configvalue:setText(value) 132 configvalue:setSize(CEGUI.U Vector2(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))) 133 131 configvalue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0))) 134 132 -- enable the reset button if the value changed 135 133 orxonox.GUIManager:subscribeEventHelper(configvalue, "TextAccepted", P.name .. ".MiscConfigEditbox_textAccepted") 136 line:addChild Window(configvalue)134 line:addChild(configvalue) 137 135 offset = offset + P.editboxWidth + P.spaceWidth 138 136 139 137 -- reset button (only available when value changed) 140 local reset = winMgr:createWindow("MenuWidgets/Button", " orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. k .. "/Reset")141 reset:setSize(CEGUI.U Vector2(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))) 142 140 reset:setPosition(CEGUI.UVector2(CEGUI.UDim(0, offset), CEGUI.UDim(0.05, 0))) 143 141 reset:setText("reset") 144 142 orxonox.GUIManager:subscribeEventHelper(reset, "Clicked", P.name .. ".MiscConfigResetButton_clicked") 145 line:addChild Window(reset)143 line:addChild(reset) 146 144 reset:setEnabled(false) 147 145 offset = offset + P.resetWidth + P.spaceWidth … … 153 151 154 152 function P.createLines() 155 local window = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane")153 local window = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane") 156 154 157 155 for k,v in pairs(P.commandList) do 158 156 local line = P.createLine(k) 159 157 table.insert(P.linesList, line) 160 window:addChild Window(line)158 window:addChild(line) 161 159 end 162 160 … … 168 166 for k,v in pairs(P.commandList) do 169 167 -- 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") 171 169 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") 173 171 resetButton:setEnabled(false) 174 172 end … … 183 181 function P.MiscConfigEditbox_textAccepted(e) 184 182 local we = CEGUI.toWindowEventArgs(e) 185 local name = we.window:getName ()183 local name = we.window:getNamePath() 186 184 187 185 local match = string.gmatch(name, "%d+") 188 186 local commandNr = tonumber(match()) 189 187 190 local resetButton = winMgr:getWindow("orxonox/MiscConfigMenu/MiscConfigPane/ConfigCommand" .. commandNr .. "/Reset")188 local resetButton = P.window:getChild("ConfigWindow/Wrapper/MiscConfigPane/ConfigCommand" .. commandNr .. "/Reset") 191 189 resetButton:setEnabled(true) 192 190 end … … 194 192 function P.MiscConfigResetButton_clicked(e) 195 193 local we = CEGUI.toWindowEventArgs(e) 196 local name = we.window:getName ()194 local name = we.window:getNamePath() 197 195 198 196 local match = string.gmatch(name, "%d+") … … 200 198 201 199 -- 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") 203 201 local value = orxonox.CommandExecutor:query("getConfig " .. P.commandList[commandNr]) 204 202 editbox:setText(value) -
code/branches/cegui0.8_ogre1.9/data/gui/scripts/MouseControlsMenu.lua
r8079 r11800 5 5 function P.onLoad() 6 6 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") 12 12 mousenormalscrollbar_active = false 13 13 mousederivescrollbar_active = false … … 34 34 35 35 P:setButton(1, 1, { 36 ["button"] = winMgr:getWindow("orxonox/MouseControlsBackButton"),36 ["button"] = P.window:getChild("MouseControlsBackButton"), 37 37 ["callback"] = P.MouseControlsBackButton_clicked 38 38 }) -
code/branches/cegui0.8_ogre1.9/data/gui/scripts/SettingsMenu.lua
r8351 r11800 8 8 --buttons are arranged in a 4x2 matrix. 9 9 P:setButton(1, 2, { 10 ["button"] = winMgr:getWindow("orxonox/SettingsMenu/GraphicsButton"),10 ["button"] = P.window:getChild("SettingsWindow/GraphicsButton"), 11 11 ["callback"] = P.SettingsGraphicsButton_clicked 12 12 }) 13 13 14 14 P:setButton(2, 2, { 15 ["button"] = winMgr:getWindow("orxonox/SettingsMenu/AudioButton"),15 ["button"] = P.window:getChild("SettingsWindow/AudioButton"), 16 16 ["callback"] = P.SettingsAudioButton_clicked 17 17 }) 18 18 19 19 P:setButton(3, 1, { 20 ["button"] = winMgr:getWindow("orxonox/SettingsMenu/ControlsButton"),20 ["button"] = P.window:getChild("SettingsWindow/ControlsButton"), 21 21 ["callback"] = P.SettingsControlsButton_clicked 22 22 }) 23 23 24 24 P:setButton(3, 2, { 25 ["button"] = winMgr:getWindow("orxonox/SettingsMenu/MiscellaneousButton"),25 ["button"] = P.window:getChild("SettingsWindow/MiscellaneousButton"), 26 26 ["callback"] = P.SettingsMiscellaneousButton_clicked 27 27 }) 28 28 29 29 P:setButton(4, 1, { 30 ["button"] = winMgr:getWindow("orxonox/SettingsMenu/SettingsBackButton"),30 ["button"] = P.window:getChild("SettingsBackButton"), 31 31 ["callback"] = P.SettingsBackButton_clicked 32 32 }) … … 36 36 37 37 function P.onShow() 38 local window = winMgr:getWindow("orxonox/SettingsMenu/AudioButton")38 local window = P.window:getChild("SettingsWindow/AudioButton") 39 39 if not orxonox.SoundManager:exists() then 40 40 window:setProperty("Disabled", "true")
Note: See TracChangeset
for help on using the changeset viewer.