Author Topic: DDgui fix  (Read 9138 times)

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1774
    • View Profile
    • Homepage
DDgui fix
« 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 worked a bit better :-)
Most things working except the placement of the cursor and selecting in text-boxes but you can still enter text.
« Last Edit: 2008-Aug-19 by Moru »

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10708
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: DDgui fix
« Reply #1 on: 2008-May-05 »
Isn't DDgui updated? Here's the latest version:

[attachment deleted by admin]

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1774
    • View Profile
    • Homepage
Re: DDgui fix
« Reply #2 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

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1774
    • View Profile
    • Homepage
Re: DDgui fix
« Reply #3 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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10708
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: DDgui fix
« Reply #4 on: 2008-Aug-19 »
See my code for DDgui_handle_text (or so), which can use the enter key for inserting "\n" automatically.

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1774
    • View Profile
    • Homepage
Re: DDgui fix
« Reply #5 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.

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1774
    • View Profile
    • Homepage
Re: DDgui fix
« Reply #6 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

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10708
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: DDgui fix
« Reply #7 on: 2008-Aug-21 »
Oh! That's one excellent idea!

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1774
    • View Profile
    • Homepage
Re: DDgui fix
« Reply #8 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 :-)