Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Robosturm committed Dec 26, 2023
1 parent 1254571 commit c5b2a8c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 13 additions & 1 deletion 3rd_party/oxygine-framework/oxygine/Input.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "3rd_party/oxygine-framework/oxygine/Input.h"
#include "3rd_party/oxygine-framework/oxygine/actor/Stage.h"
#include "3rd_party/oxygine-framework/oxygine/core/gamewindow.h"

namespace oxygine
{
Expand Down Expand Up @@ -28,6 +29,10 @@ namespace oxygine

void Input::sendPointerButtonEvent(spStage & stage, MouseButton button, qint32 x, qint32 y, float pressure, qint32 type, PointerState* ps)
{
if (GameWindow::getWindow()->renderingPaused())
{
return;
}
if (!m_multiTouch && ps->getIndex() != 1 && ps != &m_pointerMouse)
{
if (type == TouchEvent::TOUCH_UP)
Expand Down Expand Up @@ -65,7 +70,10 @@ namespace oxygine

void Input::sendPointerMotionEvent(spStage & stage, qint32 x, qint32 y, float pressure, PointerState* ps)
{

if (GameWindow::getWindow()->renderingPaused())
{
return;
}
if (!m_multiTouch && ps->getIndex() != 1 && ps != &m_pointerMouse)
{
return;
Expand All @@ -82,6 +90,10 @@ namespace oxygine

void Input::sendPointerWheelEvent(spStage & stage, const QPoint& dir, PointerState* ps)
{
if (GameWindow::getWindow()->renderingPaused())
{
return;
}
TouchEvent te(TouchEvent::WHEEL_DIR, true, ps->getPosition());
te.index = ps->getIndex();
te.wheelDirection = dir;
Expand Down
6 changes: 5 additions & 1 deletion game/ui/ingameinfobar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,11 @@ void IngameInfoBar::updateMinimap()

void IngameInfoBar::updateCursorInfo(qint32 x, qint32 y)
{
updateTerrainInfo(x, y, false);
if (m_pMenu->getCursor()->getMapPointX() == x &&
m_pMenu->getCursor()->getMapPointY() == y)
{
updateTerrainInfo(x, y, false);
}
}

void IngameInfoBar::updateTerrainInfo(qint32 x, qint32 y, bool update)
Expand Down

0 comments on commit c5b2a8c

Please sign in to comment.