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/libraries/core/GUIManager.cc

    r7876 r8079  
    3232#include <boost/bind.hpp>
    3333#include <memory>
    34 extern "C" {
    35 #include <lua.h>
    36 }
     34
    3735#include <CEGUIDefaultLogger.h>
    3836#include <CEGUIExceptions.h>
     
    107105    SetConsoleCommand("showGUI", &GUIManager::showGUI).defaultValue(1, false).defaultValue(2, false);
    108106    SetConsoleCommand("hideGUI", &GUIManager::hideGUI);
     107    SetConsoleCommand("toggleGUI", &GUIManager::toggleGUI).defaultValue(1, false).defaultValue(2, false);
    109108
    110109    /**
     
    284283    {
    285284        GUIManager::getInstance().executeCode("hideMenuSheet(\"" + name + "\")");
     285    }
     286
     287    /**
     288    @brief
     289        Toggles specified GUI.
     290        If the GUI with the input name is already shown and on the top, it is hidden, else it is shown.
     291    */
     292    /*static*/ void GUIManager::toggleGUI(const std::string& name, bool bHidePrevious, bool bNoInput)
     293    {
     294        GUIManager::getInstance().executeCode("getGUIFirstActive(\"" + name + "\", " + multi_cast<std::string>(bHidePrevious) + ", " + multi_cast<std::string>(bNoInput) + ")");
     295    }
     296
     297    /**
     298    @brief
     299        Helper method to toggle a specified GUI.
     300        Is called by lua.
     301    */
     302    void GUIManager::toggleGUIHelper(const std::string& name, bool bHidePrevious, bool bNoInput, bool show)
     303    {
     304        if(show)
     305            GUIManager::showGUI(name, bHidePrevious, bNoInput);
     306        else
     307            GUIManager::hideGUI(name);
    286308    }
    287309
     
    512534    void GUIManager::windowResized(unsigned int newWidth, unsigned int newHeight)
    513535    {
    514         this->guiRenderer_->setDisplaySize(CEGUI::Size(newWidth, newHeight));
    515     }
    516 
    517     /**
    518         @brief Notify CEGUI if the windows loses the focus (stops higlight of menu items, etc).
     536        this->guiRenderer_->setDisplaySize(CEGUI::Size((float)newWidth, (float)newHeight));
     537    }
     538
     539    /**
     540        @brief Notify CEGUI if the windows loses the focus (stops highlighting of menu items, etc).
    519541    */
    520542    void GUIManager::windowFocusChanged(bool bFocus)
Note: See TracChangeset for help on using the changeset viewer.