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.

Newcomers DBPro Corner / cursor shape

Author
Message
jayell
21
Years of Service
User Offline
Joined: 29th Dec 2002
Location:
Posted: 9th Jan 2003 00:52
Can anyone out there tell me how to change the shape of the cursor (normally a pointer). After making buttons, I would like the cursor to change to a hand as it goes over a button.
Cheers
JAYELL
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 9th Jan 2003 01:03
You would need to write a code for if the mouse if over a certain area, then delete your usual sprite and position a new sprite at the mouse coordinates. Else, your regular sprite at the mouse coords.

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
jayell
21
Years of Service
User Offline
Joined: 29th Dec 2002
Location:
Posted: 12th Jan 2003 14:02
Thanks - don't understand tho'. I can delete my usual sprite when the mouse cursor is over it, but what pic goes in its place? If I put it at the mouse coords, the new pic will not be at the old pic coords. Surely, the pic would have to change everytime the mouse moved to a diff pos over the original sprite area??

hexGEAR
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 12th Jan 2003 15:16
you know what, create one sprite an load two different images, declare a variable say "position", so when the mouse is over one point set position = 1 and over another point position = 2. then:

if position = 1 then sprite 1,mousex(),mousey(),image 1
if position = 2 then sprite 1,mousex(),mousey(),image 2

i think that should work, not tried it though!

your birth was a blessing, sent to live and die on earth as a lesson, we each have a star all you have to do is find it, once you do, everyone who sees it will be blinded - DMX
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 12th Jan 2003 16:01
Ok, here ya go.

You have your regular cursor, an arrow for instance. When the arrow moves over the needed area (your button) then you do this. The current cursor is sprite 1.

do
hide mouse
sprite 1,mousex(),mousey(),1

if (mouse over the area)
delete sprite 1
Sprite 2,mousex,mousey,2
else sprite 1,mousex(),mousey(),1
endif
loop

Hope that helps you,
RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy!
Abobo
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 12th Jan 2003 21:51
I would do it this way.

do
hide mouse
sprite 1,mousex(),mousey(),1

if (mouse over the area)
delete sprite 1
Sprite 1,mousex,mousey,2
else sprite 1,mousex(),mousey(),1
endif

SYNC

loop

the less sprites there are the less likely you are to get confuzed

Ps
you forgot the sync command.
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 13th Jan 2003 18:02
If you're using dbpro, you should be able to do it using images in the cursors section, and the 'change mouse' command (except when I try it the mouse just disappears)
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 13th Jan 2003 20:07
yes change mouse best way - sprites as mouse pointers can be jerky.
You gotta make a cursor in a art prog that supports 'em (*.cur). Then add it to your project, then you can use it like this:



DBP just got pointer and hourglass - but u could add Hand cursor to your project.
Flashing Blade
21
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 13th Jan 2003 20:16
btw - if u wanna find lotsa cursors look in C:\windows\cursors.
But i aint sure about copyright issues if u wAnna distribute your prog.

Login to post a reply

Server time is: 2024-05-17 06:38:46
Your offset time is: 2024-05-17 06:38:46