GLBasic forum

Main forum => GLBasic - en => Topic started by: mahan on 2010-Apr-23

Title: Hi and DDgui_text() - questions
Post by: mahan on 2010-Apr-23
I'm new to both GLBasic and this forum, so first of all:

Hi guys and gals!


Ok, so i got questions about DDgui which I couldn't find answers to, through searching:

My test source:

Code (glbasic) Select
DDgui_init()
DDgui_UpdateFont(FALSE)
dlg=DDgui_pushdialog(100, 100, 200, 100)
DDgui_text(dlg, "test", 100, 20)
WHILE 1
DDgui_show(FALSE)
SHOWSCREEN
WEND


Questions:
1.) How can I force the DDgui_text() to be "single line" input i.e. no line breaks and word wrapping? Or am I using wrong widget for this?
(I'm trying to make a user-name input)

2.) Why is the default font "outlined"? Is this "kerning"? b) how do I disable the outline?

Best regards,
/Mahan
Title: Re: Hi and DDgui_text() - questions
Post by: Moru on 2010-Apr-24
Not sure about #1

#2, you need to set your own font. Look in the Tools menu, Font Creator. There you can create whatever font you want to use. Kerning is what your normal fonts do, wide letters take more space than thin letters, compare "w" and "i". Kerning moves them together so it looks like normal text. Easier to read. If you don't use kerning, it will look like this:

wiwiwiwi  <--- no kerning
wiwiwiwi   <--- kerning

As you can see, it takes less space
Title: Re: Hi and DDgui_text() - questions
Post by: mahan on 2010-Apr-24
Thank you for the reply. I made a dark gray font on black background since DDgui uses light colors (at least in my program) and it looks nice.  :good:
And thanks for the kerning explanation also. I knew the font thing as "variable width font" versus "mono spaced" but now i learned a new word  :)
Title: Re: Hi and DDgui_text() - questions
Post by: Kitty Hello on 2010-Apr-26
The kerning can be enabled with DDgui_updateFont or so... It takes a second on the iPhone, so be sure to display a waiting message.