Fix bottom buttons not working in fullscreen mode

Fixes #50
This commit is contained in:
2017-02-08 11:00:46 -05:00
parent 92ba1e0fb0
commit ae02ac4793

View File

@@ -988,22 +988,8 @@ bool handle_action(sf::Event event) {
location the_point,point_in_area;
the_point = location(event.mouseButton.x, event.mouseButton.y);
the_point.x -= ul.x;
the_point.y -= ul.y;
end_scenario = false;
// Now split off the extra stuff, like talking and shopping.
if(overall_mode == MODE_TALKING) {
handle_talk_event(the_point);
if(overall_mode != MODE_TALKING)
return false;
}
if(overall_mode == MODE_SHOPPING) {
handle_shop_event(the_point);
if(overall_mode != MODE_SHOPPING)
return false;
}
// MARK: First, figure out where party is
switch(overall_mode) {
case MODE_OUTDOORS: case MODE_LOOK_OUTDOORS:
@@ -1037,6 +1023,21 @@ bool handle_action(sf::Event event) {
return are_done;
}
the_point.x -= ul.x;
the_point.y -= ul.y;
// Now split off the extra stuff, like talking and shopping.
if(overall_mode == MODE_TALKING) {
handle_talk_event(the_point);
if(overall_mode != MODE_TALKING)
return false;
}
if(overall_mode == MODE_SHOPPING) {
handle_shop_event(the_point);
if(overall_mode != MODE_SHOPPING)
return false;
}
// MARK: Then, handle a button being hit.
if(button_hit != 12)
switch(button_hit) {