Changeset 6238 for code/branches
- Timestamp:
- Dec 4, 2009, 12:20:57 AM (15 years ago)
- Location:
- code/branches/presentation2/data/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/data/gui/layouts/GraphicsMenu.layout
r6206 r6238 77 77 </Window> 78 78 <Window Type="TaharezLook/StaticText" Name="orxonox/GraphicsAvailable" > 79 <Property Name="Text" Value=" Changes in graphics settings are not yet available." />79 <Property Name="Text" Value="All the graphics functions are not yet available." /> 80 80 <Property Name="TextColours" Value="FFFF0000" /> 81 81 <Property Name="InheritsAlpha" Value="False" /> -
code/branches/presentation2/data/gui/layouts/MouseControlsMenu.layout
r6206 r6238 16 16 <Property Name="VertFormatting" Value="TopAligned" /> 17 17 <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.325,0},{0.75,0},{0.6,0}}" /> 18 <Window Type="TaharezLook/StaticText" Name="orxonox/Mouse Sensitivity" >19 <Property Name="Text" Value=" Mouse sensitivity" />18 <Window Type="TaharezLook/StaticText" Name="orxonox/MouseNormalSensitivity" > 19 <Property Name="Text" Value="Sensitivity (normal mode) " /> 20 20 <Property Name="InheritsAlpha" Value="False" /> 21 21 <Property Name="HorzFormatting" Value="HorzCentred" /> … … 23 23 <Property Name="VertFormatting" Value="TopAligned" /> 24 24 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.95,0},{0.45,0}}" /> 25 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/Mouse Scrollbar" >25 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MouseNormalScrollbar" > 26 26 <Property Name="PageSize" Value="0" /> 27 27 <Property Name="StepSize" Value="1" /> … … 31 31 <Property Name="StepSize" Value="0.1" /> 32 32 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 33 <Property Name="UnifiedAreaRect" Value="{{0.02,0},{0.6,0},{0.98,0},{0.8,0}}" /> 34 <Event Name="ThumbTrackStarted" Function="MouseControlsMenu.MouseControlsMouseScrollbar_started" /> 35 <Event Name="ThumbTrackEnded" Function="MouseControlsMenu.MouseControlsMouseScrollbar_ended" /> 36 <Event Name="ScrollPosChanged" Function="MouseControlsMenu.MouseControlsMouseScrollbar_changed" /> 33 <Property Name="UnifiedAreaRect" Value="{{0.02,0},{0.6,0},{0.565,0},{0.8,0}}" /> 34 <Event Name="ThumbTrackStarted" Function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_started" /> 35 <Event Name="ThumbTrackEnded" Function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_ended" /> 36 <Event Name="ScrollPosChanged" Function="MouseControlsMenu.MouseControlsMouseNormalScrollbar_changed" /> 37 </Window> 38 <Window Type="TaharezLook/RadioButton" Name="orxonox/MouseNormalButton" > 39 <Property Name="Text" Value="Normal mouse input" /> 40 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 41 <Property Name="UnifiedAreaRect" Value="{{0.61,0},{0.5,0},{0.975,0},{0.85,0}}" /> 42 <Event Name="SelectStateChanged" Function="MouseControlsMenu.MouseNormalButton_clicked" /> 37 43 </Window> 38 44 </Window> 39 <Window Type="TaharezLook/StaticText" Name="orxonox/Mouse ControlMode" >40 <Property Name="Text" Value=" Mouse control mode" />45 <Window Type="TaharezLook/StaticText" Name="orxonox/MouseDeriveSensitivity" > 46 <Property Name="Text" Value="Sensitivity (derive mode) " /> 41 47 <Property Name="InheritsAlpha" Value="False" /> 42 48 <Property Name="HorzFormatting" Value="HorzCentred" /> 43 49 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 44 50 <Property Name="VertFormatting" Value="TopAligned" /> 45 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.55,0},{0.95,0},{0.9,0}}" /> 46 <Window Type="TaharezLook/RadioButton" Name="orxonox/MouseControlButton1" > 47 <Property Name="Text" Value="Default control mode" /> 51 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.55,0},{0.95,0},{0.8,0}}" /> 52 <Window Type="TaharezLook/HorizontalScrollbar" Name="orxonox/MouseDeriveScrollbar" > 53 <Property Name="PageSize" Value="0" /> 54 <Property Name="StepSize" Value="1" /> 55 <Property Name="OverlapSize" Value="0" /> 56 <Property Name="DocumentSize" Value="1" /> 57 <Property Name="ScrollPosition" Value="0" /> 58 <Property Name="StepSize" Value="0.1" /> 48 59 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 49 <Property Name="UnifiedAreaRect" Value="{{0.03,0},{0.6,0},{0.47,0},{0.8,0}}" /> 50 <Event Name="SelectStateChanged" Function="MouseControlsMenu.MouseControlsDefaultButton_clicked" /> 60 <Property Name="UnifiedAreaRect" Value="{{0.02,0},{0.6,0},{0.565,0},{0.8,0}}" /> 61 <Event Name="ThumbTrackStarted" Function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_started" /> 62 <Event Name="ThumbTrackEnded" Function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_ended" /> 63 <Event Name="ScrollPosChanged" Function="MouseControlsMenu.MouseControlsMouseDeriveScrollbar_changed" /> 51 64 </Window> 52 <Window Type="TaharezLook/RadioButton" Name="orxonox/Mouse ControlButton2" >53 <Property Name="Text" Value=" .............................................." />65 <Window Type="TaharezLook/RadioButton" Name="orxonox/MouseDeriveButton" > 66 <Property Name="Text" Value="Derive mouse input" /> 54 67 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 55 <Property Name="UnifiedAreaRect" Value="{{0. 53,0},{0.6,0},{0.97,0},{0.8,0}}" />56 <Event Name="SelectStateChanged" Function="MouseControlsMenu.Mouse Controls_______Button_clicked" />68 <Property Name="UnifiedAreaRect" Value="{{0.61,0},{0.5,0},{0.975,0},{0.85,0}}" /> 69 <Event Name="SelectStateChanged" Function="MouseControlsMenu.MouseDeriveButton_clicked" /> 57 70 </Window> 71 </Window> 72 <Window Type="TaharezLook/Checkbox" Name="orxonox/MouseInvertCheckbox" > 73 <Property Name="Text" Value="Invert mouse" /> 74 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 75 <Property Name="UnifiedAreaRect" Value="{{0.39,0},{0.85,0},{0.61,0},{0.95,0}}" /> 76 <Event Name="CheckStateChanged" Function="MouseControlsMenu.MouseInvertCheckbox_clicked" /> 58 77 </Window> 59 78 </Window> … … 65 84 </Window> 66 85 <Window Type="TaharezLook/StaticText" Name="orxonox/MouseControlsAvailable" > 67 <Property Name="Text" Value=" Changes in mouse controls settings are not yet available." />86 <Property Name="Text" Value="The button functions are not yet available." /> 68 87 <Property Name="TextColours" Value="FFFF0000" /> 69 88 <Property Name="InheritsAlpha" Value="False" /> -
code/branches/presentation2/data/gui/scripts/MouseControlsMenu.lua
r6206 r6238 12 12 P.layoutString = "MouseControlsMenu.layout" 13 13 14 local scrollbar_active = false 15 16 function P.MouseControlsMouseScrollbar_changed(e) 17 if scrollbar_active == false then 18 -- mouse sensitivity 19 debug("event: mouse sensitivity") 14 function P:init() 15 block = false 16 mousenormalscrollbarwindow = tolua.cast(winMgr:getWindow("orxonox/MouseNormalScrollbar"),"CEGUI::Scrollbar") 17 mousederivescrollbarwindow = tolua.cast(winMgr:getWindow("orxonox/MouseDeriveScrollbar"),"CEGUI::Scrollbar") 18 normalwindow = tolua.cast(winMgr:getWindow("orxonox/MouseNormalButton"),"CEGUI::RadioButton") 19 derivewindow = tolua.cast(winMgr:getWindow("orxonox/MouseDeriveButton"),"CEGUI::RadioButton") 20 invertwindow = tolua.cast(winMgr:getWindow("orxonox/MouseInvertCheckbox"),"CEGUI::Checkbox") 21 mousenormalscrollbar_active = false 22 mousederivescrollbar_active = false 23 derive_active = orxonox.getConfig("KeyBinder","bDeriveMouseInput_") 24 invert_active = false 25 mousenormalsensitivity = orxonox.getConfig("KeyBinder","mouseSensitivity_") 26 mousederivesensitivity = orxonox.getConfig("KeyBinder","mouseSensitivityDerived_") 27 mousenormalscrollbarwindow:setScrollPosition((math.log(14*mousenormalsensitivity-6))/(6*math.log(2))) 28 mousederivescrollbarwindow:setScrollPosition((math.log(14*mousederivesensitivity-6))/(6*math.log(2))) 29 if derive_active == "true" then 30 normal_active = false 31 derive_active = true 32 derivewindow:setSelected(derive_active) 33 else 34 normal_active = true 35 derive_active = false 36 normalwindow:setSelected(normal_active) 37 end 38 if invert_active == "true" then 39 invert_active = true 40 else 41 invert_active = false 20 42 end 21 43 end 22 44 23 function P.MouseControlsMouseScrollbar_started(e) 24 scrollbar_active = true 45 function P.MouseControlsMouseNormalScrollbar_changed(e) 46 if mousenormalscrollbar_active == false then 47 scrollposition = mousenormalscrollbarwindow:getScrollPosition() 48 mousenormalsensitivity = (math.pow(64,scrollposition)+6)/14 49 orxonox.CommandExecutor:execute("config KeyBinder mouseSensitivity_ " .. mousenormalsensitivity) 50 end 25 51 end 26 52 27 function P.MouseControlsMouseScrollbar_ended(e) 28 -- mouse sensitivity 29 debug("event: mouse sensitivity") 30 scrollbar_active = false 53 function P.MouseControlsMouseNormalScrollbar_started(e) 54 mousenormalscrollbar_active = true 31 55 end 32 56 33 function P.MouseControlsDefaultButton_clicked(e) 34 -- default control mode 35 debug("event: default control mode") 57 function P.MouseControlsMouseNormalScrollbar_ended(e) 58 scrollposition = mousenormalscrollbarwindow:getScrollPosition() 59 mousenormalsensitivity = (math.pow(64,scrollposition)+6)/14 60 orxonox.CommandExecutor:execute("config KeyBinder mouseSensitivity_ " .. mousenormalsensitivity) 61 mousenormalscrollbar_active = false 36 62 end 37 63 38 function P.MouseControls_______Button_clicked(e) 39 -- ....... 40 debug("event: .......") 64 function P.MouseControlsMouseDeriveScrollbar_changed(e) 65 if mousederivescrollbar_active == false then 66 scrollposition = mousederivescrollbarwindow:getScrollPosition() 67 mousederivesensitivity = (math.pow(64,scrollposition)+6)/14 68 orxonox.CommandExecutor:execute("config KeyBinder mouseSensitivityDerived_ " .. mousederivesensitivity) 69 end 70 end 71 72 function P.MouseControlsMouseDeriveScrollbar_started(e) 73 mousederivescrollbar_active = true 74 end 75 76 function P.MouseControlsMouseDeriveScrollbar_ended(e) 77 scrollposition = mousederivescrollbarwindow:getScrollPosition() 78 mousederivesensitivity = (math.pow(64,scrollposition)+6)/14 79 orxonox.CommandExecutor:execute("config KeyBinder mouseSensitivityDerived_ " .. mousederivesensitivity) 80 mousederivescrollbar_active = false 81 end 82 83 function P.MouseNormalButton_clicked(e) 84 if block == false then 85 block = true 86 derivewindow:setSelected(false) 87 block = false 88 -- normal mouse input 89 debug("event: normal mouse input") 90 end 91 end 92 93 function P.MouseDeriveButton_clicked(e) 94 if block == false then 95 block = true 96 normalwindow:setSelected(false) 97 block = false 98 -- derive mouse input 99 debug("event: derive mouse input") 100 end 101 end 102 103 function P.MouseInvertCheckbox_clicked(e) 104 -- invert mouse 105 debug("event: invert mouse") 41 106 end 42 107
Note: See TracChangeset
for help on using the changeset viewer.