godot
godot copied to clipboard
[WIP] Add a `TouchActionsPanel` to Android Editor
- Implements and closes https://github.com/godotengine/godot-proposals/issues/11342
This PR introduces a new UI TouchActionsPanel with common actions buttons like save, undo, and redo. It is designed for the Android editor, where touch input is the primary interaction method. The buttons simulate actions like ui_undo and ui_redo by leveraging existing shortcuts. The creation of this class allows for future improvements and the addition of more touch-based actions.
Are you still working on this?
Are you still working on this?
Yes.
The panel looks nice (tested on PC). What more is planned for this feature? Right now it's probably fine as a base.
Though I think the undo/redo buttons should get disabled when not available (similar to buttons in Scene menu).
The panel looks nice (tested on PC). What more is planned for this feature? Right now it's probably fine as a base.
Yes, base is ready. I just need to add few more action buttons and an option to lock the panel position.
Though I think the undo/redo buttons should get disabled when not available (similar to buttons in Scene menu).
Disabling it for the scene editor is straightforward since it has a history_changed signal. However, it seems like there's no signal for the script editor. I’m looking for a way to detect if the script editor is currently open and whether undo/redo actions are available without using has_undo or has_redo for each change.
I'm not sure about positioning of the buttons:
The first 2 buttons (padlock and arrows) are related to the panel itself. It would be nice if they were more clearly separated from the actual action icons.
Also the lock button locks position and orientation and the orientation button is visibly disabled
Wouldn't it be better if the lock button was after the orientation button?
@syntaxerror247 I have a little suggestion. You could add a button that hide/show or expand/shrink the panel content. Then it will be easier to use. Thank for your work.
@syntaxerror247 I have a little suggestion. You could add a button that hide/show or expand/shrink the panel content. Then it will be easier to use. Thank for your work.
@llama-nl Thank you for the suggestion! I'm not sure if adding this is the right choice, but I'll give it more thought. If it seems necessary, I'll consider adding it in a follow-up PR.
@syntaxerror247 Are you still working on this, or is it ready for review?
@m4gr3d It's ready for review! While it’s fully functional, there are a few enhancements I’d like to make, such as adding more action buttons and disabling undo/redo when no history is available. I believe this PR serves as a solid base. I am quite busy currently, so I plan to further improve it in a follow-up PR.
@m4gr3d It's ready for review! While it’s fully functional, there are a few enhancements I’d like to make, such as adding more action buttons and disabling undo/redo when no history is available. I believe this PR serves as a solid base. I am quite busy currently, so I plan to further improve it in a follow-up PR.
Sounds good, I'll review the PR and test the new panel! Could you have a video to the PR description that showcases the panel in action.
Could you have a video to the PR description that showcases the panel in action.
Sure, I’ve added a demo video showing the panel in action.
Thanks!