
-----------------------------------
MrHat
Sat Oct 29, 2005 4:55 pm

Help with cursor animation
-----------------------------------
I am making a simple reflex testing program and i would like to make my cursor disappear and in its place a cross hair appear. I know how to make the cursor dissapear but i dont know how to put a cursor in its place. I don't know if this affects anything but i am using an earlier version of Turing (3.1.1a) If you have any ideas at all they would be greatly appreciated. Thanks.

-----------------------------------
[Gandalf]
Sat Oct 29, 2005 5:13 pm


-----------------------------------
You know how to make the 'arrow' cursor disappear?  From Turing?  I didn't know that was possible, how did you do it?

To put something in it's place, why not draw something at mouse.x, mouse.y?

This reminds me of a target practice program I made, I may post it if I can find it :lol:

-----------------------------------
Cervantes
Sat Oct 29, 2005 6:14 pm


-----------------------------------
Check out Mouse.Where.  There's the help file, or there's the compsci.ca tutorial, found via the Turing Walkthrough, found in the Turing tutorials section.

Don't forget to put a delay in your loop, or things will appear very slow.  Sort of contradictory, eh?

-----------------------------------
MrHat
Sun Oct 30, 2005 10:58 am


-----------------------------------
lmao just yesterday i looked at the mousewhere code and never thought of it that way. BTW i believe the code for getting rid of a cursor, at least in 3.1.1a is 
setscreen("nocursor")

or at least something similar to that

-----------------------------------
Cervantes
Sun Oct 30, 2005 11:13 am


-----------------------------------
In the newer versions of Turing, setscreen ("nocursor") gets rid of the blinking cursor present in things like get.  Mind you, in previous versions you could do things like fullscreen (or so I hear), that you can't do in the newer versions.

-----------------------------------
MysticVegeta
Sun Oct 30, 2005 12:24 pm


-----------------------------------
seriously? we could do fullscreen in old versions? i wonder why they removed it then..

-----------------------------------
blaster009
Sun Oct 30, 2005 3:09 pm


-----------------------------------
Probably because older versions were DOS-based.

-----------------------------------
beard0
Sun Oct 30, 2005 4:04 pm


-----------------------------------
Probably because older versions were DOS-based.

Exactly.  Full screen was all you could do.

-----------------------------------
[Gandalf]
Sun Oct 30, 2005 5:51 pm


-----------------------------------
Probably because older versions were DOS-based.

Exactly.  Full screen was all you could do.
Nope.  (Well, as long as no graphics were involved).

-----------------------------------
beard0
Sun Oct 30, 2005 8:25 pm


-----------------------------------
Errr....  So yeah, you can run it in a DOS window under windows, but that's really just a DOS emulation.  To note:  If you change the background coulour of your Command Prompt window, running your program causes a large section (maxcol X maxrow) to go black.  It is a fullscreen program, being run in an emulation window.

-----------------------------------
RedRogueXIII
Sat Nov 05, 2005 1:54 pm


-----------------------------------

var mx,my,mb:int
drawfillbox(0,0,maxx,maxy,black)

loop
mousewhere(mx,my,mb)
drawfillbox(0,my+1,mx-1,maxy,black)
drawfillbox(0,0,mx-1,my-1,black)
drawfillbox(mx+1,my+1,maxx,maxy,black)
drawfillbox(mx+1,0,maxx,my-1,black)
drawline(mx-30,my,mx-20,my,black)
drawline(mx+20,my,mx+30,my,black)
drawline(mx,my+30,mx,my+20,black)
drawline(mx,my-20,mx,my-30,black)

drawline(mx,my-20,mx,my+20,green)
drawline(mx-20,my,mx+20,my,green)
drawfilloval(mx,my,5,5,black)
end loop


this should work, except you'd have to change how the background refreshs itself. ....

-----------------------------------
Cervantes
Sat Nov 05, 2005 6:22 pm


-----------------------------------
Why so much drawing?  Methinks you should check out View.Update.


setscreen ("offscreenonly")
colourback (black)
var mx, my, mb : int


loop
    mousewhere (mx, my, mb)

    cls
    drawline (mx + 5, my, mx + 20, my, green)
    drawline (mx - 5, my, mx - 20, my, green)
    drawline (mx, my + 5, mx, my + 20, green)
    drawline (mx, my - 5, mx, my - 20, green)
    View.Update
    delay (10)
    
end loop


-----------------------------------
Albrecd
Fri Nov 11, 2005 10:28 am


-----------------------------------
How did you make the mouse dissapear?

-----------------------------------
do_pete
Fri Nov 11, 2005 12:02 pm


-----------------------------------
he didn't

-----------------------------------
The_Triangle
Thu Nov 24, 2005 5:57 am


-----------------------------------
he didn't

lol. anyone know how to make the dissapear?

-----------------------------------
The_Triangle
Thu Nov 24, 2005 5:58 am


-----------------------------------
I meant to say how to make the mouse dissappear, dont blame me for double posting here.. somehow the edit button wasnt there :S ?

-----------------------------------
do_pete
Thu Nov 24, 2005 1:05 pm


-----------------------------------
as far as I know, it's impossible
