Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-14-2008, 03:28 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
GetGuiTextWidth/Height, GetGuiInnerWidth/Height, Maxsize

Hi,

something like

GetGuiTextWidth( size, font, style, text );
GetGuiTextHeight( size, font, style, text );

size = size in pt, like 12pt, 13pt etc -> 12, 13, etc
font = font as in "Arial"
style = b, i, etc
text = normal text xD

+

GuiControl.GetGuiInnerWidth/Height()

returns the "inner" width/height of a GuiCtrl
so a autowrapped text in a guimltextctrl is bigger than the actual linecount


+

GuiControl.maxExtent = { x, y };
GuiControl.maxSize = { x, y };

a "maximum" size, means the GuiControl rezises itself when it needs to become bigger to display all of its contents, but with a maximum size of the variable there
__________________
Reply With Quote
  #2  
Old 06-14-2008, 07:25 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
You can use gettextwidth(); there is no need for getGuiTextWidth, which would change nothing.

GuiMLTextCtrl should be in a GuiScrollCtrl anyway.

There is no point for maxExtent and maxSize, when this can be scripted.
__________________
Reply With Quote
  #3  
Old 06-14-2008, 09:04 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by cbk1994 View Post
There is no point for maxExtent and maxSize, when this can be scripted.
minSize and minExtent can be scripted aswell So what's your point?
__________________
Reply With Quote
  #4  
Old 06-14-2008, 09:18 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Chompy View Post
minSize and minExtent can be scripted aswell So what's your point?
Because then it would try to resize automatically based on the contents ;o
__________________
Reply With Quote
  #5  
Old 06-14-2008, 09:20 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by cbk1994 View Post
Because then it would try to resize automatically based on the contents ;o
o.o?
__________________
Reply With Quote
  #6  
Old 06-14-2008, 09:21 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
Hmmm could add a profile.gettexwidth(text) or so for using the profiles font etc. to calculate it.
Reply With Quote
  #7  
Old 06-14-2008, 09:40 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
ehr
<font size=12> would be 12 pt right?

so gettextwidth uses zoom size, not pt size
__________________
Reply With Quote
  #8  
Old 06-14-2008, 10:12 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by projectigi View Post
ehr
<font size=12> would be 12 pt right?

so gettextwidth uses zoom size, not pt size
Oh, I see what you mean. Zoom 1 is probably 12 point though.
__________________
Reply With Quote
  #9  
Old 06-15-2008, 02:55 AM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by projectigi View Post
ehr
<font size=12> would be 12 pt right?

so gettextwidth uses zoom size, not pt size
http://forums.graalonline.com/forums...ad.php?t=79740

Solves your issue.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
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:02 PM.


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