Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   GraalControl.onResize() (https://forums.graalonline.com/forums/showthread.php?t=75246)

Twinny 07-11-2007 05:09 PM

GraalControl.onResize()
 
When I resize the Graal window, it seems to call this event a random amount of times. I noticed that it commonly called it 14 or 9 times. Should I be using a different event? I want to call some gui functions to replace all the guis after a screen resize.


[Edit]:
I just had it called 49 times in one resize... now 136... The longer you drag the higher the number but it's only called after you stop dragging. All of Graal freezes until you let go :x

zokemon 07-11-2007 05:47 PM

That's totally normal o.O
I think you would be more satisfied with its father though:
GUIContainer.onResize()

Twinny 07-11-2007 06:36 PM

Quote:

Originally Posted by zokemon (Post 1328200)
That's totally normal o.O
I think you would be more satisfied with its father though:
GUIContainer.onResize()

That still calls the event multiple times when you finish dragging... I only need it called when it has finished being resized...how do I go about this?

zokemon 07-11-2007 06:57 PM

Quote:

Originally Posted by Twinny (Post 1328206)
That still calls the event multiple times when you finish dragging... I only need it called when it has finished being resized...how do I go about this?

Yeah, they all get called when ever the canvas is resized which is when it detects a window size change every 0.05 seconds. You might be able to toy with some of those variables/functions that say if the mouse is inside the Graal window? I would get them but I'm rather tired so you'll have to settle with only partial help this time ;)

Admins 07-11-2007 08:17 PM

What exactly is the problem with moving the controls? Each of those events is valid. You can eventually take the actual size of the control instead of the x,y parameters provided to the event handler to avoid some strange resizing, but it shouldn't really be that slow?

Twinny 07-11-2007 09:18 PM

Quote:

Originally Posted by Stefan (Post 1328249)
What exactly is the problem with moving the controls? Each of those events is valid. You can eventually take the actual size of the control instead of the x,y parameters provided to the event handler to avoid some strange resizing, but it shouldn't really be that slow?

My actual problem is the need to use the onResize event called by GraalControl. Currently it calls multiple times while one is resizing the graal window (regardless of the fact that graal always seems to freeze when you do resize the window).

I thought the event would only be called after the player has finished resizing the Graal window but I found it calling it multiple times during the operation. I was wondering if this was a bug and if not, was there a similiar event called when the player has finished rezising the window that only gets called once.

Admins 07-11-2007 11:42 PM

There is no special event when the user finished resizing

Twinny 07-11-2007 11:48 PM

Quote:

Originally Posted by Stefan (Post 1328354)
There is no special event when the user finished resizing

Possibility of one being added? (for v4 or v5)


All times are GMT +2. The time now is 07:19 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.