[AD] another gui patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Hello and welcome to another set of GUI patches...

First I've got a patch for the objects drawing. The w and h fields in the
dialog struct should describe the size of the dialog object. My opinion is,
they don't. For example, the d_box_proc. Imagine a box at coordinates x=0,y=0
with size w=20,y=20. This box should be drawn from x-coordinates 0 to 19 (size
is 20 points) and the same y-coordinates. But d_box_proc draws a box from
x=0 to x=20 and from y=0 to y=20 (that is 21 points large) I know, it is
ONLY 1 point, but shouldn't the size be processed correctly ? (BTW the
function which determines what dialog object has got the mouse focus, 
deals with the correct size...)

After a bit of testing, the following d_..._procs aren't drawn correctly:
 d_box_proc, d_shadow_box_proc, d_button_proc, d_check_proc, d_radio_proc,
 d_list_proc, d_text_list_proc and d_textbox_proc.
 (there are also some other problems with the textbox - see below...)

I attached a diff which corrects this (of course I modified _ALL_ dialogs in
Allegro sources to look exactly like the old ones) (really all - what a job!!!) 

---------

The next thing is, I slightly modified the d_textbox_proc, because sometimes
it doesn't print all characters into the line - the wordwrapping is not
always correct. The problem appeared when there was a word with the
width greater than the textbox - and the last character of the line wasn't
printed. This is now fixed.

In the diff there also is a small modification of KEY_PGUP and KEY_PGDOWN
catches by the d_list_proc, d_text_list_proc and d_textbox_proc. When the 
list's height is such small so there is only one line of text, PGUP and PGDOWN
now do what they should do and what they didn't do (scrolling through the
list) in such cases.

When the list is very large and the height of the list small, the scrollbar
is overdrawn (it has the size 0) by another rectfill. After my modification
it will always have the size greater or equal to 1 point, so there will
be no invisible scrollbar in such cases.

---------

Well, that's it for now... I hope these patches will become part of the
next WIP, because I'm programming my Allegro Dialog Editor with these
things fixed (actually, I found all these 'bugs' when testing the editor)
Guys, please don't disappoint me :-), because I have no sources backup :-)
(not everything fits onto my 240MB HDD :-) (BTW the final version of my
Allegro Dialog Editor with many many improvements will be completed before
end of year (I hope to release it in september, maybe october 2000)

---------

P.S.: In the attachment there are two files :
        - gui1.diff     - includes patch described in this mail.
        - gui2.diff     - changes of dialogs due to modifications of
                          dialog objects drawing (apply only after gui1.diff !)

P.P.S.: ALL PATCHES ARE TO APPLY AGAINST THE UNMODIFIED WIP 3.9.32 !!!

P.P.P.S.: All patches are in one file, because I think they are all useful and
          have all the chance to be accepted. I'm sorry to post patches against
          the `old' Allegro WIP 3.9.32 version, but I don't have access to CVS
          from where I'm writing this (an Internet Cafe) but I promise as soon
          as the next school year begins I will get some software for working
          with CVS...

-- 
------------------------------------------------------------------------------
Mail: pavlovic@xxxxxxxxxx
WEB : http://redbull.dcs.fmph.uniba.sk/~pavlovic
------------------------------------------------------------------------------

Attachment: gui.zip
Description: Zip compressed data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/