Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   GetGuiTextWidth/Height, GetGuiInnerWidth/Height, Maxsize (https://forums.graalonline.com/forums/showthread.php?t=80076)

projectigi 06-14-2008 03:28 PM

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

cbk1994 06-14-2008 07:25 PM

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.

Chompy 06-14-2008 09:04 PM

Quote:

Originally Posted by cbk1994 (Post 1397040)
There is no point for maxExtent and maxSize, when this can be scripted.

minSize and minExtent can be scripted aswell :p So what's your point? :)

cbk1994 06-14-2008 09:18 PM

Quote:

Originally Posted by Chompy (Post 1397066)
minSize and minExtent can be scripted aswell :p So what's your point? :)

Because then it would try to resize automatically based on the contents ;o

Chompy 06-14-2008 09:20 PM

Quote:

Originally Posted by cbk1994 (Post 1397072)
Because then it would try to resize automatically based on the contents ;o

o.o?

Admins 06-14-2008 09:21 PM

Hmmm could add a profile.gettexwidth(text) or so for using the profiles font etc. to calculate it.

projectigi 06-14-2008 09:40 PM

ehr
<font size=12> would be 12 pt right?

so gettextwidth uses zoom size, not pt size

cbk1994 06-14-2008 10:12 PM

Quote:

Originally Posted by projectigi (Post 1397077)
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.

xXziroXx 06-15-2008 02:55 AM

Quote:

Originally Posted by projectigi (Post 1397077)
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.


All times are GMT +2. The time now is 02:09 AM.

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