Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-09-2007, 06:59 PM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
Minimising a window ignores minsize

I've created a gui window... (Attachment 1). It looks great in game... until you minimise it (attachment 2).

I have set the minsize attribute on the window so it cant be dragged smaller than it should be but minimising the window ignores this value (and the size of the graphics).

Anyone know how i can fix this?

I think the only way to fix it would be to set a different window graphic when it's minimised and then reset it when it's maximised but if anyone can think of a better solution I'd really like to hear it.
Attached Thumbnails
Click image for larger version

Name:	window.jpg
Views:	133
Size:	54.6 KB
ID:	41982  
Attached Images
 
__________________

Coming soon (Hopefully:P)
Reply With Quote
  #2  
Old 07-09-2007, 09:41 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
Currently the width of the minimized window is always 98 pixels (don't ask me why), and the height is title height + bottom height.
Reply With Quote
  #3  
Old 07-09-2007, 11:48 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Euh.. that's not allright eah..
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #4  
Old 07-10-2007, 12:20 AM
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
Since you know the window will never be resized past your minsize, just add something like this (obviously replacing GuiWindowCtrl with the name of your window GUI):

NPC Code:
function GuiWindowCtrl.onResize(nw, nh) {
if (nw == 98) GuiWindowCtrl.width = GuiWindowCtrl.minsize[0];
}



Or to be more safe (in case this strange 98 number is changed):

NPC Code:
function GuiWindowCtrl.onResize(nw, nh) {
if (nw < GuiWindowCtrl.minsize[0]) GuiWindowCtrl.width = GuiWindowCtrl.minsize[0];
}

__________________
Do it with a DON!
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 02:37 AM.


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