#ifndef MWINPUT_ACTIONMANAGER_H #define MWINPUT_ACTIONMANAGER_H #include #include namespace osgViewer { class Viewer; class ScreenCaptureHandler; } namespace MWInput { class BindingsManager; class ActionManager { public: ActionManager(BindingsManager* bindingsManager, osgViewer::ScreenCaptureHandler::CaptureOperation* screenCaptureOperation, osg::ref_ptr viewer, osg::ref_ptr screenCaptureHandler); void update(float dt, bool triedToMove); void executeAction(int action); bool checkAllowedToUseItems() const; void toggleMainMenu(); void toggleSpell(); void toggleWeapon(); void toggleInventory(); void toggleConsole(); void screenshot(); void toggleJournal(); void activate(); void toggleWalking(); void toggleSneaking(); void toggleAutoMove(); void rest(); void quickLoad(); void quickSave(); void quickKey(int index); void showQuickKeysMenu(); void resetIdleTime(); float getIdleTime() const { return mTimeIdle; } bool isAlwaysRunActive() const { return mAlwaysRunActive; } bool isSneaking() const; void setAttemptJump(bool enabled) { mAttemptJump = enabled; } private: void handleGuiArrowKey(int action); BindingsManager* mBindingsManager; osg::ref_ptr mViewer; osg::ref_ptr mScreenCaptureHandler; osgViewer::ScreenCaptureHandler::CaptureOperation* mScreenCaptureOperation; bool mAlwaysRunActive; bool mAttemptJump; float mTimeIdle; }; } #endif