DDgui fix

Previous topic - Next topic

Moru

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 worked a bit better :-)
Most things working except the placement of the cursor and selecting in text-boxes but you can still enter text.

Kitty Hello

Isn't DDgui updated? Here's the latest version:

[attachment deleted by admin]

Moru

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

Moru

Ok, updated the file, now you can use linebreaks too. Just enter \n in the string and you get a linebreak

Kitty Hello

See my code for DDgui_handle_text (or so), which can use the enter key for inserting "\n" automatically.

Moru

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.

Moru

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

Kitty Hello

Oh! That's one excellent idea!

Moru

Took me a few to figure that I can remove those artifacts from the smothing so now it's possible with italic :-)