Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-11-2007, 05:09 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
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
Reply With Quote
  #2  
Old 07-11-2007, 05:47 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
That's totally normal o.O
I think you would be more satisfied with its father though:
GUIContainer.onResize()
__________________
Do it with a DON!
Reply With Quote
  #3  
Old 07-11-2007, 06:36 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by zokemon View Post
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?
Reply With Quote
  #4  
Old 07-11-2007, 06:57 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Twinny View Post
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
__________________
Do it with a DON!
Reply With Quote
  #5  
Old 07-11-2007, 08:17 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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?
Reply With Quote
  #6  
Old 07-11-2007, 09:18 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Stefan View Post
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.
Reply With Quote
  #7  
Old 07-11-2007, 11:42 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
There is no special event when the user finished resizing
Reply With Quote
  #8  
Old 07-11-2007, 11:48 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Stefan View Post
There is no special event when the user finished resizing
Possibility of one being added? (for v4 or v5)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:10 PM.


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