Larkinabout / fvtt-token-action-hud-core

Token Action HUD is a repositionable HUD of actions for a selected token.
13 stars 19 forks source link

[FEATURE] Allow right-clicking on groups #136

Closed dmrickey closed 1 year ago

dmrickey commented 1 year ago

Right clicking on groups has core-behavior if edit mode is enabled. But it would be nice if module-devs could handle right-clicking when the hud is locked.

In pf1, a single "Item" (foundry Item, not an "in-game item"), can have multiple sub-actions. So I've built the pf1 module so it can show the Item, if it only has one action defined (basically everything is like this by default), or if the Item has multiple actions, then I show that Item as a group with its actions grouped within that header.

A user can right click an Item to bring up window. Or they can right click an action (pf1 action, not TAH action) to bring up that action's window. Specifically in my case where the hud is locked, and an Item is now a group because it has multiple actions under it, I'd like to be able to open the Item's window by right clicking on the Item group header.

dmrickey commented 1 year ago

e.g. image

Dueling Dagger and Greataxe With Keen are weapons with only one action (pf action), so it just shows the item itself. I can right click on those to bring up those item sheets.

Greataxe and Rapier each have two actions (pf action), so each of those are now a subgroup with two actions (tah action) in those groups. I can right click on those to bring up the action (pf action) sheets.

In the second case, it would be nice if I could right click on the header and bring up those Item Sheets. Essentially -- I guess I'd like to be able to optionally treat subgroup headers as their own actions

Larkinabout commented 1 year ago

Possibly going to look at allowing middle mouse as an option, but also allow left- and right-click bindings to be changed to user preference. This'll open up the opportunity for more events as well as disable interactions that users don't care about, for example, click to collapse/expand group.

dmrickey commented 1 year ago

If it's going to be provided as an option, I (as the system module) would like a way to provide a default so I can basically provide the same behavior for right clicking on the group header that I provide for clicking on an action

Larkinabout commented 1 year ago

Added in 1.5.0.