Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 16, 2010, 1:49:16 PM (14 years ago)
Author:
rgrieder
Message:

Linked every GUI sheet to exactly one InputState.
Also added util/TriBool that has states {true, false, Dontcare}.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestate/src/libraries/core/input/InputState.h

    r5929 r6537  
    3737
    3838#include "util/OrxEnum.h"
     39#include "util/TriBool.h"
    3940#include "InputHandler.h"
    4041#include "JoyStickQuantityListener.h"
     
    5657    };
    5758
    58     namespace MouseMode
    59     {
    60         enum Value
    61         {
    62             Exclusive,
    63             Nonexclusive,
    64             Dontcare
    65         };
    66     }
    6759
    6860    /**
     
    7365        that stack and only the top one gets the input events. This is done for
    7466        every device (keyboard, mouse, all joy sticks) separately to allow
    75         for intance keyboard input capturing for the console while you can still
     67        for instance keyboard input capturing for the console while you can still
    7668        steer a ship with the mouse.
    7769        There are two exceptions to this behaviour though:
     
    8375          the state will always receive input as long as it is activated.
    8476        - Note: If you mark an InputState with both parameters on, then it will
    85           not influence ony other InputState at all.
     77          not influence only other InputState at all.
    8678
    8779    @par Priorities
     
    9587    @par Exclusive/Non-Exclusive mouse Mode
    9688        You can select a specific mouse mode that tells whether the application
    97         should have exclusive accessto it or not.
     89        should have exclusive access to it or not.
    9890        When in non-exclusive mode, you can move the mouse out of the window
    9991        like with any other normal window (only for windowed mode!).
     
    130122        void setHandler        (InputHandler* handler);
    131123
    132         void setMouseMode(MouseMode::Value value) { mouseMode_ = value; this->bExpired_ = true; }
    133         MouseMode::Value getMouseMode() const { return mouseMode_; }
     124        void setMouseExclusive(TriBool::Value value) { exclusiveMouse_ = value; this->bExpired_ = true; }
     125        TriBool::Value getMouseExclusive() const { return exclusiveMouse_; }
    134126
    135127        //! Returns the name of the state (which is unique!)
     
    184176        const bool                  bAlwaysGetsInput_;      //!< See class declaration for explanation
    185177        const bool                  bTransparent_;          //!< See class declaration for explanation
    186         MouseMode::Value            mouseMode_;             //!< See class declaration for explanation
     178        TriBool::Value              exclusiveMouse_;        //!< See class declaration for explanation
    187179        int                         priority_;              //!< Current priority (might change)
    188180        bool                        bExpired_;              //!< See hasExpired()
Note: See TracChangeset for help on using the changeset viewer.