|
|
|
@ -235,18 +235,24 @@ namespace gui { |
|
|
|
|
if(mouse->button == sf::Mouse::Button::Left) { |
|
|
|
|
sf::Vector2f pos = $window.mapPixelToCoords(mouse->position); |
|
|
|
|
if(in_state(State::NEXT_LEVEL)) { |
|
|
|
|
$boss_fight_ui->mouse(pos.x, pos.y); |
|
|
|
|
$boss_fight_ui->mouse(pos.x, pos.y, false); |
|
|
|
|
|
|
|
|
|
if($boss_fight_ui->boss_dead()) { |
|
|
|
|
event(Event::STAIRS_DOWN); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
$debug_ui.mouse(pos.x, pos.y); |
|
|
|
|
$combat_ui.mouse(pos.x, pos.y); |
|
|
|
|
$status_ui.mouse(pos.x, pos.y); |
|
|
|
|
$main_ui.mouse(pos.x, pos.y); |
|
|
|
|
$debug_ui.mouse(pos.x, pos.y, false); |
|
|
|
|
$combat_ui.mouse(pos.x, pos.y, false); |
|
|
|
|
$status_ui.mouse(pos.x, pos.y, false); |
|
|
|
|
$main_ui.mouse(pos.x, pos.y, false); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else if(const auto* mouse = ev->getIf<sf::Event::MouseMoved>()) { |
|
|
|
|
sf::Vector2f pos = $window.mapPixelToCoords(mouse->position); |
|
|
|
|
$debug_ui.mouse(pos.x, pos.y, true); |
|
|
|
|
$combat_ui.mouse(pos.x, pos.y, true); |
|
|
|
|
$status_ui.mouse(pos.x, pos.y, true); |
|
|
|
|
$main_ui.mouse(pos.x, pos.y, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(const auto* key = ev->getIf<sf::Event::KeyPressed>()) { |
|
|
|
|