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

Drag items with right-click #242

Open
TheYellowArchitect opened this issue Sep 9, 2024 · 3 comments
Open

Drag items with right-click #242

TheYellowArchitect opened this issue Sep 9, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@TheYellowArchitect
Copy link
Contributor

TheYellowArchitect commented Sep 9, 2024

In the game I'm making (think topdown shooter like Synthetik), left click shoots a gun, and also if you left click an item (to drag it), the item is activated. To move items to other inventory slots, right click is required. I don't know how easy that is to implement.

The only solution I found on the internet is this which to synopsize: Duplicates the left click input event mouse button, and replaces the left click with right click. Though it cannot be copy-pasted as is to ctrl_draggable from my test

@peter-kish peter-kish added the enhancement New feature or request label Sep 11, 2024
@peter-kish
Copy link
Owner

Yeah, that solution looks like a hack and Godot doesn't seem to "officially" support right-click drags ☹️
Since I'm trying to stick to the "Godot way" of implementing things, I don't see this being implemented soon (I had bad experience with including such solutions into my code).

But I'll leave the issue open in case something changes and Godot 4.4 starts supporting this feature.

@TheYellowArchitect
Copy link
Contributor Author

TheYellowArchitect commented Sep 14, 2024

I have wasted 2 months in a past project because I went opposite to the "Godot way", so I fully understand, and agree.
I would suggest to change the "wontfix" tag to "godot-core-engine" or sth, so its more explicit what holds an issue (and also apply it here)

Btw, aside of the above hack, how would you suggest to implement this right-click to drag feature?

@TheYellowArchitect TheYellowArchitect changed the title [Feature Request] Drag items with right-click Drag items with right-click Sep 22, 2024
@TheYellowArchitect
Copy link
Contributor Author

I opened a godot proposal godotengine/godot-proposals#10837
Whenever it is completed, this issue can close 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants