Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doubleclick in previews to trigger action #149

Merged
merged 3 commits into from
Dec 3, 2022

Conversation

elmodor
Copy link
Contributor

@elmodor elmodor commented Nov 30, 2022

Fixes/Solves
While I was create an asset pack, I was adding cards to the game quite often. Clicking on the card an add is quite tedious after a while.
Also a double click on an item is usually an enter action in many games / GUIs.

So I tried to implement a double click action for these. The double click action now works for:

  • Objects (to add)
  • Games (to load)
  • Room (to select, apply has to be hit manually still)
  • Loading Savegames
  • Saving Savegames

Copy link
Owner

@drwhut drwhut left a comment

Choose a reason for hiding this comment

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

Looks good, will test it thoroughly before merging!

Copy link
Owner

@drwhut drwhut left a comment

Choose a reason for hiding this comment

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

I've just been testing the changes, and there's one thing that strikes out to me: when spamming double click on an object, the "selected" background flickers on and off. Is it ok if this stays on when spamming double-click? I think this is because single-click toggles whether the item is selected - this functionality can change if need be, since I've just realised that most file managers don't work this way (only when holding down Ctrl does it toggle).

Unselection only works with multiple_select
@elmodor
Copy link
Contributor Author

elmodor commented Dec 2, 2022

So I modified the click behavior. Singleclick does not unselect anymore. Only multi_select can unselect.
I think this looks more clean now too.

I added the function set_selected_single which unselects all other pieces except the own. Triggered on a singleclick.

Copy link
Owner

@drwhut drwhut left a comment

Choose a reason for hiding this comment

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

Looks good! I'll test these changes again before merging.

@drwhut drwhut merged commit 2f6ac8a into drwhut:master Dec 3, 2022
@elmodor elmodor deleted the doubleclick_previews branch December 3, 2022 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants