Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2016, 5:37:05 PM (8 years ago)
Author:
binderm
Message:

The Campaign menu now works. The levels are structured in a tree. If one goes the left branch, the right one can't be taken anymore. The last challenge is to save the progress in the config variables. to set does work, but not to modify those variables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/bindermFS16/data/gui/scripts/CampaignMenu.lua

    r11186 r11191  
    1717    P.updateButton(7, winMgr:getWindow("orxonox/Mission8Button"))
    1818    P.updateButton(8, winMgr:getWindow("orxonox/Mission9Button"))
     19end
    1920
    20 
    21 --    if (P.getIndexOfLastFinishedMission() == orxonox.LevelManager:getInstance():getNumberOfCampaignMissions() - 1) then
    22 --        local label = winMgr:getWindow("orxonox/CampaignMenuCongratulation")
    23 --        label:setProperty("Visible","True")
    24 --    end
    25 end
    2621
    2722function P.updateButton(index, button)
     
    4641    end
    4742end
    48 
    49 --function P.shouldDisplayButton(index)
    50 --    local size = orxonox.LevelManager:getInstance():getNumberOfCampaignMissions()
    51 --    return index < size
    52 --end
    53 
    54 --function P.shouldActivateButton(index) --checks if button should be activated or not
    55 --    return index <= P.getIndexOfLastFinishedMission() + 1
    56 --end
    5743
    5844function P.getIndexOfLastFinishedMission()
Note: See TracChangeset for help on using the changeset viewer.