Skip to content

Do not allow to dismiss a monster by mouse right-clicking - #10181

Draft
ihhub wants to merge 1 commit into
masterfrom
remove-right-click-monster-dismiss
Draft

Do not allow to dismiss a monster by mouse right-clicking#10181
ihhub wants to merge 1 commit into
masterfrom
remove-right-click-monster-dismiss

Conversation

@ihhub

@ihhub ihhub commented Sep 11, 2025

Copy link
Copy Markdown
Owner

This is against the whole concept of using mouse right-click for gathering information. DISMISS button in the monster dialog is the correct way of doing things.

This affects Battle Only and the Editor.

close #9991

This is against the whole concept using mouse right-click for gathering information. DISMISS button in the monster dialog is the correct way of doing things.
@ihhub ihhub added this to the 1.1.12 milestone Sep 11, 2025
@ihhub ihhub self-assigned this Sep 11, 2025
@ihhub ihhub added improvement New feature, request or improvement ui UI/GUI related stuff logic Things related to game logic labels Sep 11, 2025
@sonarqubecloud

Copy link
Copy Markdown

@Districh-ru Districh-ru left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ihhub,
IMHO we should not do this change for now because:

  • all other bars (artifacts, secondary skills) use the right-click for remove and it will be not good if one of the bars will have the other logic,
  • to dismiss a troop in this PR the mapmaker should do more actions: double click the troop, click DISMISS button, click OK in the confirmation dialog,
  • the remove by right-click logic was used in Battle Only for many years and many people have gotten used to using that logic in editing dialogs.

In example, we can add extra overlay sprites (or buttons) for every item in the bar to remove it by left click, something like this:

And apply the same logic to all bars in the dialog.

Any other suggestions to ensure consistent logic across all dialog items are welcome. :)

}
}

if ( can_change && keepLastTroop ) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dialog::DISMISS flag should be set if we do not need to keep the last troop in the army:

Suggested change
if ( can_change && keepLastTroop ) {
if ( can_change && !keepLastTroop ) {

@ihhub
ihhub marked this pull request as draft September 29, 2025 05:46
@ihhub ihhub modified the milestones: 1.1.12, 1.1.13 Nov 9, 2025
@ihhub ihhub modified the milestones: 1.1.13, 1.2.0 Dec 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement New feature, request or improvement logic Things related to game logic ui UI/GUI related stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable monster slot removal on mouse right click for some cases

2 participants