-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
modifier actions will shadow simple actions if flag=false (fix #18793) #32457
Conversation
6854b22
to
25327fe
Compare
core/os/input_event.cpp
Outdated
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "alt"), "set_alt", "get_alt"); | ||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "shift"), "set_shift", "get_shift"); | ||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "control"), "set_control", "get_control"); | ||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "meta"), "set_metakey", "get_metakey"); | ||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "command"), "set_command", "get_command"); | ||
|
||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "isActionPressedOnModifier"), "set_action_pressed_on_modifier", "is_action_pressed_on_modifier"); |
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.
You're a long time Godot user, you might have figured by now that all properties are snake_case
;)
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.
And the property should be action_pressed_on_modifier
, not with is_
prefix (that's the getter).
That being said, this is probably not a wanted addition, but just mentioning the style issue in any case.
IMO this should go through https://github.com/godotengine/godot-proposals before making a PR, to define what should be implemented if anything. |
I am kind of puzzled with the implementation. IMHO, this too specific to the problem. Whether or not to set Let's take an example with the 2D editor. You bind:
Here, if you press ctrl, then s (not releasing ctrl) you want the rotation to be active as soon a ctrl is pressed, but don't want to trigger the scale when pressing s. You also want the rotation to stay active the whole time to avoid the screen "blinking" when you press s. So basically the save action takes over the scale action but not the rotation one. I think this has to be discussed a little bit more. There is probably a smart way to fix this. I was thinking about distinguishing "state" actions from "event" action, so that we can determine which one can coexist ? Or maybe a priority system could be implemented, whether by using a priority integer or by setting, for each action, a list of action that are taken over ? I am not even sure this feature is desired, as in the original issue you could just have used an if/else statement to solve the problem. So it might not worth the trouble too. |
@akien-mga issue #18793 is open since 11 May 2018 I don't think a third place is needed to discuss it.
Can you make a script or proper example which can be tested like tinmanjuggernaut did in the issue, so I can test the current solution. Using some rotation and trying to save at the same time sounds very strange.
I am open for discussion, this solution is simple and seems to work.
Like I said #18793:
The Input checks happen in different scripts. |
25327fe
to
aa8e684
Compare
This would be really nice if it could be accepted.
|
Seems like the idea got abandoned. Is there any chance that this will be implemented in 4.0 ? |
@AlexHolly Is this still desired? If so, it needs to be rebased on the latest master branch. If not, abandoned pull requests will be closed in the future as announced here. |
Obviously it is still desired, otherwise people would not ask. My pull requests are not abandoned. You guys are just unable to merge them after I resolved the conflicts. Stop asking for it if you are not ready to merge. Let me help you to resolve this one. |
@AlexHolly Try not to assume mal-intent where there is none. Godot has almost 800 open PRs and it's a very difficult task to look through them all. Sometimes PRs go stale for a long time, so we want to know if the author is still interested and active. In your particular case, you were given feedback 9 months ago. You were told to open a proposal and haven't. Also, your PR is not ready to merge, there are style issues (ex: line 189 should not exist). If you rebased as asked, the CI checks would have caught this. |
It will keep the current input behavior, if needed
is_action_pressed_on_modifier=false
can be set.(also improved
as_text()
for modifiers)Test script:
Bugsquad edit: Fixes #18793.