forums

TNT Basic Forums > Bugs!
Hide Mouse
< Last Thread     Next Thread >
Author
Thread        Post A Reply

04-08-2009 07:07

Posted by:
Maxime

Location:
Paris France

Find more posts by Maxime

Hello
Seems that instruction Hide Mouse does not operate until you release the mouse button.

This makes "moving an object with mouse" not satisfactory for my aim : the mouse cursor stays apparent and never hides.

Am I wrong, or is there a way to circumvent that ?
Thanks

04-08-2009 17:15

Posted by:
swagIT

Location:
Great Wet North (Vancouver)

Find more posts by swagIT

Maxime - I tried and couldn't get it to work either.

There is a work around though.

If you hide the mouse to begin with and make a sprite that looks like a mouse pointer and use this as your 'mouse pointer' you can then turn off your sprite when the mouse is down. I used the following code - you just need to add a graphic at position '000' in 'image bank 128' to test it......

hope that makes sense?

cheers

barry

'========================
window mode 400,400
load images 128

hide mouse

repeat

repeat
sprite 001,mouse x, mouse y ,000
draw frame
until mouse button

while mouse button = true
sprite off
draw frame
wend

repeat
sprite 001,mouse x, mouse y ,000
draw frame
until mouse button

forever
'===========================

04-08-2009 20:54

Posted by:
swagIT

Location:
Great Wet North (Vancouver)

Find more posts by swagIT

OOPS - i didn't need that extra function:

This works and it is shorter and cleaner.....

'========================
window mode 400,400
load images 128

hide mouse

repeat

repeat
sprite 001,mouse x, mouse y ,000
draw frame
until mouse button

while mouse button = true
sprite off
draw frame
wend

forever
'===========================

04-09-2009 20:35

Posted by:
Maxime

Location:
Paris France

Find more posts by Maxime

Good tgea, swagIt.
I am happy first because you find same problem, am not so stupid (sometimes I ask myself...) ! Good idea, yours. Seems reasonable and should work. I will try that next week (I leave for a long week-end...)
Thank you

04-09-2009 20:43

Posted by:
swagIT

Location:
Great Wet North (Vancouver)

Find more posts by swagIT

Have a great weekend!

05-13-2009 07:48

Posted by:
Maxime

Location:
Paris France

Find more posts by Maxime

Hide mouse, following

For info and future (?) implementation : I found that the problem does not exist in graphics mode, only in window mode !

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.