Professional Web Applications Themes

How to prevent an invisible mouse cursor from triggering a screensaver? - Mac Programming

I'm programming (CW8.3) a straight-C carbonized game. At the moment, when a user clicks, the game starts and the cursor is hidden. The position of the invisible cursor (mouse position) is then used to control aspects of the game until another mouse click ends the game. But, when the now invisible cursor happens to meander (in my case) to the upper left of the screen, the Mac's screen saver starts up spoiling the game in progress. How do I prevent this? (I seem to remember there being some way to "capture" the screen or "capture" the mouse...not a screen capture, ...

  1. #1

    Default How to prevent an invisible mouse cursor from triggering a screensaver?

    I'm programming (CW8.3) a straight-C carbonized game. At the moment,
    when a user clicks, the game starts and the cursor is hidden. The
    position of the invisible cursor (mouse position) is then used to
    control aspects of the game until another mouse click ends the game.
    But, when the now invisible cursor happens to meander (in my case) to
    the upper left of the screen, the Mac's screen saver starts up spoiling
    the game in progress. How do I prevent this?

    (I seem to remember there being some way to "capture" the screen or
    "capture" the mouse...not a screen capture, per se, but a way of
    telling the Mac...hey the screen is mine, don't start reading the
    position of the mouse as anything of importance to you, I own it...but
    can't remember where to look?)

    Any ideas?

    Thanks!
    Aaron Guest

  2. #2

    Default Re: How to prevent an invisible mouse cursor from triggering a screensaver?

    Perhaps what you can do is have your gave re-center the invisible mouse
    pointer on the window at certain intervals, but take note of it's position
    in relation to the center of the window each time. In other words, do what
    games like Quake and Quake II do under Windows (and a few under Mac OS):
    1) Make the mouse invisible
    2) Center the invisible cursor on the window
    3) For a period of time, allow the user to move the mouse around, to control
    the game
    4) After the period of time, mark the position of the mouse cursor from the
    center of the window, and re-center it

    You would want to mark and re-center rapidly, for two reasons:
    1) If you don't, using the mouse will be sluggish in the game
    2) The longer the time that elapses, the more the chance that the user will
    move the invisible mouse pointer into a corner that triggers the screen
    saver.

    If you re-center quickly enough, the user will never be able to trigger the
    screen saver. Or, at least the user would have to move the mouse VERY VERY
    fast to move to the corner before the mouse was re-centered, and even then,
    the re-centering might kick the screensaver.

    "Aaron" <com> wrote in message
    news:130420041607464841%com... 


    Guy Guest

  3. #3

    Default Re: How to prevent an invisible mouse cursor from triggering a screensaver?

    > 1) Make the mouse invisible 
    control 
    the 

    I meant to add in:
    5) Repeat from step 3


    Guy Guest

  4. #4

    Default Re: How to prevent an invisible mouse cursor from triggering a screensaver?


    Thanks Guy. An interesting idea for sure, I'll surely consider such a
    solution.


    In article <ZI0fc.1061$roc.ny>, Guy Paddock
    <tzo.com> wrote:
     
    > control 
    > the 
    >
    > I meant to add in:
    > 5) Repeat from step 3
    >
    >[/ref]
    Aaron Guest

Similar Threads

  1. Zoom cursor invisible
    By Shade3D in forum Macromedia Freehand
    Replies: 4
    Last Post: June 30th, 07:46 PM
  2. Move mouse cursor to X,Y location and simulate mouse click
    By WZSun in forum Macromedia Director Lingo
    Replies: 1
    Last Post: August 6th, 10:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139