Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10950


Ignore:
Timestamp:
Dec 7, 2015, 4:42:46 PM (9 years ago)
Author:
paulsc
Message:

Improved campaign menu

Location:
code/branches/campaignHS15/data
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/campaignHS15/data/defaultConfig/orxonox.ini

    r10262 r10950  
    44campaignMissions_[2] = "pirateAttack.oxw"
    55campaignMissions_[3] = "iJohnVane_TriptoArea51.oxw"
     6campaignMissions_[4] = "iiJohnVane_Area51UnderFire.oxw"
     7campaignMissions_[5] = "iiiJohnVane_EscapeTheBastards.oxw"
     8campaignMissions_[6] = "expeditionSector.oxw"
     9campaignMissions_[7] = "shuttleAttack.oxw"
     10campaignMissions_[8] = "shuttleRetaliation.oxw"
  • code/branches/campaignHS15/data/gui/layouts/CampaignMenu.layout

    r10262 r10950  
    88        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1.0,0},{1.0,0}}" />
    99        <Property Name="BackgroundEnabled" Value="False" />
    10         <Window Type="MenuWidgets/Button" Name="orxonox/MissionOneButton" >
    11             <Property Name="Text" Value="Mission 1" />
     10        <Window Type="MenuWidgets/Button" Name="orxonox/Mission1Button" >
     11            <Property Name="Text" Value="Mission One" />
    1212            <Property Name="Visible" Value="False"/>
    1313            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    14             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.2875,0},{0.6,0},{0.3375,0}}" />
    15             <Event Name="Clicked" Function="CampaignMenu.MissionOneButton_clicked"/>
     14            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.1,0},{0.65,0},{0.15,0}}" />
     15            <Event Name="Clicked" Function="CampaignMenu.Mission1Button_clicked"/>
    1616        </Window>
    17         <Window Type="MenuWidgets/Button" Name="orxonox/MissionTwoButton" >
    18             <Property Name="Text" Value="Mission 2" />
     17        <Window Type="MenuWidgets/Button" Name="orxonox/Mission2Button" >
     18            <Property Name="Text" Value="Fight in our Back" />
    1919            <Property Name="Visible" Value="False"/>
    2020            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    21             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.3625,0},{0.6,0},{0.4125,0}}" />
     21            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.18,0},{0.65,0},{0.23,0}}" />
    2222            <Property Name="Disabled" Value="True" />
    23             <Event Name="Clicked" Function="CampaignMenu.MissionTwoButton_clicked"/>
     23            <Event Name="Clicked" Function="CampaignMenu.Mission2Button_clicked"/>
    2424        </Window>
    25         <Window Type="MenuWidgets/Button" Name="orxonox/MissionThreeButton" >
    26             <Property Name="Text" Value="Mission 3" />
     25        <Window Type="MenuWidgets/Button" Name="orxonox/Mission3Button" >
     26            <Property Name="Text" Value="Pirate Attack" />
    2727            <Property Name="Visible" Value="False"/>
    2828            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    29             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.4375,0},{0.6,0},{0.4875,0}}" />
     29            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.26,0},{0.65,0},{0.31,0}}" />
    3030            <Property Name="Disabled" Value="True" />
    31             <Event Name="Clicked" Function="CampaignMenu.MissionThreeButton_clicked"/>
     31            <Event Name="Clicked" Function="CampaignMenu.Mission3Button_clicked"/>
    3232        </Window>
    33         <Window Type="MenuWidgets/Button" Name="orxonox/MissionFourButton" >
    34             <Property Name="Text" Value="Mission 4" />
     33        <Window Type="MenuWidgets/Button" Name="orxonox/Mission4Button" >
     34            <Property Name="Text" Value="Trip to Area 51" />
    3535            <Property Name="Visible" Value="False"/>
    3636            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    37             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.5125,0},{0.6,0},{0.5625,0}}" />
     37            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.34,0},{0.65,0},{0.39,0}}" />
    3838            <Property Name="Disabled" Value="True" />
    39             <Event Name="Clicked" Function="CampaignMenu.MissionFourButton_clicked"/>
     39            <Event Name="Clicked" Function="CampaignMenu.Mission4Button_clicked"/>
    4040        </Window>
     41        <Window Type="MenuWidgets/Button" Name="orxonox/Mission5Button" >
     42            <Property Name="Text" Value="Area 51 under Fire" />
     43            <Property Name="Visible" Value="False"/>
     44            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     45            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.42,0},{0.65,0},{0.47,0}}" />
     46            <Property Name="Disabled" Value="True" />
     47            <Event Name="Clicked" Function="CampaignMenu.Mission5Button_clicked"/>
     48        </Window>
     49        <Window Type="MenuWidgets/Button" Name="orxonox/Mission6Button" >
     50            <Property Name="Text" Value="Escape the Bastards" />
     51            <Property Name="Visible" Value="False"/>
     52            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     53            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.50,0},{0.65,0},{0.55,0}}" />
     54            <Property Name="Disabled" Value="True" />
     55            <Event Name="Clicked" Function="CampaignMenu.Mission6Button_clicked"/>
     56        </Window>
     57        <Window Type="MenuWidgets/Button" Name="orxonox/Mission7Button" >
     58            <Property Name="Text" Value="Expedition to Sector 5C" />
     59            <Property Name="Visible" Value="False"/>
     60            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     61            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.58,0},{0.65,0},{0.63,0}}" />
     62            <Property Name="Disabled" Value="True" />
     63            <Event Name="Clicked" Function="CampaignMenu.Mission7Button_clicked"/>
     64        </Window>
     65        <Window Type="MenuWidgets/Button" Name="orxonox/Mission8Button" >
     66            <Property Name="Text" Value="Shuttle under Attack" />
     67            <Property Name="Visible" Value="False"/>
     68            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     69            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.66,0},{0.65,0},{0.71,0}}" />
     70            <Property Name="Disabled" Value="True" />
     71            <Event Name="Clicked" Function="CampaignMenu.Mission8Button_clicked"/>
     72        </Window>
     73        <Window Type="MenuWidgets/Button" Name="orxonox/Mission9Button" >
     74            <Property Name="Text" Value="Retaliation" />
     75            <Property Name="Visible" Value="False"/>
     76            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
     77            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.74,0},{0.65,0},{0.79,0}}" />
     78            <Property Name="Disabled" Value="True" />
     79            <Event Name="Clicked" Function="CampaignMenu.Mission9Button_clicked"/>
     80        </Window>
     81
     82
    4183        <Window Type="MenuWidgets/Button" Name="orxonox/CampaignMenuBackButton" >
    4284            <Property Name="Text" Value="Back" />
    4385            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    44             <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.8,0},{0.6,0},{0.85,0}}" />
     86            <Property Name="UnifiedAreaRect" Value="{{0.35,0},{0.85,0},{0.65,0},{0.9,0}}" />
    4587            <Event Name="Clicked" Function="CampaignMenu.CampaignMenuBackButton_clicked"/>
    4688        </Window>
  • code/branches/campaignHS15/data/gui/scripts/CampaignMenu.lua

    r10262 r10950  
    88
    99function P.updateButtons()
    10     P.updateButton(0, winMgr:getWindow("orxonox/MissionOneButton"))
    11     P.updateButton(1, winMgr:getWindow("orxonox/MissionTwoButton"))
    12     P.updateButton(2, winMgr:getWindow("orxonox/MissionThreeButton"))
    13     P.updateButton(3, winMgr:getWindow("orxonox/MissionFourButton"))
     10    P.updateButton(0, winMgr:getWindow("orxonox/Mission1Button"))
     11    P.updateButton(1, winMgr:getWindow("orxonox/Mission2Button"))
     12    P.updateButton(2, winMgr:getWindow("orxonox/Mission3Button"))
     13    P.updateButton(3, winMgr:getWindow("orxonox/Mission4Button"))
     14    P.updateButton(4, winMgr:getWindow("orxonox/Mission5Button"))
     15    P.updateButton(5, winMgr:getWindow("orxonox/Mission6Button"))
     16    P.updateButton(6, winMgr:getWindow("orxonox/Mission7Button"))
     17    P.updateButton(7, winMgr:getWindow("orxonox/Mission8Button"))
     18    P.updateButton(8, winMgr:getWindow("orxonox/Mission9Button"))
     19
    1420
    1521    if (P.getIndexOfLastFinishedMission() == orxonox.LevelManager:getInstance():getNumberOfCampaignMissions() - 1) then
     
    5460end
    5561
    56 function P.MissionOneButton_clicked(e)
     62function P.Mission1Button_clicked(e)
    5763    P.loadLevel(P.FindLevel(0))
    5864end
    5965
    60 function P.MissionTwoButton_clicked(e)
     66function P.Mission2Button_clicked(e)
    6167    P.loadLevel(P.FindLevel(1))
    6268end
    6369
    64 function P.MissionThreeButton_clicked(e)
     70function P.Mission3Button_clicked(e)
    6571    P.loadLevel(P.FindLevel(2))
    6672end
    6773
    68 function P.MissionFourButton_clicked(e)
     74function P.Mission4Button_clicked(e)
    6975    P.loadLevel(P.FindLevel(3))
     76end
     77
     78function P.Mission5Button_clicked(e)
     79    P.loadLevel(P.FindLevel(4))
     80end
     81
     82function P.Mission6Button_clicked(e)
     83    P.loadLevel(P.FindLevel(5))
     84end
     85
     86function P.Mission7Button_clicked(e)
     87    P.loadLevel(P.FindLevel(6))
     88end
     89
     90function P.Mission8Button_clicked(e)
     91    P.loadLevel(P.FindLevel(7))
     92end
     93
     94function P.Mission9Button_clicked(e)
     95    P.loadLevel(P.FindLevel(8))
    7096end
    7197
Note: See TracChangeset for help on using the changeset viewer.