Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 15, 2011, 9:47:11 PM (13 years ago)
Author:
landauf
Message:

merged usability branch back to trunk

incomplete summary of the changes in this branch:

  • enhanced keyboard navigation in GUIs
  • implemented new graphics menu and changeable window size at runtime
  • added developer mode
  • HUD shows if game is paused, game pauses if ingame menu is opened
  • removed a few obsolete commands and hid some that are more for internal use
  • numpad works in console and gui
  • faster loading of level info
  • enhanced usage of compositors (Shader class)
  • improved camera handling, configurable FOV and aspect ratio
Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/gamestates/GSRoot.cc

    r7284 r8079  
    3838#include "tools/interfaces/Tickable.h"
    3939
     40#include "GSLevel.h"
     41
    4042namespace orxonox
    4143{
     
    4345
    4446    static const std::string __CC_setTimeFactor_name = "setTimeFactor";
     47    static const std::string __CC_setPause_name = "setPause";
    4548    static const std::string __CC_pause_name = "pause";
     49
     50    /*static*/ bool GSRoot::startMainMenu_s = false;
    4651
    4752    SetConsoleCommand("printObjects", &GSRoot::printObjects).hide();
    4853    SetConsoleCommand(__CC_setTimeFactor_name, &GSRoot::setTimeFactor).accessLevel(AccessLevel::Master).defaultValues(1.0);
     54    SetConsoleCommand(__CC_setPause_name,      &GSRoot::setPause     ).accessLevel(AccessLevel::Master).hide();
    4955    SetConsoleCommand(__CC_pause_name,         &GSRoot::pause        ).accessLevel(AccessLevel::Master);
    5056
     
    8389
    8490        ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(this);
     91        ModifyConsoleCommand(__CC_setPause_name).setObject(this);
    8592        ModifyConsoleCommand(__CC_pause_name).setObject(this);
    8693    }
     
    8996    {
    9097        ModifyConsoleCommand(__CC_setTimeFactor_name).setObject(0);
     98        ModifyConsoleCommand(__CC_setPause_name).setObject(0);
    9199        ModifyConsoleCommand(__CC_pause_name).setObject(0);
    92100    }
     
    94102    void GSRoot::update(const Clock& time)
    95103    {
     104        if(startMainMenu_s)
     105        {
     106            delayedStartMainMenu();
     107            startMainMenu_s = false;
     108        }
     109
    96110        for (ObjectList<Timer>::iterator it = ObjectList<Timer>::begin(); it; )
    97111        {
     
    157171    }
    158172
     173    void GSRoot::setPause(bool pause)
     174    {
     175        if (GameMode::isMaster())
     176        {
     177            if (pause != this->bPaused_)
     178                this->pause();
     179        }
     180    }
     181
    159182    void GSRoot::changedTimeFactor(float factor_new, float factor_old)
    160183    {
     
    162185            callStaticNetworkFunction(&TimeFactorListener::setTimeFactor, CLIENTID_UNKNOWN, factor_new);
    163186    }
     187
     188    /*static*/ void GSRoot::delayedStartMainMenu(void)
     189    {
     190        if(!startMainMenu_s)
     191            startMainMenu_s = true;
     192        else
     193            GSLevel::startMainMenu();
     194    }
     195
    164196}
Note: See TracChangeset for help on using the changeset viewer.