unknown-horizons / godot-port

Unknown Horizons Godot Engine Port
https://www.unknown-horizons.org
GNU General Public License v2.0
663 stars 83 forks source link

Enhance rotate and zoom UI #112

Open CrafterSvK opened 1 year ago

CrafterSvK commented 1 year ago

Hello, I've been trying to get a hold of the codebase, so I've chosen the simplest thing I could think of.

Rotation is currently handled by multiple keyboard input handlers which do separately things (rotate camera, rotate isometric objects). Need to merge to one keyboard handler which sends signals to other handlers. In my opinion it would be lazy to solve this by making a global emitter, for these kinds of things, maybe that's right, I do not know. Or just make button to click rotate_left, rotate_right key :)

CrafterSvK commented 1 year ago

Every WorldThing can now react to rotation of camera. Maybe the emit to Global camera rotation from buttons can be directly made in TabWidget so there will be no need to signal it through PlayerHUD to CameraControls.

CrafterSvK commented 1 year ago

Buttons are now disabled on max/min zoom. It's handled using Global singleton, maybe refactoring to different Singleton would be better. Or if you find another way to do this, I would be glad.

CrafterSvK commented 1 year ago

@artism90 check it out if you've got time

CrafterSvK commented 1 year ago

I addressed the issues, thanks

LinuxDonald commented 8 months ago

@CrafterSvK have you maybe time to get this pr done please?

LinuxDonald commented 1 month ago

@CrafterSvK how it looks on this pr?

CrafterSvK commented 1 month ago

Hello, I can take a look this evening. This probably will need a rebase first.