mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-21 18:09:39 +00:00
Remove some redundant code
This commit is contained in:
parent
3328775eff
commit
85f91a7de8
4 changed files with 5 additions and 42 deletions
|
@ -2,33 +2,16 @@
|
||||||
|
|
||||||
#include <osgViewer/ViewerEventHandlers>
|
#include <osgViewer/ViewerEventHandlers>
|
||||||
|
|
||||||
#include <MyGUI_InputManager.h>
|
|
||||||
#include <MyGUI_Widget.h>
|
|
||||||
#include <MyGUI_Button.h>
|
|
||||||
#include <MyGUI_EditBox.h>
|
|
||||||
|
|
||||||
#include <SDL_version.h>
|
|
||||||
|
|
||||||
#include <components/debug/debuglog.hpp>
|
|
||||||
#include <components/sdlutil/sdlinputwrapper.hpp>
|
#include <components/sdlutil/sdlinputwrapper.hpp>
|
||||||
#include <components/esm/esmwriter.hpp>
|
#include <components/esm/esmwriter.hpp>
|
||||||
#include <components/esm/esmreader.hpp>
|
#include <components/esm/esmreader.hpp>
|
||||||
#include <components/esm/controlsstate.hpp>
|
#include <components/esm/controlsstate.hpp>
|
||||||
|
|
||||||
#include "../mwbase/world.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
#include "../mwbase/statemanager.hpp"
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/mechanicsmanager.hpp"
|
|
||||||
|
|
||||||
#include "../mwworld/player.hpp"
|
|
||||||
#include "../mwworld/class.hpp"
|
|
||||||
#include "../mwworld/inventorystore.hpp"
|
|
||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
|
||||||
#include "../mwmechanics/npcstats.hpp"
|
|
||||||
#include "../mwmechanics/actorutil.hpp"
|
|
||||||
|
|
||||||
#include "actionmanager.hpp"
|
#include "actionmanager.hpp"
|
||||||
#include "bindingsmanager.hpp"
|
#include "bindingsmanager.hpp"
|
||||||
#include "controllermanager.hpp"
|
#include "controllermanager.hpp"
|
||||||
|
@ -58,7 +41,7 @@ namespace MWInput
|
||||||
|
|
||||||
mActionManager = new ActionManager(mBindingsManager, screenCaptureOperation, viewer, screenCaptureHandler);
|
mActionManager = new ActionManager(mBindingsManager, screenCaptureOperation, viewer, screenCaptureHandler);
|
||||||
|
|
||||||
mKeyboardManager = new KeyboardManager(mBindingsManager, mActionManager);
|
mKeyboardManager = new KeyboardManager(mBindingsManager);
|
||||||
mInputWrapper->setKeyboardEventCallback(mKeyboardManager);
|
mInputWrapper->setKeyboardEventCallback(mKeyboardManager);
|
||||||
|
|
||||||
mMouseManager = new MouseManager(mBindingsManager, mInputWrapper, window);
|
mMouseManager = new MouseManager(mBindingsManager, mInputWrapper, window);
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
#ifndef MWINPUT_MWINPUTMANAGERIMP_H
|
#ifndef MWINPUT_MWINPUTMANAGERIMP_H
|
||||||
#define MWINPUT_MWINPUTMANAGERIMP_H
|
#define MWINPUT_MWINPUTMANAGERIMP_H
|
||||||
|
|
||||||
#include "../mwgui/mode.hpp"
|
|
||||||
|
|
||||||
#include <SDL_sensor.h>
|
|
||||||
|
|
||||||
#include <osg/ref_ptr>
|
#include <osg/ref_ptr>
|
||||||
#include <osgViewer/ViewerEventHandlers>
|
#include <osgViewer/ViewerEventHandlers>
|
||||||
|
|
||||||
#include <components/settings/settings.hpp>
|
#include <components/settings/settings.hpp>
|
||||||
#include <components/files/configurationmanager.hpp>
|
|
||||||
#include <components/sdlutil/events.hpp>
|
#include <components/sdlutil/events.hpp>
|
||||||
|
|
||||||
#include "../mwbase/inputmanager.hpp"
|
#include "../mwbase/inputmanager.hpp"
|
||||||
|
|
||||||
|
#include "../mwgui/mode.hpp"
|
||||||
|
|
||||||
#include "actions.hpp"
|
#include "actions.hpp"
|
||||||
|
|
||||||
namespace MWInput
|
namespace MWInput
|
||||||
|
@ -37,11 +34,6 @@ namespace MWBase
|
||||||
class WindowManager;
|
class WindowManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Files
|
|
||||||
{
|
|
||||||
struct ConfigurationManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace SDLUtil
|
namespace SDLUtil
|
||||||
{
|
{
|
||||||
class InputWrapper;
|
class InputWrapper;
|
||||||
|
|
|
@ -4,22 +4,18 @@
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/inputmanager.hpp"
|
#include "../mwbase/inputmanager.hpp"
|
||||||
#include "../mwbase/statemanager.hpp"
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
|
||||||
|
|
||||||
#include "../mwworld/player.hpp"
|
#include "../mwworld/player.hpp"
|
||||||
|
|
||||||
#include "actionmanager.hpp"
|
|
||||||
#include "actions.hpp"
|
#include "actions.hpp"
|
||||||
#include "bindingsmanager.hpp"
|
#include "bindingsmanager.hpp"
|
||||||
#include "sdlmappings.hpp"
|
#include "sdlmappings.hpp"
|
||||||
|
|
||||||
namespace MWInput
|
namespace MWInput
|
||||||
{
|
{
|
||||||
KeyboardManager::KeyboardManager(BindingsManager* bindingsManager, ActionManager* actionManager)
|
KeyboardManager::KeyboardManager(BindingsManager* bindingsManager)
|
||||||
: mBindingsManager(bindingsManager)
|
: mBindingsManager(bindingsManager)
|
||||||
, mActionManager(actionManager)
|
|
||||||
, mControlsDisabled(false)
|
, mControlsDisabled(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,20 +4,14 @@
|
||||||
#include <components/settings/settings.hpp>
|
#include <components/settings/settings.hpp>
|
||||||
#include <components/sdlutil/events.hpp>
|
#include <components/sdlutil/events.hpp>
|
||||||
|
|
||||||
namespace SDLUtil
|
|
||||||
{
|
|
||||||
class InputWrapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace MWInput
|
namespace MWInput
|
||||||
{
|
{
|
||||||
class ActionManager;
|
|
||||||
class BindingsManager;
|
class BindingsManager;
|
||||||
|
|
||||||
class KeyboardManager : public SDLUtil::KeyListener
|
class KeyboardManager : public SDLUtil::KeyListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
KeyboardManager(BindingsManager* bindingsManager, ActionManager* actionManager);
|
KeyboardManager(BindingsManager* bindingsManager);
|
||||||
|
|
||||||
virtual ~KeyboardManager() = default;
|
virtual ~KeyboardManager() = default;
|
||||||
|
|
||||||
|
@ -30,8 +24,6 @@ namespace MWInput
|
||||||
private:
|
private:
|
||||||
BindingsManager* mBindingsManager;
|
BindingsManager* mBindingsManager;
|
||||||
|
|
||||||
ActionManager* mActionManager;
|
|
||||||
|
|
||||||
bool mControlsDisabled;
|
bool mControlsDisabled;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue