Jump to content


Photo

Gmmouseext.dll (new)


  • Please log in to reply
20 replies to this topic

#1 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 09 May 2008 - 11:10 AM

cursor_sprite let you down? Your nice mouse cursor if screwed because your game is scaled up or down?

Stop using hacked up solutions for mouse cursors and start using real .cur or .ani cursors

GM6.gifGM7.gif Updated June-13-2008 3:20 AM

STUDIO VERSION: https://drive.google...eHdjWUVjUFE3R3M(animated cursors dont work in studio though)


link.png
http://host-a.net/ic.../GMMouseExt.zip

The dll allows to load up a .cur or .ani file and set the mouse pointer to a nice cursor that WILL NOT get fudge up by GM.

I also added mouse clip region (sorry daniel).

Along with GM's standard mouse functions, this takes care of all of the mouse features used in windows.

The merge file has the dll functions definition, and 2 useful helper objects for controlling the mouse.

Included are helper scripts to make it all easier on you. Some scripts depend on the included helper object MouseCursorObj

MouseCursorObj is a persistent object in charge of changing the mouse and loading/holding the cursors.

ClipGameCursorObj is a non persistent object that clips the mouse to the game region.


It’s simple to use. Just drop MouseCursorObj in your first room, add your code to load the cursors in the game start event and free in the game end event and start using real cursors.

GMMEChangeCursor(MouseCursorObj.MyCursorVariable)

…to change the cursor…

The demo does this in a hidden way because I change the cursor when you hover over the button and then change the cursor when you click it… And it becomes active when you hover out of the button. It’s never gonna be that complicated for you guys.


You are going to need a 3rd party cursor editor software. The system does not load any image.

UPDATE
Added GMMEReleaseCapture()

BTW if you don't want to use the DLL for cursors, the GM code to use and scale an image for a cursor when using a scaled view (view 0 in the case) is as follows


x = mouse_x;
y = mouse_y;
image_xscale = view_wview[0]/view_wport[0]
image_yscale = view_hview[0]/view_hport[0]

Edited by icuurd12b42, 23 July 2015 - 10:24 AM.

  • 2

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#2 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 09 May 2008 - 11:31 AM

Will the cursor be set back to default once the game is closed? If not then I suggest you do that. I want to know this so I don't have to change back :S

I will test as I get info.
  • 0

#3 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 09 May 2008 - 11:32 AM

Will the cursor be set back to default once the game is closed? If not then I suggest you do that. I want to know this so I don't have to change back :S

I will test as I get info.



Why don't you try and see!??
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#4 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 09 May 2008 - 11:42 AM

I don't have time to set it back >_> (If it doesn't set it back of coarse)
  • 0

#5 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 09 May 2008 - 06:38 PM

I don't have time to set it back >_> (If it doesn't set it back of coarse)


If you dont have time to download it and try then you don't have time to use the DLL. Good luck.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#6 Caniac

Caniac

    The #1 Caniac

  • New Member
  • 2622 posts

Posted 09 May 2008 - 06:44 PM

does it work outside the game window too?

and,

if the computer changes to the "wait cursor, does it mess up the gm one?


looks nice...

Edited by Caniac, 09 May 2008 - 06:45 PM.

  • 0

#7 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 09 May 2008 - 07:05 PM

does it work outside the game window too?

and,

if the computer changes to the "wait cursor, does it mess up the gm one?


looks nice...


You can only change the cursor in the current application; GM's game window.

As long as you are using a standard cr_whatever then GM handles it so it uses the cursor set you specified in the control pannel. Then you would not need my dll would you...


The supplied MouseControllerObj switches between my function and GM's for seemless support of both GM's cr_wathever and mine (cursorhandle). It's actually better to have a mouse controller changing the mouse than having 5 different objects fighting to set their own cursor.

Edited by icuurd12b42, 09 May 2008 - 07:07 PM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#8 Ka1miK

Ka1miK

    GMC Member

  • New Member
  • 3 posts

Posted 17 May 2008 - 03:26 PM

Check your Game Information in "GMMouseExtMergefile.gm6", I think something wrong...
But Dll is very usefull!
  • 0

#9 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 17 May 2008 - 09:25 PM

Check your Game Information in "GMMouseExtMergefile.gm6", I think something wrong...
But Dll is very usefull!



Arrgh. that's what happens when you work with many GM Projects window opened at the same time...

I fixed it.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#10 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 13 June 2008 - 07:37 AM

Added GMMEReleaseCapture();
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#11 newbie013

newbie013

    GMC Member

  • GMC Member
  • 96 posts
  • Version:GM8

Posted 04 November 2008 - 07:58 PM

it doesn't work, i see 1 second the cursor (the cursor set with your dll) and then it dissapears.
  • 0

#12 Guest_Proud_*

Guest_Proud_*
  • Guests

Posted 04 November 2008 - 10:09 PM

it doesn't work, i see 1 second the cursor (the cursor set with your dll) and then it dissapears.

Pls fix it.

#13 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 04 November 2008 - 10:14 PM

it doesn't work, i see 1 second the cursor (the cursor set with your dll) and then it dissapears.



it doesn't work, i see 1 second the cursor (the cursor set with your dll) and then it dissapears.

Pls fix it.



You guys mean the demo does not work on your computer?
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#14 newbie013

newbie013

    GMC Member

  • GMC Member
  • 96 posts
  • Version:GM8

Posted 07 November 2008 - 04:27 PM

yes

gm6 on windows xp with service pack 3
  • 0

#15 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 08 November 2008 - 01:56 AM

yes

gm6 on windows xp with service pack 3



Shoot. I would need someone with gm6 and XP to figure it out.

//game start
LoadGMME();
global.cursor = GMMELoadCursor("Cursors\1.ani")
and
GMMESetCursor(global.cursor)
in the step or begin step or end step... Try all the steps, even the draw even.
...in a controller object of your own.

try with the game global setting set to no mouse and then try it set with mouse. I'm sure it's a matter of finding the right order.

Edited by icuurd12b42, 08 November 2008 - 01:57 AM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#16 Kolink

Kolink

    Almighty Shinx

  • GMC Member
  • 2351 posts

Posted 06 October 2010 - 11:08 AM

Tried it, it works, but wtf is up with the animations? They're all jumpy, never smooth...
  • 0

Posted Image


#17 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 06 October 2010 - 04:00 PM

Tried it, it works, but wtf is up with the animations? They're all jumpy, never smooth...


Dont know, what problem you are having; I just load the animated cursor, I dont do anything else... Is the demo jumpy?
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#18 Dimbata__

Dimbata__

    GMC Member

  • GMC Member
  • 91 posts
  • Version:GM:Studio

Posted 01 July 2014 - 09:23 AM

Does the DLL still work?
If yes then maybe fix the link?>


  • 0

A +1 is really apriciated!  :thumbsup:


#19 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 01 July 2014 - 10:13 AM

host-a may be down... I am also having trouble with parts of the internet... maybe the dns databases are resetting
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#20 Imtnt

Imtnt

    GMC Member

  • GMC Member
  • 64 posts
  • Version:GM:Studio

Posted 14 May 2015 - 06:16 AM

You are my hero


  • 0

#21 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 14 May 2015 - 06:43 AM

You are my hero

For studio, you're going to have to re-define the external calls... swapping dll_stdcall with dll_cdecl .
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button