You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my game I have a chat and pause menu, both handled by separate systems. When I press UiAction::Back I would like to close the chat first and on second press I would like open the menu.
So in chat system I want to catch UiAction::Back if it was just pressed and the chat was open, to avoid it propagation to the in-game menu.
For this use case we currently have make_held function which unpressed the button. I can use it to avoid action propagation. But If I switch from just_pressed check to just_released - it won't work:
if ui_actions.just_released(UiAction::Chat){
ui_actions.make_held(UiAction::Chat);println!("{}", ui_actions.just_released(UiAction::Chat));// Prints `true`}
Because the function only unpressed the button, it doesn't clear just_*.
What solution would you like?
I would suggest to replace make_held with a new function called reset that fully clears the action state. So it becomes "unpressed" and "unjusted". I believe this is what user would expect and in want most cases.
The text was updated successfully, but these errors were encountered:
What problem does this solve?
In my game I have a chat and pause menu, both handled by separate systems. When I press
UiAction::Back
I would like to close the chat first and on second press I would like open the menu.So in chat system I want to catch
UiAction::Back
if it was just pressed and the chat was open, to avoid it propagation to the in-game menu.For this use case we currently have
make_held
function which unpressed the button. I can use it to avoid action propagation. But If I switch fromjust_pressed
check tojust_released
- it won't work:Because the function only unpressed the button, it doesn't clear
just_*
.What solution would you like?
I would suggest to replace
make_held
with a new function calledreset
that fully clears the action state. So it becomes "unpressed" and "unjusted". I believe this is what user would expect and in want most cases.The text was updated successfully, but these errors were encountered: