InstallEventHandler(SizeWindow={}) action to include X and Y

Feature requests for future versions can be voiced here
Post Reply
Bugala
Posts: 1390
Joined: Sun Feb 14, 2010 7:11 pm

InstallEventHandler(SizeWindow={}) action to include X and Y

Post by Bugala »

When using:

Code: Select all

Local ID = CreateDisplay(Nil, {X=100, Y=100, Width=500, Height=300, Sizeable=True, Mode="windowed"})
OpenDisplay(ID)

InstallEventHandler({SizeWindow = Function(Action)
							ForEach(Action, DebugPrint)
									EndFunction})
Repeat
	WaitEvent()
Forever
You can see there is Width and Height, but there is no X and Y.

This isn't a big problem, since I can use GetAttribute() command to get the X and Y position, but main point here is consistency.

Thing is, at least in Windows you can also resize Hollywood windows by either choosing the left side of the window, or top side of the window, to be the dragging point, which means that not only will the Width and Height change, but also X and Y position. Currently "Action" doesn't recognise this possibility, but I need to make a separate GetAttribute() inquiry to get the new X and Y positions.
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: InstallEventHandler(SizeWindow={}) action to include X and Y

Post by airsoftsoftwair »

Yes, might make sense to add this. I'll check.
User avatar
airsoftsoftwair
Posts: 5830
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: InstallEventHandler(SizeWindow={}) action to include X and Y

Post by airsoftsoftwair »

Code: Select all

- New: The SizeWindow event message now contains additional X/Y fields that contain the window's position
  because that could also have changed in the course of window resizing
Post Reply