-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat(chat): shift click damage buttons for modifier #276 #277
base: release-0.3.0
Are you sure you want to change the base?
feat(chat): shift click damage buttons for modifier #276 #277
Conversation
Signed-off-by: Khunkurisu <[email protected]>
Signed-off-by: Khunkurisu <[email protected]>
…on damage/healing/focus chat buttons Signed-off-by: Khunkurisu <[email protected]>
…lines Signed-off-by: Khunkurisu <[email protected]>
…mplate Signed-off-by: Khunkurisu <[email protected]>
… the shift modifier Signed-off-by: Khunkurisu <[email protected]>
src/system/settings.ts
Outdated
{ | ||
name: KEYBINDINGS.MODIFY_DIALOG_DAMAGE_CARD, | ||
editable: [{ key: 'ShiftLeft' }, { key: 'ShiftRight' }], | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm of the opinion that it doesn't need to be a separate keybinding and can just use the generic Skip/Show Dialog. For a couple of reasons:
- It keeps the behaviour of modifier keys relatively consistent across the application
- It avoids us having to add a new keybinding setting every single time we do something with modifiers
- If someone wants to change what their alt/shift/ctrl key does, they only need to change one setting and not several
- If we separate keybindings too much we run the risk of key modifiers clashing with each other (e.g. if shift key shows dialog in one case but skips dialog in another, it may cause funky behaviour)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't disagree with your points about binding creep necessarily, except that I absolutely do not think the two keybinds should be the same. They're two entirely different functions in different contexts, and it feels incredibly wrong to have them tied together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only way I can personally see the skip/show dialog keybind being appropriate for this context is if the dialog appearing is the default behavior, and much like the roll dialog, we have a setting to allow it to be skipped by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or the inverse. Have it skipped by default but a setting to show it by default. Then the keybind being "skip/show dialog" works as a catch-all.
…p by default and used show/skip dialog keybind instead of new Signed-off-by: Khunkurisu <[email protected]>
Type
What type of pull request is this? (e.g., Bug fix, Feature, Refactor, etc.)
Description
This adds a simple DialogV2 popup when shift-clicking one of the damage/healing/focus buttons of a damage roll chat card. For damage and healing, a positive or negative integer can be entered. Positive will increase damage/healing taken, negative will reduce. For focus, the integer must be 0 or greater. When used with one of the damage multipliers, the modifier is applied before the multiplier (so +4 to 8 damage will result in 24 when clicking the x2 button, as it will modify the input to 12 prior to the doubling).
Related Issue
Closes #276.
How Has This Been Tested?
Screenshots (if applicable)




Checklist:
Additional context
I made sure to use localization strings where applicable. If the placement of anything (code or localization stuff) is erroneous, just let me know what to fix and I'll sort it out. I did not implement any css class for the input box, instead doing inline styling. This can easily be rectified, but that was a whole can of worms I did not want to touch without supervision.