intelligent sizing of gui - chars not % or px?

Geyser is an object oriented framework for creating, updating and organizing GUI elements within Mudlet.
Post Reply
Caled
Posts: 403
Joined: Thu Apr 09, 2009 4:45 am

intelligent sizing of gui - chars not % or px?

Post by Caled »

I'm currently spending half my time on a 12" netbook, and the rest on a 15" screen.
I am trying to create a gui container that is 80 characters wide - the same as my word wrap - to fit underneath my main text.

To the right of my main text I have channel capture, map capture, and various other bits and pieces. Most of these are more dynamically sized with percentages and math based on window size etc.

But this new one - I can't work out how to calculate the pixel width 80 characters at resolution x,y and font size z.
Is there a way? I want to make it automatic as it is not just me using this system.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: intelligent sizing of gui - chars not % or px?

Post by tsuujin »

you can use calcFontSize, from the manual.

Post Reply