Dynamic Font Size

reallyjoel

06-03-2009 16:27:43

Is it possible to set the font so that it will fill up a certain percentage of another objects height? Specifically the capture text of a button. I want the text to fill up the button in the same way no matter what resolution the user sets for the game. Is this possible?

Five_stars

06-03-2009 17:09:45

I think you can do it only by hands: write a method, which detects max font size, that can be placed in box. You can use methods in widget setFontHeight - for setting, getTextSize - for getting size of text. I think itsn't the best solution and I'm not sure in using this deprececeted(obsolete in mygui) methods.