ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.72k stars 376 forks source link

Adventure screen, double-clicking on an already selected castle should not open the building window or screen located in the click area of the castle screen #2334

Open LeHerosInconnu opened 3 years ago

LeHerosInconnu commented 3 years ago

In fheroes2, double-clicking on an already selected castle should not open the building window or screen located in the click area of the castle screen.

This flaw is not present in the original game.

In fheroes2:

In the example, the Mage Guild in the Necromancer's castle: Double clic castle list 01

In the example, the Cathedral in the Knight's castle: Double clic castle list 02

In the example, the Upgraded Adobe in the Barbarian's castle: Double clic castle list 03

In the example, the Tavern in the Sorceress' Castle: Double clic castle list 04

This also happens when the option "game: use fade" is activated: Double clic castle list 05

In the example, the Mausoleum in the Necromancer's castle from the castle on the adventure map: Double clic castle map 06

Edit.

Same problem with the heroes.

In fheroes2:

In the example, with a hero in the list: Double clic hero list

In the example, with a hero on the adventure map: Double clic hero map

Edit.

Same problem in Kingdom Overview screen.

In fheroes2:

In the example, with a castle in the list: Double clic castle kingdom

In the example, with a hero in the list: Double clic hero kingdom

oleg-derevenetz commented 3 years ago

At the moment in fheroes2 event engine there is no such event as "double click", instead, there is a series of two clicks. If castle hasn't been selected earlier, then the first click from "double click" selects it and the second one opens the castle screen. However, if castle has already been selected, then the first click opens the castle screen and, if castle screen arrives fast enough (which is usually the case) the second click event will be handled by castle screen itself, which leads to opening the building windows, mage guilds and so on.

LeHerosInconnu commented 3 years ago

@oleg-derevenetz.

At the moment in fheroes2 event engine there is no such event as "double click", instead, there is a series of two clicks. If castle hasn't been selected earlier, then the first click from "double click" selects it and the second one opens the castle screen. However, if castle has already been selected, then the first click opens the castle screen and, if castle screen arrives fast enough (which is usually the case) the second click event will be handled by castle screen itself, which leads to opening the building windows, mage guilds and so on.

Thanks for the explanation. I don't know if it would be easy to add double-click support. But it would be nice to make sure that the unwanted events presented in this thread don't happen.