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
help me on GUI question, please!
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
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:
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();