GLBasic forum

Codesnippets => DD-GUI => Topic started by: Moru on 2008-May-04

Title: DDgui fix
Post by: Moru on 2008-May-04
I'm trying to change the DDgui functions to work with DRAWRECT instead of FILLRECT. The irritating part is that DRAWRECT is using the width and height of the box instead of the actual coordinates of the endpoint. Trying to figure it all out wasn't as easy as I thought because the original author had to go afew hoops around to get it working with exact coordinates so I'm having a hard time thinking it back  :)

I do like the new DRAWRECT using the width and height but wouldn't it be easier to have left in the FILLRECT command for backwards compatibility?  :)

It would be nice with proportional fonts on this one, don't you think?  ::)

Download: Second attempt (http://gamecorner.110mb.com/code.php) worked a bit better :-)
Most things working except the placement of the cursor and selecting in text-boxes but you can still enter text.
Title: Re: DDgui fix
Post by: Kitty Hello on 2008-May-05
Isn't DDgui updated? Here's the latest version:

[attachment deleted by admin]
Title: Re: DDgui fix
Post by: Moru on 2008-May-05
No it wasn't and it has been annoying me for a while now. I guess I should ask first... a few other bugs was fixed too so now I can skip those but there is a few things still strange with the coordinates of boxes
Title: Re: DDgui fix
Post by: Moru on 2008-Aug-19
Ok, updated the file, now you can use linebreaks too. Just enter \n in the string and you get a linebreak
Title: Re: DDgui fix
Post by: Kitty Hello on 2008-Aug-19
See my code for DDgui_handle_text (or so), which can use the enter key for inserting "\n" automatically.
Title: Re: DDgui fix
Post by: Moru on 2008-Aug-19
Quote from: Kitty Hello on 2008-Aug-19
See my code for DDgui_handle_text (or so), which can use the enter key for inserting "\n" automatically.

It works already, I was just not done with the display routine to use \n for new line, it was just ignored. But now it works.
Title: Re: DDgui fix
Post by: Moru on 2008-Aug-21
Updated with the new bitmap routines, use chr$(_ITALIC_ON) for italic and chr$(_BOLD_ON) for bold, for the rest, see the example in bitmap fonts (http://www.glbasic.com/forum/index.php?topic=2223.0)
Title: Re: DDgui fix
Post by: Kitty Hello on 2008-Aug-21
Oh! That's one excellent idea!
Title: Re: DDgui fix
Post by: Moru on 2008-Aug-21
Took me a few to figure that I can remove those artifacts from the smothing so now it's possible with italic :-)