As demonstrated in the test program below, AG_Console will not properly
"auto-scroll" as is documented.
Another demonstrated bug is that the scrollbar's "box" will draw itself
outside of the actual scrollbar.
-----------------------------------------------------------------------
#include <agar/core.h>
#include <agar/gui.h>
static AG_Timeout timeout;
static AG_Console* cons;
static Uint32 cons_timer(void *obj, Uint32 ival, void *arg)
{
static unsigned long int counter;
AG_ConsoleMsg(cons, "%lu", ++counter);
return ival;
}
int main(int argc, char** argv)
{
AG_Window* wnd;
if (AG_InitCore("agar-test", 0) == -1)
return -1;
if (AG_InitVideo(320, 240, 32, AG_VIDEO_BGPOPUPMENU|AG_VIDEO_HWSURFACE)
== -1)
return -1;
wnd = AG_WindowNew(AG_WINDOW_NOBUTTONS|AG_WINDOW_NORESIZE);
AG_WindowSetCaption(wnd, "%s", "Console Test");
cons = AG_ConsoleNew(wnd, AG_CONSOLE_EXPAND);
AG_SetTimeout(&timeout, cons_timer, NULL, 0);
AG_AddTimeout(wnd, &timeout, 500);
AG_WindowSetGeometryAlignedPct(wnd, AG_WINDOW_MC, 75, 75);
AG_WindowShow(wnd);
AG_EventLoop();
return 0;
}
_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html