# Changing Mouse Cursor in Win32 platforms

**URL:** <https://forums.solar2d.com/t/changing-mouse-cursor-in-win32-platforms/354917>\
**Category:** Win32 Desktop\
**Created:** [August 8, 2022, 6:23am UTC](https://forums.solar2d.com/t/changing-mouse-cursor-in-win32-platforms/354917 "2022-08-08T06:23:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aclementerodrguez](https://forums.solar2d.com/user_avatar/forums.solar2d.com/aclementerodrguez/32/263_2.png) [@aclementerodrguez](https://forums.solar2d.com/u/aclementerodrguez)\
**Post date:** [August 8, 2022, 6:23am UTC](https://forums.solar2d.com/t/changing-mouse-cursor-in-win32-platforms/354917/1 "2022-08-08T06:23:23Z")

</div>

I need to customize the cursor in my game for desktop.  
Is there someone who can show me a way to do it, because apparently the Lerg Mouse Cursor plugin is no longer supported.

---

<div class="post-metadata">

**Author:** ![Siu](https://forums.solar2d.com/user_avatar/forums.solar2d.com/siu/32/2129_2.png) [@Siu](https://forums.solar2d.com/u/Siu)\
**Post date:** [August 8, 2022, 6:53am UTC](https://forums.solar2d.com/t/changing-mouse-cursor-in-win32-platforms/354917/2 "2022-08-08T06:53:36Z")

</div>

Only other plugin I know of is:

> **[GitHub - ANSH3LL/plugin\_hwcursor: A hardware cursor plugin for the solar2D...](https://github.com/ANSH3LL/plugin_hwcursor)**
>
> A hardware cursor plugin for the solar2D (formerly corona-sdk) game engine - GitHub - ANSH3LL/plugin\_hwcursor: A hardware cursor plugin for the solar2D (formerly corona-sdk) game engine

There are some yet to be documented mouse icons available via API, but they are just the basic resize top, resize bottom, resize corner, etc., and I suspect you’re looking for something else.

Besides that, the only other workaround is to hide the mouse and replace it with an image, which is known to have a slight lag.

---

<div class="post-metadata">

**Author:** ![aclementerodrguez](https://forums.solar2d.com/user_avatar/forums.solar2d.com/aclementerodrguez/32/263_2.png) [@aclementerodrguez](https://forums.solar2d.com/u/aclementerodrguez)\
**Post date:** [August 8, 2022, 7:07am UTC](https://forums.solar2d.com/t/changing-mouse-cursor-in-win32-platforms/354917/3 "2022-08-08T07:07:39Z")

</div>

Thank you @Siu I will try it

---

<div class="post-metadata">

**Author:** ![famousdoggstudios](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/f/94ad74/32.png) [@famousdoggstudios](https://forums.solar2d.com/u/famousdoggstudios)\
**Post date:** [August 8, 2022, 8:56am UTC](https://forums.solar2d.com/t/changing-mouse-cursor-in-win32-platforms/354917/4 "2022-08-08T08:56:07Z")

</div>

Honestly if you are just looking to show a serviceable custom pointer, it’s not too hard to do with a listener and a display obj

What we’ve done in our pc builds is to hide the mouse pointer using the api function and then add a global listener for the mouse. We then just read in the position of the pointer and update the position of a display object to the mouse position. The display object will be the custom pointer design.

If you are using the composer system to move between scenes, you’d probably want to have the code for this in a helper script of some sort where you can call functions to enable/disable the functionality depending on context.

Edit: clamping the mouse to your display area can be done simply with a bunch of IF conditions in the listener, if required

---

<div class="post-metadata">

**Author:** ![XeduR](https://forums.solar2d.com/user_avatar/forums.solar2d.com/xedur/32/256_2.png) [@XeduR](https://forums.solar2d.com/u/XeduR)\
**Post date:** [August 8, 2022, 9:25am UTC](https://forums.solar2d.com/t/changing-mouse-cursor-in-win32-platforms/354917/5 "2022-08-08T09:25:57Z")

</div>

You shouldn’t use a display object for the cursor because its position will always lag one frame behind the actual cursor position.

---

<div class="post-metadata">

**Author:** ![famousdoggstudios](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/f/94ad74/32.png) [@famousdoggstudios](https://forums.solar2d.com/u/famousdoggstudios)\
**Post date:** [August 8, 2022, 10:17am UTC](https://forums.solar2d.com/t/changing-mouse-cursor-in-win32-platforms/354917/6 "2022-08-08T10:17:20Z")

</div>

Possibly- but like i said, it’s serviceable and has worked pretty decently for us for menu navigation and such in our pc games where we also allow it to be controlled with the analog sticks if a controller is connected. Of course, if a more accurate implementation is needed, this won’t be the way to do it

---

<div class="post-metadata">

**Author:** ![aclementerodrguez](https://forums.solar2d.com/user_avatar/forums.solar2d.com/aclementerodrguez/32/263_2.png) [@aclementerodrguez](https://forums.solar2d.com/u/aclementerodrguez)\
**Post date:** [August 10, 2022, 6:15pm UTC](https://forums.solar2d.com/t/changing-mouse-cursor-in-win32-platforms/354917/7 "2022-08-10T18:15:08Z")

</div>

Thank you for your advices @famousdoggstudios
