Ogmo-Editor-3 / OgmoEditor3-CE

The Community Edition of Ogmo Editor 3
https://ogmo-editor-3.github.io
MIT License
503 stars 49 forks source link

Enhancement: Support tabbing between inputs, relinquish focus on fields with Enter, don't lose focus on fields when an entity or decal is hovered #209

Closed hubol closed 2 years ago

hubol commented 2 years ago

OK. My apologies for including a bit too much in this PR. My excuse is that it is all vaguely related to field data entry.

  1. Changing field values in Ogmo is kind of a hassle right now. This change allows you to select an entity or decal or whatever, and use tab to navigate the field values.

  2. An existing UX issue is that you cannot save your level when you have a field focused, so you have to click somewhere on the screen to blur the field before saving. I addressed this by having the enter key blur the field, like Blender. But maybe the need to blur the field before being able to save is not intended behavior in the first place--in which case it should probably be addressed in a different way.

  3. I also fixed an issue where your field inputs would be recreated, and thus lose focus, when you hovered over another entity or decal on the layer. This seemed like a bug to me, although it was pasted into both of the SelectTool classes.

  4. I removed some console spam because it didn't seem particularly useful.

Here's a cool video demoing some of this:

https://user-images.githubusercontent.com/25911974/146605328-2b9b582a-329d-49e7-850f-35e674067d5e.mp4

AustinEast commented 2 years ago

Hey just wanted to chime in and say this PR did not go unnoticed! I will try to find the time to review and merge (if someone else doesn't get to it before me!)

AustinEast commented 2 years ago

Actually looking over it quickly, all the changes seem good. Thanks again for the PR!