Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7732 for code/trunk/data


Ignore:
Timestamp:
Dec 8, 2010, 3:29:28 PM (14 years ago)
Author:
konrad
Message:

Credits Menu is now scrollable

Location:
code/trunk/data/gui
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/data/gui/layouts/CreditsMenu.layout

    r6746 r7732  
    22
    33<GUILayout >
    4     <Window Type="MenuWidgets/StaticImage" Name="orxonox/CreditsBackground" >
    5         <Property Name="FrameEnabled" Value="False" />
     4    <Window Type="DefaultWindow" Name="orxonox/CreditsMenu/Background" >
    65        <Property Name="InheritsAlpha" Value="False" />
    76        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    87        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
    9         <Property Name="BackgroundEnabled" Value="False" />
    108        <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsWindow" >
    11             <Property Name="Text" Value="Credits" />
     9            <Property Name="Text" Value="Keybindings" />
    1210            <Property Name="Alpha" Value="0.8" />
     11            <Property Name="InheritsAlpha" Value="False" />
    1312            <Property Name="HorzFormatting" Value="HorzCentred" />
    14             <Property Name="InheritsAlpha" Value="False" />
    1513            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    1614            <Property Name="VertFormatting" Value="TopAligned" />
    17             <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.3625,0},{0.75,0},{0.6375,0}}" />
    18             <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsText" >
    19                 <Property Name="Text">Orxonox version 0.0.3
     15            <Property Name="UnifiedAreaRect" Value="{{0.15,0},{0.2125,0},{0.85,0},{0.6375,0}}" />
     16            <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsMenuWrapper" >
     17                <Property Name="TextColours" Value="FF4444FF" />
     18                <Property Name="InheritsAlpha" Value="False" />
     19                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     20                <Property Name="HorzFormatting" Value="HorzCentred" />
     21                <Property Name="VertFormatting" Value="TopAligned" />
     22                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.92,0}}" />
     23                <Window Type="MenuWidgets/ScrollablePane" Name="orxonox/CreditsMenuPane" >
     24                    <Property Name="ContentArea" Value="l:0 t:0 r:0 b:0" />
     25                    <Property Name="HorzStepSize" Value="0.005" />
     26                    <Property Name="VertStepSize" Value="0.005" />
     27                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     28                    <Property Name="HorzOverlapSize" Value="0.01" />
     29                    <Property Name="UnifiedAreaRect" Value="{{0.005,0},{0.01,0},{0.995,0},{0.99,0}}" />
     30                    <Property Name="VertOverlapSize" Value="0.01" />
     31                    <Property Name="HorzScrollPosition" Value="0" />
     32                    <Property Name="VertScrollPosition" Value="0" />
     33                    <Window Type="MenuWidgets/StaticText" Name="orxonox/CreditsText" >
     34                        <Property Name="TextColours" Value="FF4444FF" />
     35                        <Property Name="InheritsAlpha" Value="False" />
     36                        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     37                        <Property Name="HorzFormatting" Value="HorzCentred" />
     38                        <Property Name="VertFormatting" Value="TopAligned" />
     39                        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
     40                        <Property Name="Text">Orxonox version 0.0.3
    2041
    2142Programming Language:  C++ - lua - tcl
     
    2344Licence:  GNU General Public Licence - Creative Commons
    2445
    25 http://www.orxonox.net</Property>
    26                 <Property Name="TextColours" Value="FF4444FF" />
    27                 <Property Name="InheritsAlpha" Value="False" />
    28                 <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    29                 <Property Name="HorzFormatting" Value="HorzCentred" />
    30                 <Property Name="VertFormatting" Value="TopAligned" />
    31                 <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.2,0},{0.95,0},{0.9,0}}" />
     46http://www.orxonox.net
     47n
     48n
     49n
     50n
     51n
     52n
     53n
     54n
     55n                       </Property>
     56                    </Window>
     57                </Window>
    3258            </Window>
    3359        </Window>
     
    4066    </Window>
    4167</GUILayout>
     68
     69
     70
     71
     72
  • code/trunk/data/gui/layouts/MultiplayerMenu.layout

    r7689 r7732  
    2020                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.8,0}}" />
    2121            </Window>
     22            <Window Type="MenuWidgets/RadioButton" Name="orxonox/MultiplayerLanButton" >
     23                <Property Name="Text" Value="LAN"/>
     24                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     25                <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.87,0},{0.4,0},{0.97,0}}" />
     26                <Event Name="SelectStateChanged" Function="MultiplayerMenu.LanButton_clicked"/>
     27            </Window>
     28            <Window Type="MenuWidgets/RadioButton" Name="orxonox/MultiplayerInternetButton" >
     29                <Property Name="Text" Value="Internet" />
     30                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     31                <Property Name="UnifiedAreaRect" Value="{{0.6,0},{0.87,0},{0.8,0},{0.97,0}}" />
     32                <Event Name="SelectStateChanged" Function="MultiplayerMenu.InternetButton_clicked"/>
     33            </Window>
     34
     35
    2236        </Window>
    2337         <Window Type="MenuWidgets/Button" Name="orxonox/MultiplayerBackButton" >
  • code/trunk/data/gui/scripts/CreditsMenu.lua

    r7689 r7732  
    44
    55P.buttonList = {}
     6P.scrollbarWidth = 13
    67
    78function P.onLoad()
     
    1718    P.oldindex = -2
    1819    P.index = -1
     20
     21    local description = winMgr:getWindow("orxonox/CreditsText")
     22    description:setProperty("HorzFormatting", "WordWrapLeftAligned")
     23    description:setProperty("VertFormatting", "TopAligned")
     24    description:setText("                                   Orxonox version 0.0.3 \n\n       Programming Language:  C++ - lua - tcl \n       Environment:  OpenAL - Ogre - OIS - CEGUI - enet - ODE \n       Licence:  GNU General Public Licence - Creative Commons \n       http://www.orxonox.net \n \n       Credits:")
     25
     26    description:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, -P.scrollbarWidth), CEGUI.UDim(1.0, 0)))
     27    height = getStaticTextWindowHeight(description)
     28    description:setHeight(CEGUI.UDim(0, height))
    1929end
    2030
  • code/trunk/data/gui/scripts/MultiplayerMenu.lua

    r7690 r7732  
    44
    55P.buttonList = {}
     6
     7--joinMode is 1 for choice "LAN" and 2 for "Internet"
     8--initial status 0
     9P.joinMode = 0
    610
    711function P.onLoad()
     
    2630    }
    2731    P.buttonList[4] = item
    28 
    2932end
    3033
     
    3740end
    3841
     42function P.LanButton_clicked(e)
     43    P.joinMode = 1
     44end
     45
     46function P.InternetButton_clicked(e)
     47    P.joinMode = 2
     48end
     49
    3950function P.MultiplayerHostButton_clicked(e)
    4051    showMenuSheet("HostMenu", true)
     
    4354
    4455function P.MultiplayerJoinButton_clicked(e)
    45     local choice = winMgr:getWindow("orxonox/MultiplayerListbox"):getFirstSelectedItem()
    46     if choice then
    47         local client = orxonox.Client:getInstance()
    48         local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID()
    49         client:setDestination( P.serverList[index][2], 55556 )
     56    local choice = winMgr:getWindow("orxonox/MultiplayerListbox"):getFirstSelectedItem()   
     57
     58    if P.joinMode == 2 then
     59        if choice then
     60            local client = orxonox.Client:getInstance()
     61            local index = tolua.cast(choice, "CEGUI::ListboxItem"):getID()
     62            client:setDestination( P.serverList[index][2], 55556 )
     63        else
     64            return
     65        end
     66        orxonox.execute("startClient")
     67        hideAllMenuSheets()
    5068    else
    51         return
     69        --wait for Sandro's function
    5270    end
    53     orxonox.execute("startClient")
    54     hideAllMenuSheets()
     71
    5572end
    5673
  • code/trunk/data/gui/scripts/QuestGUI.lua

    r7456 r7732  
    2121
    2222    P.player = orxonox.GUIManager:getInstance():getPlayer(P.name)
    23     P.rootWindow = P.createQuestGUI();
     23    P.rootWindow = P.createQuestGUI()
    2424
    2525    questsList:addChildWindow(P.rootWindow)
     
    7474    end
    7575
    76     return index;
     76    return index
    7777end
    7878
     
    140140    offset = offset + height
    141141
    142     local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title");
     142    local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title")
    143143    window:addChildWindow(descriptionTitle)
    144144    descriptionTitle:setProperty("HorzFormatting", "HorzCentred")
     
    151151    offset = offset + height
    152152
    153     local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description");
     153    local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description")
    154154    window:addChildWindow(description)
    155155    description:setProperty("HorzFormatting", "WordWrapLeftAligned")
     
    165165    local numHints = orxonox.QuestManager:getInstance():getNumHints(quest, P.player)
    166166    if numHints > 0 then
    167         local hintsTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Hints/Title");
     167        local hintsTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Hints/Title")
    168168        window:addChildWindow(hintsTitle)
    169169        hintsTitle:setProperty("HorzFormatting", "HorzCentred")
     
    247247    local offset = 0
    248248   
    249     local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title");
     249    local descriptionTitle = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description/Title")
    250250    window:addChildWindow(descriptionTitle)
    251251    descriptionTitle:setProperty("HorzFormatting", "HorzCentred")
     
    258258    offset = offset + height
    259259
    260     local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description");
     260    local description = winMgr:createWindow("MenuWidgets/StaticText", name .. "/Description")
    261261    window:addChildWindow(description)
    262262    description:setProperty("HorzFormatting", "WordWrapLeftAligned")
Note: See TracChangeset for help on using the changeset viewer.