[AD] GUI - d_ctext_proc, file_select_ex, gui_textout_ex |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Here's a couple more issues I noticed while trying to create my GUI (now with
a single dialog on screen at once, taking up the whole screen).
d_ctext_proc() is not properly redrawn when it is told to redraw (MSG_DRAW or
if another object returns D_REDRAW) when the mouse pointer is over it. This
is caused by the text using the horizontal origin point as the center
location, yet the scare_mouse_area() code (kludge to reduce mouse pointer flicker?)
relies on the entire viewable area of the object to be >= the horizontal origin;
so text drawn to the left of the origin point is not properly handled.
file_select_ex() uses a similar function that has the same problem.
Additionally, I was attempting to wrap d_text_proc() to automatically set the
display size of the object on MSG_START to save me some hassle; in doing so,
I realized that gui_textout_ex() is the only way to get the correct length for
a d_text_proc(); and that it does not support non-default FONTs, even though
d_text_proc() does. It requires a kludge to swap the non-default font in as
default, do the call, and then swap it back. d_text_proc() uses the same sort
of code to do the drawing.
I believe there was another issue, but I can't recall it at the moment.
More later,
Charles Bilyué