Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 4, 2009, 2:14:53 PM (15 years ago)
Author:
scheusso
Message:

merged ingamemenu branch to menu branch

Location:
code/branches/menu
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/menu

  • code/branches/menu/src/orxonox/gamestates/GSGraphics.cc

    r5929 r6024  
    6464    void GSGraphics::activate()
    6565    {
    66         // add console command to toggle GUI
    67         CommandExecutor::addConsoleCommandShortcut(createConsoleCommand(createFunctor(&GSGraphics::toggleGUI, this), "toggleGUI"));
     66       
    6867    }
    6968
     
    7877    }
    7978
    80     /**
    81     @brief
    82         Toggles the visibility of the current GUI
    83 
    84         This function just executes a Lua function in the main script of the GUI by accessing the GUIManager.
    85         For more details on this function check out the Lua code.
    86     */
    87     void GSGraphics::toggleGUI()
    88     {
    89         GUIManager::getInstance().executeCode("toggleGUI()");
    90     }
    91 
    9279    void GSGraphics::update(const Clock& time)
    9380    {
  • code/branches/menu/src/orxonox/gamestates/GSGraphics.h

    r5929 r6024  
    5757        void update(const Clock& time);
    5858
    59         void toggleGUI();
    60 
    6159    private:
    6260    };
  • code/branches/menu/src/orxonox/gamestates/GSLevel.cc

    r5929 r6024  
    101101        if (show)
    102102        {
    103             GUIManager::getInstance().showGUI("inGameTest");
    104             GUIManager::getInstance().executeCode("showCursor()");
    105             InputManager::getInstance().enterState("guiMouseOnly");
     103            GUIManager::showGUI("inGameTest");
    106104        }
    107105        else
    108106        {
    109             GUIManager::getInstance().executeCode("hideGUI(\"inGameTest\")");
    110             GUIManager::getInstance().executeCode("hideCursor()");
    111             InputManager::getInstance().leaveState("guiMouseOnly");
     107            GUIManager::hideGUI("inGameTest");
    112108        }
    113109    }
  • code/branches/menu/src/orxonox/gamestates/GSMainMenu.cc

    r5929 r6024  
    8282    {
    8383        // show main menu
    84         GUIManager::getInstance().showGUI("MainMenu");
     84        GUIManager::getInstance().showGUI("MainMenu", false);
    8585        GUIManager::getInstance().setCamera(this->camera_);
    8686        GraphicsManager::getInstance().setCamera(this->camera_);
     
    113113
    114114        GUIManager::getInstance().setCamera(0);
     115        GUIManager::hideGUI("MainMenu");
    115116        GraphicsManager::getInstance().setCamera(0);
    116117    }
  • code/branches/menu/src/orxonox/pickup/PickupInventory.cc

    r5781 r6024  
    8686    {
    8787        if(PickupInventory::getSingleton()->isVisible()) {
    88             GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")");
    89             GUIManager::getInstance().executeCode("hideCursor()");
    90             InputManager::getInstance().leaveState("guiMouseOnly");
    91         }
    92         else
    93         {
    94             GUIManager::getInstance().showGUI("PickupInventory");
    95             GUIManager::getInstance().executeCode("showCursor()");
    96             InputManager::getInstance().enterState("guiMouseOnly");
     88            GUIManager::hideGUI("PickupInventory");
     89        }
     90        else
     91        {
     92            GUIManager::showGUI("PickupInventory");
    9793        }
    9894        PickupInventory::getSingleton()->setVisible(!PickupInventory::getSingleton()->isVisible());
  • code/branches/menu/src/orxonox/pickup/PickupSpawner.cc

    r5929 r6024  
    9696        //  & load the GUI itself too, along with some empty windows
    9797        //   = even less delays
    98         GUIManager::getInstance().showGUI("PickupInventory");
    99         GUIManager::getInstance().executeCode("hideGUI(\"PickupInventory\")");
     98        GUIManager::showGUI("PickupInventory");
     99        GUIManager::hideGUI("PickupInventory");
    100100        PickupInventory::getSingleton();
    101101    }
Note: See TracChangeset for help on using the changeset viewer.