Small error in how mouse events are processed. I need to do them _outside_ of the guecs::UI so that the event is checked once and then confirmed in all grids. Then created a tombstone device to be used as a dead enemy marker that will later allow looting.
This commit is contained in:
parent
6447f86954
commit
e04c03b381
8 changed files with 37 additions and 17 deletions
8
gui.cpp
8
gui.cpp
|
@ -352,9 +352,11 @@ namespace gui {
|
|||
}
|
||||
|
||||
void FSM::mouse() {
|
||||
// need to sort out how this will be easier with multiple UIs
|
||||
$combat_view.$gui.mouse($window);
|
||||
$status_view.$gui.mouse($window);
|
||||
if(sf::Mouse::isButtonPressed(sf::Mouse::Button::Left)) {
|
||||
sf::Vector2f pos = $window.mapPixelToCoords(sf::Mouse::getPosition($window));
|
||||
$combat_view.$gui.mouse(pos.x, pos.y);
|
||||
$status_view.$gui.mouse(pos.x, pos.y);
|
||||
}
|
||||
}
|
||||
|
||||
void FSM::generate_map() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue