[SOLVED] Console's inputbox text position problem

Letschki

20-01-2010 12:31:39

Hello,

I have a small problem using the Console widget with a custom font and skin. The problem is that the text in the console's InputBox is displayed not in the middle of the input area. I had a similar problem with the TextBox widget. I solved the problem using the
textbox_textPosition member of TextBoxDesc during creation (of a derived class).

Is my Textbox solution the correct way to solve this? And how do I apply this to the console widget?

I am using Ogre 1.6.4 and QuickGUI 9.10.

My .fontdef:

DejaVuSansMono.12
{
type truetype
source DejaVuSansMono.ttf
size 12
resolution 72
}


The .skinTypes entries:

Console default
{
SkinElement background
{
Border_Bottom 6
Border_Left 7
Border_Right 7
Border_Top 6
Texture gui.console.png
TileBackground true
TileBorders false
}

SkinReference textbox
{
ClassName TextBox
SkinType default
}

SkinReference textarea
{
ClassName TextArea
SkinType default
}
}

TextBox default
{
SkinElement background
{
Border_Bottom 4
Border_Left 4
Border_Right 4
Border_Top 4
Texture gui.console_textbox.png
TileBackground false
TileBorders true
}

SkinElement textoverlay
{
}
}

Thanks in advance!

Picture of the described problem (attachment):

kungfoomasta

21-01-2010 21:28:12

Sorry for late response. The fastest way to fix that problem is to modify the skin definition, increase the thickness of the top border within the TextBox Skin Definition. I believe the TextBox has a padding property, I'll have to look at it when I get time. (Even if there was a padding property, it might not be accessible from the Console class interface.)

Letschki

21-01-2010 21:57:48

Thanks, problem solved :)

I only searched for a solution in my code and not in the skin definition :( After altering the .skinDef file everything looks fine :)

Thanks for the support and the great library!!!