Hello Guest

[FIXED] getX()/getY() missing from Display

  • 3 Replies
  • 8030 Views
*

Offline princec

  • *****
  • 1933
    • Puppygames
[FIXED] getX()/getY() missing from Display
« on: November 14, 2011, 15:43:50 »
Not entirely sure how or why but we got a setLocation() in Display but somehow no means to query it...

While I'm on the subject - how about get/setState() as well? (Iconified, Maximised, etc)

Cas :)

Re: [RFE] getX()/getY() missing from Display
« Reply #1 on: December 29, 2011, 11:48:30 »
I also need the getX() and getY() method in Display so that I can replace the current functionality provided by setParent() in my TWL Theme Editor.
This app remembers it's last size and position so that it can reopen in the same location next time. Currently the native resizing can't be used because it has no way to query the current position.

I propose the following methods to be added to Display:
getX() or getLocationX()
getY() or getLocationY()
wasMoved() analog to wasResizied()

*

Offline kappa

  • *****
  • 1319
Re: [RFE] getX()/getY() missing from Display
« Reply #2 on: February 18, 2012, 16:42:04 »
Added the new public API's Display.getX() and Display.getY().

Its implemented and works for both Linux and Mac.

So to complete this RFE someone just needs to complete the methods getX() and getY() inside the WindowsDisplay class. It shouldn't be a difficult task and basically just a copy and tweak of how the get width/height methods work.

Any takers?

*

Offline kappa

  • *****
  • 1319
Re: [RFE] getX()/getY() missing from Display
« Reply #3 on: February 18, 2012, 19:00:55 »
oh cool, Mazon's implemented the Windows bit now too with the nightly builds (that was quick!).

Do please test and confirm how the new API's work.

Marking RFE as FIXED.
« Last Edit: February 18, 2012, 19:04:40 by kappa »