Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 16, 2019, 2:27:40 PM (5 years ago)
Author:
tkuonen
Message:

Improve MouseAPI
Add Comments
Cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapi.h

    r12363 r12377  
    22#define MOUSEAPI_H
    33
    4 #include "OrxonoxPrereqs.h"
    5 #include "util/OgreForwardRefs.h"
    6 #include "graphics/Camera.h"
     4#include <OrxonoxPrereqs.h>
     5#include <util/OgreForwardRefs.h>
     6#include <graphics/Camera.h>
    77#include <util/Math.h>
    88#include <list>
     
    1313#include <OgreCamera.h>
    1414#include <OgreViewport.h>
    15 #include "CameraManager.h"
     15#include <CameraManager.h>
    1616#include <functional>
    17 #include "core/GUIManager.h"
    18 #include "core/input/KeyBinderManager.h"
    19 #include "tools/interfaces/Tickable.h"
    20 #include "core/singleton/ScopedSingletonIncludes.h"
     17#include <core/GUIManager.h>
     18#include <core/input/KeyBinderManager.h>
     19#include <tools/interfaces/Tickable.h>
     20#include <core/singleton/ScopedSingletonIncludes.h>
    2121
    2222/* this class implements a basic mouse-api
     
    3535 * to make it work, one has to add mouseapi in LINK_LIBRARIES in the file CMakeLists.txt of the level
    3636 * see CMakeLists.txt in MouseAPIExample
     37 *
     38 * MouseAPI: C++ API to access Mouse
     39 * MouseGametype: Enable Mouse Cursor & Prevent that each click kills Player if no spaceship is used
     40 * MouseAPICursor: Internal API which implements cursor. Usable from custom Gametype (not necessary if MouseGametype is used):
     41 *                 add "this->setHUDTemplate("MouseCursor");" in constructor of Gametype. (Or by inheritance)
    3742 */
    3843
     
    96101    bool active = false;
    97102
    98     Ogre::PanelOverlayElement* cursor;
     103    //true => allow ship-controller to get mouse input; Default: false; Gets reset after each transition from deactivated to activated
     104    bool gameInputActivated = false;
     105
    99106
    100107public:
     
    240247     */
    241248    void deactivate();
     249
     250    /*
     251     * allow ship-controller to get mouse input
     252     */
     253    void activateGameInput();
     254
     255    /*
     256     * do not allow ship-controller to get mouse input
     257     * This is the default. This gets set after each transition from deactivated to activated
     258     */
     259    void deactivateGameInput();
    242260};
    243261}
Note: See TracChangeset for help on using the changeset viewer.