Page 1 of 1

help me on GUI question, please!

Posted: Wed Nov 29, 2006 6:54 am
by digo_rp
guis I would like to understand how to do it...

I´m trying to create a gui interface to my o.s. digo´s.

I got ps2mouse working very simple

how do I can click on button " test" for example ?

right now I got a loop
exit=false;
while (!exit) do {
if mouse.button(1) and mouse.x >... and mouse.x < ...
{
mouse_hide();
button(x,y,x2,y2, press);
delay_ms(20);
button(x,y,x2,y2, not_press);
mouse_show();
}
}

with this simple example, when you click on that button test the mouse disapper "hide " and then it shows. I saw in so many example on internet
that when user click on button, the mouse doesn´t hide. looks like windows / linux.... how do I to that ? could anyone give some help ?
please

Posted: Wed Nov 29, 2006 8:12 am
by Combuster
Generally, the mouse only needs to be hidden during drawing operations. Hiding it during wait states indeed cause it to disappear from the screen

A better sequence would be:

Code: Select all

mouse_hide();
button_down();
mouse_show();
delay();       // maybe wait until the button is released?
mouse_hide();
button_up();
mouse_show();