Fix off by one error for action area (#663)

If the mouse was at the leftmost edge of the screen and there was an
action area from 0 to N, the click wouldn't register

Before if an action area was defined from A to B it was from A exclusive
to B inclusive now it is from A inclusive to B exclusive. This is the
same way that the pixel addresses work, since a pixel's coordinate is
defined by the top-left corner.

Fixes #661
This commit is contained in:
Patrick Ziegler 2017-08-29 20:58:23 +02:00 committed by NBonaparte
parent 2d1e3c215f
commit 9b98b766b2

View File

@ -113,7 +113,7 @@ struct action_block : public action {
} }
bool test(int point) const { bool test(int point) const {
return static_cast<int>(start_x) < point && static_cast<int>(end_x) >= point; return static_cast<int>(start_x) <= point && static_cast<int>(end_x) > point;
} }
}; };