1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-24 03:47:18 +02:00

Removed no longer used

This commit is contained in:
Ivan Savenko 2023-06-22 22:12:05 +03:00
parent 4e7412faa6
commit dfeeeb1f5f
8 changed files with 0 additions and 42 deletions

View File

@ -244,11 +244,6 @@ bool InputHandler::hasTouchInputDevice() const
return fingerHandler->hasTouchInputDevice();
}
bool InputHandler::isMouseButtonPressed(MouseButton button) const
{
return mouseHandler->isMouseButtonPressed(button) || fingerHandler->isMouseButtonPressed(button);
}
void InputHandler::pushUserEvent(EUserEvent usercode, void * userdata)
{
SDL_Event event;

View File

@ -66,9 +66,6 @@ public:
/// returns true if system has active touchscreen
bool hasTouchInputDevice() const;
/// Returns true if selected mouse button is pressed at the moment
bool isMouseButtonPressed(MouseButton button) const;
/// Generates new user event that will be processed on next frame
void pushUserEvent(EUserEvent usercode, void * userdata);

View File

@ -78,15 +78,3 @@ void InputSourceMouse::handleEventMouseButtonUp(const SDL_MouseButtonEvent & but
break;
}
}
bool InputSourceMouse::isMouseButtonPressed(MouseButton button) const
{
static_assert(static_cast<uint32_t>(MouseButton::LEFT) == SDL_BUTTON_LEFT, "mismatch between VCMI and SDL enum!");
static_assert(static_cast<uint32_t>(MouseButton::MIDDLE) == SDL_BUTTON_MIDDLE, "mismatch between VCMI and SDL enum!");
static_assert(static_cast<uint32_t>(MouseButton::RIGHT) == SDL_BUTTON_RIGHT, "mismatch between VCMI and SDL enum!");
static_assert(static_cast<uint32_t>(MouseButton::EXTRA1) == SDL_BUTTON_X1, "mismatch between VCMI and SDL enum!");
static_assert(static_cast<uint32_t>(MouseButton::EXTRA2) == SDL_BUTTON_X2, "mismatch between VCMI and SDL enum!");
uint32_t index = static_cast<uint32_t>(button);
return mouseButtonsMask & SDL_BUTTON(index);
}

View File

@ -28,6 +28,4 @@ public:
void handleEventMouseButtonDown(const SDL_MouseButtonEvent & current);
void handleEventMouseWheel(const SDL_MouseWheelEvent & current);
void handleEventMouseButtonUp(const SDL_MouseButtonEvent & current);
bool isMouseButtonPressed(MouseButton button) const;
};

View File

@ -237,17 +237,6 @@ bool InputSourceTouch::hasTouchInputDevice() const
return SDL_GetNumTouchDevices() > 0;
}
bool InputSourceTouch::isMouseButtonPressed(MouseButton button) const
{
if (state == TouchState::TAP_DOWN_LONG)
{
if (button == MouseButton::RIGHT)
return true;
}
return false;
}
void InputSourceTouch::emitPanningEvent(const SDL_TouchFingerEvent & tfinger)
{
Point distance = convertTouchToMouse(-tfinger.dx, -tfinger.dy);

View File

@ -105,5 +105,4 @@ public:
void handleUpdate();
bool hasTouchInputDevice() const;
bool isMouseButtonPressed(MouseButton button) const;
};

View File

@ -189,11 +189,6 @@ Point CGuiHandler::screenDimensions() const
return Point(screen->w, screen->h);
}
bool CGuiHandler::isMouseButtonPressed(MouseButton button) const
{
return inputHandlerInstance->isMouseButtonPressed(button);
}
void CGuiHandler::drawFPSCounter()
{
static SDL_Rect overlay = { 0, 0, 64, 32};

View File

@ -70,9 +70,6 @@ public:
/// May not match size of window if user has UI scaling different from 100%
Point screenDimensions() const;
/// returns true if specified mouse button is pressed
bool isMouseButtonPressed(MouseButton button) const;
/// returns true if chosen keyboard key is currently pressed down
bool isKeyboardAltDown() const;
bool isKeyboardCtrlDown() const;