Revert "Allow picking up items with a single touch (#29)"
This reverts commit b33e6dbcad3d15daf9f48ce1edb648be2ba91707.
This commit is contained in:
parent
ed85506dbe
commit
4f11fb7403
@ -215,14 +215,6 @@ public:
|
||||
{
|
||||
return m_receiver->left_active;
|
||||
}
|
||||
virtual bool getMiddleState()
|
||||
{
|
||||
return m_receiver->middle_active;
|
||||
}
|
||||
virtual void resetMiddleState()
|
||||
{
|
||||
m_receiver->middle_active = false;
|
||||
}
|
||||
virtual bool getRightState()
|
||||
{
|
||||
return m_receiver->right_active;
|
||||
@ -311,11 +303,6 @@ public:
|
||||
{
|
||||
return leftdown;
|
||||
}
|
||||
virtual bool getMiddleState()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual void resetMiddleState() {}
|
||||
virtual bool getRightState()
|
||||
{
|
||||
return rightdown;
|
||||
|
13
src/game.cpp
13
src/game.cpp
@ -3758,8 +3758,6 @@ void Game::processPlayerInteraction(GameRunData *runData,
|
||||
|
||||
input->resetLeftReleased();
|
||||
input->resetRightReleased();
|
||||
|
||||
input->resetMiddleState();
|
||||
}
|
||||
|
||||
|
||||
@ -3882,14 +3880,7 @@ void Game::handlePointingAtObject(GameRunData *runData,
|
||||
runData->selected_object->debugInfoText()));
|
||||
}
|
||||
|
||||
#ifdef HAVE_TOUCHSCREENGUI
|
||||
// Interact with object on single touch (touchscreengui.cpp send this event)
|
||||
bool middle_state = input->getMiddleState();
|
||||
#else
|
||||
const bool middle_state = false;
|
||||
#endif
|
||||
|
||||
if (input->getLeftState() || middle_state) {
|
||||
if (input->getLeftState()) {
|
||||
bool do_punch = false;
|
||||
bool do_punch_damage = false;
|
||||
|
||||
@ -3899,7 +3890,7 @@ void Game::handlePointingAtObject(GameRunData *runData,
|
||||
runData->object_hit_delay_timer = object_hit_delay;
|
||||
}
|
||||
|
||||
if (input->getLeftClicked() || middle_state)
|
||||
if (input->getLeftClicked())
|
||||
do_punch = true;
|
||||
|
||||
if (do_punch) {
|
||||
|
@ -114,8 +114,6 @@ public:
|
||||
virtual void setMousePos(s32 x, s32 y) = 0;
|
||||
|
||||
virtual bool getLeftState() = 0;
|
||||
virtual bool getMiddleState() = 0;
|
||||
virtual void resetMiddleState() = 0; // TODO: handle middle button like all others
|
||||
virtual bool getRightState() = 0;
|
||||
|
||||
virtual bool getLeftClicked() = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user