Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / 'Custom Mouse' Snippet

Author
Message
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 11th Feb 2003 23:00
OK, its been driving me crazy lately, everyone has been asking how I make my own custom cursor. Well, in a matter of fact, its VERY EASY!! I will walk you through this step by step (yes, I am in fact very bored )

STEP ONE:

Grab your fav. paint program (Photoshop, PaintShop, MS-Paint WHATEVER!!) and just make yourself a black square. In the middle of that square, draw yourself whatever you want for a cursor. When you are done, save it as a .bmp in the same directory as your code, and call it "mycursor".

STEP TWO:

Open up your fav. db editor (pro, edit, reg etc.) and insert this code:



and for those of you with netscape....

load image "mycursor.bmp",1
hide mouse

do
cls
sprite 1,mousex(),mousey(),1
set sprite 1,1,1
loop

And there ya have it. I dont have DB on this computer, and I just made a total fool of myself it that code dont work (which it should...)

Hope that helps all yall with this question,
Now, no more excuses for asking how to do this!!

Later!
RPGamer
Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
razorblade
21
Years of Service
User Offline
Joined: 10th Feb 2003
Location:
Posted: 11th Feb 2003 23:04
it don't work.....................not and im the latest one to ask for the curser i really am a noob....

John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 11th Feb 2003 23:10
It doesnt work? Did you make yourself the cursor and stuff? Put it in the same directory as your code? What goes wrong!

I directed it for all people who need this. There has just been a very, very high demand for it lately

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Sly D
22
Years of Service
User Offline
Joined: 15th Oct 2002
Location:
Posted: 11th Feb 2003 23:22
Well it should work this is the code i used for my menu:

1.First Step is the same

2.

sync on
hide mouse

load bitmap "cursor.bmp",1
get image 1,0,0,17,17
delete bitmap 1

do
sprite 1,mousex(),mousey(),1
sync
loop

It works fine with me and is fast as the standard mouse curosr. I am bored too
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 12th Feb 2003 02:12
Both ways do the same thing Mines just shorter To increase your speed yank out the loading crap and pop it above the sync

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
The Lone Programmer
21
Years of Service
User Offline
Joined: 29th Jan 2003
Location: California, USA
Posted: 14th Feb 2003 03:33
For my curser. I have a part oof my game that I dont want to have a mouse. But I have another part where I do. I know howw to hide the mouse, but how do I bring it back when I want.

Please supply the code to bring the original arrow mouse back after it is gone.

Thanks
SmokieMcPot

Future Company Name = Blazing Fire
Current Website Name = Blazing Fire
Future Number is Eleventy
Pyre
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: France
Posted: 14th Feb 2003 11:32
hum....... If it's the real mouse : "hide mouse"-->"show mouse".....
If it's RPGamer mouse (a sprite) : "hide sprite 1"-->show sprite 1"......
But I advise you to use "paste image" instead of "sprite"... much faster, especially when you have a menu...


Killer Sponge
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United Kingdom
Posted: 14th Feb 2003 12:43
WAHEY SOMEONE ELSE USES PASTE IMAGE RATHER THAN SPRITE

im happy now

(i thought i was the only one)

Current Project: Sky Bird (Galaga Remake for Retro Comp)
Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 14th Feb 2003 20:02
what about CHANGE MOUSE:

sync on
CHANGE MOUSE 1
do
sync
loop

u can have upto 30 custom cursors(*.cur) u just gotta include 'em in ya exe.
theres lots of em in windows\cursors - or u could make ya own with an art prog that supports *.cur
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 15th Feb 2003 02:44
I have regular DB

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 15th Feb 2003 12:52
oh
CaiF_R
21
Years of Service
User Offline
Joined: 25th Jan 2003
Location:
Posted: 14th Mar 2003 00:48
I was gonna post an example ident to the one Pyro did and imo its the best solution (if you have DBC that is)

and remember that the actual cursor is only 1 pixel and is in the upper left corner of the image (also in windows) so you shoulnt paint you cursor in the middle of the image but with the pointing bit up in the corner... Or if you have DBPRO use the OFFSET SPRITE command but then again that would be a waste of time

Cheers

Login to post a reply

Server time is: 2024-11-24 05:07:30
Your offset time is: 2024-11-24 05:07:30