mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 15:41:13 -04:00
[Client] Remove unnecessary mwmp::Main::pressedKey() function
Additionally, add comment around where it was originally used.
This commit is contained in:
parent
e0f623fb87
commit
78a9a428a6
@ -21,6 +21,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "../mwmp/Main.hpp"
|
#include "../mwmp/Main.hpp"
|
||||||
#include "../mwmp/LocalPlayer.hpp"
|
#include "../mwmp/LocalPlayer.hpp"
|
||||||
|
#include "../mwmp/GUIController.hpp"
|
||||||
/*
|
/*
|
||||||
End of tes3mp addition
|
End of tes3mp addition
|
||||||
*/
|
*/
|
||||||
@ -863,7 +864,16 @@ namespace MWInput
|
|||||||
|
|
||||||
void InputManager::keyPressed( const SDL_KeyboardEvent &arg )
|
void InputManager::keyPressed( const SDL_KeyboardEvent &arg )
|
||||||
{
|
{
|
||||||
mwmp::Main::pressedKey(arg.keysym.scancode);
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Pass the pressed key to the multiplayer-specific GUI controller
|
||||||
|
*/
|
||||||
|
mwmp::Main::get().getGUIController()->pressedKey(arg.keysym.scancode);
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
|
|
||||||
// HACK: to make Morrowind's default keybinding for the console work without printing an extra "^" upon closing
|
// HACK: to make Morrowind's default keybinding for the console work without printing an extra "^" upon closing
|
||||||
// This assumes that SDL_TextInput events always come *after* the key event
|
// This assumes that SDL_TextInput events always come *after* the key event
|
||||||
// (which is somewhat reasonable, and hopefully true for all SDL platforms)
|
// (which is somewhat reasonable, and hopefully true for all SDL platforms)
|
||||||
|
@ -257,13 +257,6 @@ CellController *Main::getCellController() const
|
|||||||
return mCellController;
|
return mCellController;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Main::pressedKey(int key)
|
|
||||||
{
|
|
||||||
if (pMain == nullptr) return;
|
|
||||||
if (get().getGUIController()->pressedKey(key))
|
|
||||||
return; // if any gui bind pressed
|
|
||||||
}
|
|
||||||
|
|
||||||
// When sending packets with ingame script values, certain packets
|
// When sending packets with ingame script values, certain packets
|
||||||
// should be ignored because of their potential for spam
|
// should be ignored because of their potential for spam
|
||||||
bool Main::isValidPacketScript(std::string script)
|
bool Main::isValidPacketScript(std::string script)
|
||||||
|
@ -25,7 +25,6 @@ namespace mwmp
|
|||||||
static void destroy();
|
static void destroy();
|
||||||
static const Main &get();
|
static const Main &get();
|
||||||
static void frame(float dt);
|
static void frame(float dt);
|
||||||
static void pressedKey(int key);
|
|
||||||
|
|
||||||
static bool isValidPacketScript(std::string script);
|
static bool isValidPacketScript(std::string script);
|
||||||
static std::string getResDir();
|
static std::string getResDir();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user