abhi66 / rokon

Automatically exported from code.google.com/p/rokon
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Suggestion: centered windows #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It would be awesome if when you created a window you set it as centered, so 
when you grew\shrunk it the center would stay at the same point.

Original issue reported on code.google.com by Jor...@gmail.com on 9 Jul 2010 at 1:37

GoogleCodeExporter commented 9 years ago
This would have to go in DrawableObject, and apply to everything.

I'll work it in at some point, and see if it is okay for performance.

I don't want to over-bloat stuff, but yeah, it's a reasonable idea.

Original comment by rtaylor205@gmail.com on 9 Jul 2010 at 10:34

GoogleCodeExporter commented 9 years ago
I hacked a functional centered window together by updating the x\y when I 
updated the width\height. Doing it this way I can't use the move functions of 
course. It really does feel much more natural as a camera.

Having this apply to all drawables would be great actually. I end up having to 
manually offset sprites quite often.

Original comment by Jor...@gmail.com on 9 Jul 2010 at 10:03

GoogleCodeExporter commented 9 years ago
See scaleFromCentre in the trunk, also onMoveEnd(DrawableObject) in Scene for 
handling the result.

Original comment by rtaylor205@gmail.com on 11 Jul 2010 at 1:14

GoogleCodeExporter commented 9 years ago

Original comment by rtaylor205@gmail.com on 11 Jul 2010 at 1:15