Changeset 6292 for code/branches/presentation2/data/gui
- Timestamp:
- Dec 9, 2009, 3:56:03 PM (15 years ago)
- Location:
- code/branches/presentation2/data/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/data/gui/layouts/GraphicsMenu.layout
r6262 r6292 53 53 <Property Name="Text" Value="Fullscreen" /> 54 54 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 55 <Property Name="UnifiedAreaRect" Value="{{0. 525,0},{0.4,0},{0.95,0},{0.475,0}}" />55 <Property Name="UnifiedAreaRect" Value="{{0.65,0},{0.4,0},{0.85,0},{0.475,0}}" /> 56 56 <Event Name="CheckStateChanged" Function="GraphicsMenu.GraphicsFullscreenCheckbox_clicked"/> 57 57 </Window> -
code/branches/presentation2/data/gui/layouts/KeyBindMenu.layout
r6266 r6292 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 3 3 4 <GUILayout > 5 4 6 <Window Type="DefaultWindow" Name="orxonox/KeyBindMenu/Background" > 7 5 8 <Property Name="InheritsAlpha" Value="False" /> 9 6 10 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 11 7 12 <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> 13 8 14 <Window Type="TaharezLook/StaticText" Name="orxonox/KeyBindWindow" > 9 <Property Name="Text" Value="KeyBindings" /> 15 16 <Property Name="Text" Value="Keybindings" /> 17 10 18 <Property Name="Alpha" Value="0.8" /> 19 11 20 <Property Name="InheritsAlpha" Value="False" /> 21 12 22 <Property Name="HorzFormatting" Value="HorzCentred" /> 23 13 24 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 25 14 26 <Property Name="VertFormatting" Value="TopAligned" /> 15 <Property Name="UnifiedAreaRect" Value="{{0.2 5,0},{0.325,0},{0.75,0},{0.6,0}}" />16 <Window Type="TaharezLook/ScrollablePane" Name="orxonox/KeyBindPane" > 17 <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" />18 <Property Name=" HorzStepSize" Value="0.1" />19 <Property Name=" VertStepSize" Value="0.1" />27 <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.25,0},{0.8,0},{0.6,0}}" /> 28 29 <Window Type="TaharezLook/StaticText" Name="orxonox/KeyBindText" > 30 <Property Name="TextColours" Value="FF4444FF" /> 31 <Property Name="InheritsAlpha" Value="False" /> 20 32 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 21 <Property Name="HorzOverlapSize" Value="0.01" /> 22 <Property Name="UnifiedAreaRect" Value="{{0.025,0},{0.15,0},{0.984379,0},{0.95303,0}}" /> 23 <Property Name="VertOverlapSize" Value="0.01" /> 24 <Property Name="HorzScrollPosition" Value="0" /> 25 <Property Name="VertScrollPosition" Value="0" /> 33 <Property Name="HorzFormatting" Value="HorzCentred" /> 34 <Property Name="VertFormatting" Value="TopAligned" /> 35 <Property Name="UnifiedAreaRect" Value="{{0.041666,0},{0.15,0},{0.958333,0},{0.92,0}}" /> 36 <Window Type="TaharezLook/ScrollablePane" Name="orxonox/KeyBindPane" > 37 38 <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" /> 39 40 <Property Name="HorzStepSize" Value="0.1" /> 41 42 <Property Name="VertStepSize" Value="0.1" /> 43 44 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 45 <Property Name="HorzOverlapSize" Value="0.01" /> 46 47 <Property Name="UnifiedAreaRect" Value="{{0.04,0},{0.005,0},{0.999,0},{0.99,0}}" /> 48 49 <Property Name="VertOverlapSize" Value="0.01" /> 50 51 <Property Name="HorzScrollPosition" Value="0" /> 52 53 <Property Name="VertScrollPosition" Value="0" /> 54 55 </Window> 56 26 57 </Window> 27 58 </Window> 59 28 60 <Window Type="TaharezLook/Button" Name="orxonox/KeyBindBackButton" > 61 29 62 <Property Name="Text" Value="Back" /> 63 30 64 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> 65 31 66 <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" /> 67 32 68 <Event Name="Clicked" Function="KeyBindMenu.KeyBindBackButton_clicked"/> 69 33 70 </Window> 71 34 72 </Window> 73 35 74 </GUILayout> -
code/branches/presentation2/data/gui/scripts/KeyBindMenu.lua
r6284 r6292 17 17 table.insert(commandList, "fire 1 | unfire") 18 18 table.insert(commandList, "onpress fire 2") 19 table.insert(commandList, "scale 1 moveFrontBack") 20 table.insert(commandList, "scale -1 moveFrontBack") 21 table.insert(commandList, "boost") 19 22 table.insert(commandList, "scale 1 moveRightLeft") 20 23 table.insert(commandList, "scale -1 moveRightLeft") 21 table.insert(commandList, "scale 1 moveFrontBack") 22 table.insert(commandList, "boost") 23 table.insert(commandList, "scale -1 moveFrontBack") 24 table.insert(commandList, "scale 1 moveUpDown") 25 table.insert(commandList, "scale -1 moveUpDown") 24 26 table.insert(commandList, "scale 1 rotateRoll") 25 27 table.insert(commandList, "scale -1 rotateRoll") 26 table.insert(commandList, "scale 1 moveUpDown") 27 table.insert(commandList, "scale -1 moveUpDown") 28 table.insert(commandList, "switchCamera") 28 29 table.insert(commandList, "openConsole") 29 30 table.insert(commandList, "OverlayGroup toggleVisibility Debug") … … 36 37 table.insert(nameList, "Secondary Fire") 37 38 table.insert(nameList, "Fire Rocket") 38 table.insert(nameList, "Steer Right") 39 table.insert(nameList, "Steer Left") 40 table.insert(nameList, "Give Thrust") 39 table.insert(nameList, "Accelerate") 40 table.insert(nameList, "Break") 41 41 table.insert(nameList, "Boost") 42 table.insert(nameList, "Hit Breaks") 42 table.insert(nameList, "Move Right") 43 table.insert(nameList, "Move Left") 44 table.insert(nameList, "Move Up") 45 table.insert(nameList, "Move Down") 43 46 table.insert(nameList, "Roll Right") 44 47 table.insert(nameList, "Roll Left") 45 table.insert(nameList, "Up") 46 table.insert(nameList, "Down") 48 table.insert(nameList, "Switch Camera") 47 49 table.insert(nameList, "Open Console") 48 50 table.insert(nameList, "Show Debug") 49 51 table.insert(nameList, "Show Stats") 50 table.insert(nameList, " mouseLook")52 table.insert(nameList, "Look Around") 51 53 table.insert(nameList, "Pause") 52 54 … … 58 60 local line = winMgr:createWindow("DefaultWindow", "orxonox/KeyBindPane/Binding" .. k) 59 61 local command = winMgr:createWindow("TaharezLook/StaticText", "orxonox/KeyBindPane/Binding" .. k .. "/Command") 60 local button = winMgr:createWindow("TaharezLook/Button", "orxonox/KeyBindPane/Binding" .. k .. "/Button") 61 local clear = winMgr:createWindow("TaharezLook/Button", "orxonox/KeyBindPane/Binding" .. k .. "/Clear") 62 local button = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Button") 63 local clear = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Clear") 64 local button2 = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Button2") 65 local clear2 = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Clear2") 66 local add = winMgr:createWindow("TaharezLook/TabButton", "orxonox/KeyBindPane/Binding" .. k .. "/Add") 62 67 63 line:setSize(CEGUI.UVector2(CEGUI.UDim(1,-13),CEGUI.UDim(0, lineHeight))) 64 command:setSize(CEGUI.UVector2(CEGUI.UDim(0.55, 0), CEGUI.UDim(1, 0))) 65 button:setSize(CEGUI.UVector2(CEGUI.UDim(0.4, 0), CEGUI.UDim(1, 0))) 66 clear:setSize(CEGUI.UVector2(CEGUI.UDim(0.05, 0),CEGUI.UDim(1,0))) 68 line:setSize(CEGUI.UVector2(CEGUI.UDim(1, -13), CEGUI.UDim(0, lineHeight))) 69 command:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(1, 0))) 70 button:setSize(CEGUI.UVector2(CEGUI.UDim(0.25, 0), CEGUI.UDim(0.6, 0))) 71 clear:setSize(CEGUI.UVector2(CEGUI.UDim(0.05, 0), CEGUI.UDim(0.6, 0))) 72 button2:setSize(CEGUI.UVector2(CEGUI.UDim(0.25, 0), CEGUI.UDim(0.6, 0))) 73 clear2:setSize(CEGUI.UVector2(CEGUI.UDim(0.05, 0), CEGUI.UDim(0.6, 0))) 74 add:setSize(CEGUI.UVector2(CEGUI.UDim(0.05, 0), CEGUI.UDim(0.6, 0))) 67 75 68 line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0),CEGUI.UDim(0, lineHeight*(k-1)))) 69 command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0),CEGUI.UDim(0, 0))) 70 button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.55, 0),CEGUI.UDim(0, 0))) 71 clear:setPosition(CEGUI.UVector2(CEGUI.UDim(0.95, 0),CEGUI.UDim(0, 0))) 76 line:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, lineHeight*(k-1)))) 77 command:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0))) 78 button:setPosition(CEGUI.UVector2(CEGUI.UDim(0.25, 0), CEGUI.UDim(0.2, 0))) 79 clear:setPosition(CEGUI.UVector2(CEGUI.UDim(0.5, 0), CEGUI.UDim(0.2, 0))) 80 button2:setPosition(CEGUI.UVector2(CEGUI.UDim(0.6, 0), CEGUI.UDim(0.2, 0))) 81 clear2:setPosition(CEGUI.UVector2(CEGUI.UDim(0.85, 0), CEGUI.UDim(0.2, 0))) 82 add:setPosition(CEGUI.UVector2(CEGUI.UDim(0.925, 0), CEGUI.UDim(0.2, 0))) 72 83 73 84 command:setText(nameList[k]) 74 85 button:setText(orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(v)) 75 86 clear:setText("X") 87 button2:setText(orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(v)) 88 clear2:setText("X") 89 add:setText("+") 76 90 77 91 orxonox.KeyBinderManager:getInstance():subscribeEventHelper(button, "Clicked", P.filename .. ".KeyBindButton_clicked") 78 92 orxonox.KeyBinderManager:getInstance():subscribeEventHelper(clear, "Clicked", P.filename .. ".KeyBindClear_clicked") 93 orxonox.KeyBinderManager:getInstance():subscribeEventHelper(add, "Clicked", P.filename .. ".KeyBindAdd_clicked") 79 94 --button:subscribeScriptedEvent("EventClicked", P.filename .. ".KeyBindButton_clicked") 80 95 … … 82 97 line:addChildWindow(button) 83 98 line:addChildWindow(clear) 99 line:addChildWindow(button2) 100 line:addChildWindow(clear2) 101 line:addChildWindow(add) 84 102 window:addChildWindow(line) 85 103 end … … 90 108 local name = we.window:getName() 91 109 buttonNr = tonumber(string.match(name, "%d+")) 92 93 110 openInfoPopup("Press any button/key or move a mouse/joystick axis.", KeyBindMenu.keybind) 94 111 end … … 98 115 local name = we.window:getName() 99 116 clearNr = tonumber(string.match(name, "%d+")) 100 117 end 118 119 function P.KeyBindAdd_clicked(e) 101 120 102 121 end … … 118 137 function P.KeyBindBackButton_clicked(e) 119 138 hideGUI("KeyBindMenu") 120 debug("event: back")121 139 end 122 140
Note: See TracChangeset
for help on using the changeset viewer.