Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6292 for code


Ignore:
Timestamp:
Dec 9, 2009, 3:56:03 PM (15 years ago)
Author:
cmueri
Message:

New layout of the keybind menu.

Location:
code/branches/presentation2/data/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/data/gui/layouts/GraphicsMenu.layout

    r6262 r6292  
    5353                <Property Name="Text" Value="Fullscreen" />
    5454                <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}}" />
    5656                <Event Name="CheckStateChanged" Function="GraphicsMenu.GraphicsFullscreenCheckbox_clicked"/>
    5757            </Window>
  • code/branches/presentation2/data/gui/layouts/KeyBindMenu.layout

    r6266 r6292  
    11<?xml version="1.0" encoding="UTF-8"?>
    22
     3
    34<GUILayout >
     5
    46    <Window Type="DefaultWindow" Name="orxonox/KeyBindMenu/Background" >
     7
    58        <Property Name="InheritsAlpha" Value="False" />
     9
    610        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     11
    712        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
     13
    814        <Window Type="TaharezLook/StaticText" Name="orxonox/KeyBindWindow" >
    9             <Property Name="Text" Value="KeyBindings" />
     15
     16            <Property Name="Text" Value="Keybindings" />
     17
    1018            <Property Name="Alpha" Value="0.8" />
     19
    1120            <Property Name="InheritsAlpha" Value="False" />
     21
    1222            <Property Name="HorzFormatting" Value="HorzCentred" />
     23
    1324            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     25
    1426            <Property Name="VertFormatting" Value="TopAligned" />
    15             <Property Name="UnifiedAreaRect" Value="{{0.25,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" />
    2032                <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
    2657            </Window>
    2758        </Window>
     59
    2860        <Window Type="TaharezLook/Button" Name="orxonox/KeyBindBackButton" >
     61
    2962            <Property Name="Text" Value="Back" />
     63
    3064            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     65
    3166            <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.625,0},{0.6,0},{0.675,0}}" />
     67
    3268            <Event Name="Clicked" Function="KeyBindMenu.KeyBindBackButton_clicked"/>
     69
    3370        </Window>
     71
    3472    </Window>
     73
    3574</GUILayout>
  • code/branches/presentation2/data/gui/scripts/KeyBindMenu.lua

    r6284 r6292  
    1717    table.insert(commandList, "fire 1 | unfire")
    1818    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")
    1922    table.insert(commandList, "scale 1 moveRightLeft")
    2023    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")
    2426    table.insert(commandList, "scale 1 rotateRoll")
    2527    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")
    2829    table.insert(commandList, "openConsole")
    2930    table.insert(commandList, "OverlayGroup toggleVisibility Debug")
     
    3637    table.insert(nameList, "Secondary Fire")
    3738    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")
    4141    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")
    4346    table.insert(nameList, "Roll Right")
    4447    table.insert(nameList, "Roll Left")
    45     table.insert(nameList, "Up")
    46     table.insert(nameList, "Down")
     48    table.insert(nameList, "Switch Camera")
    4749    table.insert(nameList, "Open Console")
    4850    table.insert(nameList, "Show Debug")
    4951    table.insert(nameList, "Show Stats")
    50     table.insert(nameList, "mouseLook")
     52    table.insert(nameList, "Look Around")
    5153    table.insert(nameList, "Pause")
    5254
     
    5860        local line = winMgr:createWindow("DefaultWindow", "orxonox/KeyBindPane/Binding" .. k)
    5961        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")
    6267       
    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)))
    6775       
    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)))
    7283       
    7384        command:setText(nameList[k])
    7485        button:setText(orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(v))
    7586        clear:setText("X")
     87        button2:setText(orxonox.KeyBinderManager:getInstance():getCurrent():getBinding(v))
     88        clear2:setText("X")
     89        add:setText("+")
    7690
    7791        orxonox.KeyBinderManager:getInstance():subscribeEventHelper(button, "Clicked", P.filename .. ".KeyBindButton_clicked")
    7892        orxonox.KeyBinderManager:getInstance():subscribeEventHelper(clear, "Clicked", P.filename .. ".KeyBindClear_clicked")
     93        orxonox.KeyBinderManager:getInstance():subscribeEventHelper(add, "Clicked", P.filename .. ".KeyBindAdd_clicked")
    7994        --button:subscribeScriptedEvent("EventClicked", P.filename .. ".KeyBindButton_clicked")
    8095       
     
    8297        line:addChildWindow(button)
    8398        line:addChildWindow(clear)
     99        line:addChildWindow(button2)
     100        line:addChildWindow(clear2)
     101        line:addChildWindow(add)
    84102        window:addChildWindow(line)
    85103    end
     
    90108    local name = we.window:getName()
    91109    buttonNr = tonumber(string.match(name, "%d+"))
    92    
    93110    openInfoPopup("Press any button/key or move a mouse/joystick axis.", KeyBindMenu.keybind)
    94111end
     
    98115    local name = we.window:getName()
    99116    clearNr = tonumber(string.match(name, "%d+"))
    100    
     117end
     118
     119function P.KeyBindAdd_clicked(e)
    101120   
    102121end
     
    118137function P.KeyBindBackButton_clicked(e)
    119138    hideGUI("KeyBindMenu")
    120     debug("event: back")
    121139end
    122140
Note: See TracChangeset for help on using the changeset viewer.