godot icon indicating copy to clipboard operation
godot copied to clipboard

[WIP] Add a `TouchActionsPanel` to Android Editor

Open syntaxerror247 opened this issue 11 months ago • 1 comments

  • 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.

syntaxerror247 avatar Dec 12 '24 23:12 syntaxerror247

Are you still working on this?

llama-nl avatar Jan 01 '25 16:01 llama-nl

Are you still working on this?

Yes.

syntaxerror247 avatar Jan 01 '25 16:01 syntaxerror247

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).

KoBeWi avatar Jan 12 '25 21:01 KoBeWi

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.

syntaxerror247 avatar Jan 13 '25 08:01 syntaxerror247

I'm not sure about positioning of the buttons: image 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 image Wouldn't it be better if the lock button was after the orientation button?

KoBeWi avatar Jan 14 '25 15:01 KoBeWi

@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 avatar Jan 14 '25 16:01 llama-nl

@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 avatar Jan 14 '25 18:01 syntaxerror247

@syntaxerror247 Are you still working on this, or is it ready for review?

m4gr3d avatar Jan 16 '25 19:01 m4gr3d

@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.

syntaxerror247 avatar Jan 16 '25 19:01 syntaxerror247

@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.

m4gr3d avatar Jan 16 '25 20:01 m4gr3d

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.

syntaxerror247 avatar Jan 16 '25 21:01 syntaxerror247

Thanks!

Repiteo avatar Mar 11 '25 02:03 Repiteo