-
Notifications
You must be signed in to change notification settings - Fork 38
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
make UI usable without mouse (+gamepad support) #53
Conversation
I found it really interesting, but ended up running into some problems about this PR 2 - I believe that UI should not be part of the core, but something to be implemented by the user, maybe this lib just contains the primordial part of UI. 3 - There would still be an elegant solution to be made without using PR, which would be to extend the class with its functionality. That said, I will not include the PR at the moment, but I will open it up for you to send this addition to the demo repo (As an additional demo), so I can accept this feature precisely to add an option for the end user to understand even more about the inventory system . From the maturation of the idea in the demo repository we can move something to the actual addon. |
1 - Uh, well I surely don't know the whole code so I guess I missed that. A Gridinventory sounds like a good idea. 2 - With core do you mean the add-on itself? Because it also has an folder called "core" which I didnt touch. 3 - I sadly cant think of any way. But why should standard Godot UI controls be less of a part of the core than mouse controls? At least for me it seems like the same level. Then maybe even mouse controls should be somewhat more separate? For it to be able to go into the demo repository it would have to be outside of the addon right? Should I make a version that extends the addons scripts with my changes? |
The biggest problem is that I saw that UI is something of an example, we can have different types of inputs. Different UIs tend to modify the way input will be done and we can still interact with inventories without UI (3D interactions dragging an item) That said, to improve the understanding of those who want to contribute, I moved the UI scripts to the demo repository. |
Yes, I'm sorry wanted to say about addon. |
That sounds good. Then does anything speak against making a pull request with these changes in the demo repository? I only changed the UI scripts and in the demo only Gridinventories are used at the moment so it should work without a problem. |
Yes it can be sent to the demo, it even works as a good example of different inputs. |
In version 0.9.0 ui scripts and scenes moved to addon again, but simplified assets used. |
All the changes happen inside the plugin as I think it is just as low level as mouse controls and would be very hard to just do them externally in the demo.
One thing that comes with it, but could be moved to an optional global setting, is that the dragged items always snap to hovered slots. However I personally do not dislike that.
In the demo there is just a few settings in the slot_ui.tscn(focus mode and signal connections): https://github.com/expressobits/inventory-system-demos/commit/356cc36d46adca39cfc295e67849b72c7ff52429
I can make a pull request there if this gets implemented here.
I hope you are okay with the way I did it but I would still be open to a different approach.