2017-06-20 02:28:45 +00:00
|
|
|
#ifndef OPENMW_PROCESSORGAMESETTINGS_HPP
|
|
|
|
#define OPENMW_PROCESSORGAMESETTINGS_HPP
|
|
|
|
|
2017-08-23 01:58:07 +00:00
|
|
|
#include "apps/openmw/mwbase/environment.hpp"
|
|
|
|
#include "apps/openmw/mwgui/windowmanagerimp.hpp"
|
|
|
|
|
2017-06-20 02:28:45 +00:00
|
|
|
#include "../PlayerProcessor.hpp"
|
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class ProcessorGameSettings : public PlayerProcessor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ProcessorGameSettings()
|
|
|
|
{
|
|
|
|
BPP_INIT(ID_GAME_SETTINGS)
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void Do(PlayerPacket &packet, BasePlayer *player)
|
|
|
|
{
|
2017-08-23 01:58:07 +00:00
|
|
|
if (isLocal())
|
|
|
|
{
|
|
|
|
if (MWBase::Environment::get().getWindowManager()->isGuiMode())
|
|
|
|
{
|
|
|
|
if (MWBase::Environment::get().getWindowManager()->getMode() == MWGui::GM_Console && !player->consoleAllowed)
|
|
|
|
{
|
|
|
|
MWBase::Environment::get().getWindowManager()->popGuiMode();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-06-20 02:28:45 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_PROCESSORGAMESETTINGS_HPP
|