Changing font on a textbox control (1 Viewer)

tomhlpc

Portal Member
July 29, 2011
8
0
Home Country
I'm developing a plugin that has a textbox control. In my plugin skin I am specifying <font>font18</font> for the control, but it displays font13, which seems to be the default. This is confirmed by code in my plugin that displays the FontName of the control. I'm using the Blue3wide skin and placing my skin there. I've tried various fonts and am removing the fonts folder in the cache every time, but to no avail.

The only way I can get the font to change is by changing the attributes of font13 in fonts.xml.

Anyone know why changing the <font> attribute in my skin is not working?

Here's the XML:

<control>
<description>menu text</description>
<type>textbox</type>
<id>6</id>
<font>font18</font>
<posX>125</posX>
<posY>65</posY>
<width>1030</width>
<height>600</height>
<spinWidth>16</spinWidth>
<spinHeight>16</spinHeight>
<spinPosX>610</spinPosX>
<spinPosY>530</spinPosY>
<spinColor>ffffffff</spinColor>
<textureUp>page_up_nofocus.png</textureUp>
<textureDown>page_down_nofocus.png</textureDown>
<textureUpFocus>page_up_focus.png</textureUpFocus>
<textureDownFocus>page_down_focus.png</textureDownFocus>
<image>icon-folder.png</image>
<font>font13</font>
<textcolor>ffffffff</textcolor>
<textalign>left</textalign>
<label>#plot</label>
</control>

and this is the definition of the control in my code:

[SkinControlAttribute(6)]
protected GUITextControl menuText = null;
 

SilentException

Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    font name is defined in fonts.xml

    If font18 isn't defined there, default is used.

    Define your font, name it and use that name in the control.
     

    tomhlpc

    Portal Member
    July 29, 2011
    8
    0
    Home Country
    As I said, I've tried various fonts, all of which exist in fonts.xml.

    If I use font18 in a button control, it works fine. It's just the textbox control that's not working.

    Perhaps it's a bug with the textbox control.
     

    Users who are viewing this thread

    Top Bottom