Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (213)
games submitted by our members
Games in WIP (785)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Mouse Pointer  (Read 1404 times)
0 Members and 1 Guest are viewing this topic.
Offline Grand Poeba

Junior Devvie

« Posted 2006-01-05 23:36:58 »

Hey ive been searching the net for quite some time but i didnt find an answer so let me ask it here
is there a way to set the cursor size?

I have craeted a custom cursor by using the toolkit but it resizes my image because it is to big (62x36 pix)
But i want it to be full scale the image used as pointer so how can i do this?

Offline jbanes

JGO Coder

Projects: 1

"Java Games? Incredible! Mr. Incredible, that is!"

« Reply #1 - Posted 2006-01-06 02:44:58 »

Cursors are very OS specific things. In many operating systems they're automatically overlayed onto the VGA signal by the video card. This causes the pointer to be restricted in its size. Windows, IIRC, uses a 32x32px cursor. Your cursor size needs to match that. If it's of a different size, I believe the OS will automatically stretch it. I don't know what size you need for Mac OS X, but I do know that it's a bit finicky about custom cursors.

So in short? No.

Java Game Console Project
Last Journal Entry: 12/17/04
Offline woogley
« Reply #2 - Posted 2006-01-06 03:00:45 »

you can just hide the cursor (set the cursor to a transparent BufferedImage) and then have your custom image move with the mouse's coordinates ..
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Grand Poeba

Junior Devvie

« Reply #3 - Posted 2006-01-06 10:44:10 »

you can just hide the cursor (set the cursor to a transparent BufferedImage) and then have your custom image move with the mouse's coordinates ..

any idea how? with an extra internal frame ? (i work with desktoppane and internalframes)
Offline Jeff

JGO Coder

Got any cats?

« Reply #4 - Posted 2006-01-06 19:23:21 »

The cursor size is set by the hardware/OS. 

As others say, the only way around this is to take over drawing the cursor as part of your game rendering. This means taking control of ALL rendering in your app's window, so forget about Swing components.

(Actually you can TRY to use Swing components with active rendering by turning their automatic rendering off and manually calling their paint() methods as appropriate but thats a whole lot of work to get right and may never do quite what you want.  I've had only minimal success doing this myself and with display's a lot less compelx thne it sounds like yours is.)

Since this sounds like very much a Swing GUI app I'd say either:
(a) Reset cursor size from your OS if it and your hardware allow it  (and no I cant tel lyou how to do that you'll have to go looking through your particular OS's control panels.)

(b) Give it up as a bad job.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!
Offline swpalmer

JGO Coder

Exp: 12 years

Where's the Kaboom?

« Reply #5 - Posted 2006-01-06 19:43:45 »

Try using the "GlassPane" if you do use Swing.

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

numerical (278 views)
2017-02-21 07:32:16

numerical (276 views)
2017-02-21 07:31:46

theagentd (388 views)
2017-02-18 13:42:33

theagentd (387 views)
2017-02-18 13:35:16

h.pernpeintner (1554 views)
2017-01-24 22:39:11

h.pernpeintner (1541 views)
2017-01-24 22:38:32

Galdo (2106 views)
2017-01-12 13:44:09

Archive (2106 views)
2017-01-02 05:31:41

0AndrewShepherd0 (2642 views)
2016-12-16 03:58:39

0AndrewShepherd0 (2348 views)
2016-12-15 21:50:57
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!