Current version: 1.0.3 (
download for Windows)
Updates1.0.3:
. Added ability to refresh the positions of the contextual display and tool-tip after altering the text within them.
. Added ability to remove the cursor and just use the toop-tip and contextual display, which allows you to use them with the hardware cursor.
AboutSqueak is a simple and small add-on that easily allows you to change the mouse cursor while it's inside your window.
I created this while working on something else and decided that it would be useful to have it always accessible for future projects. I then realised that other people could benefit from a tiny bit of saved time too. It also gave me the opportunity to learn how to build a DLL, which is not something that is fun.
Squeak also has a built-in tool-tip and contextual display, both of which are automatically resized based on their text content. They are customisable too: colours, padding, outline, tool-tip timers etc.. They can both be activated and deactivated individually. They also both reposition to stay within the window's border. The contextual display can be displayed above or below the cursor whereas the tool-tip is always display on top (layer-wise, not position - positions can be adjusted).
It can be run and used with minimal code. Only two lines are required inside the main loop: update and draw. It automatically updates itself from window events.
You can decide to allow the cursor image to scale with the display as it stretches or restrain it to keep a persistent size. You can also use Squeak to "get" the current mouse position; it can return either coords or pixels.
Here is a video of it in action:
Unfortunately, you can't really see the green, custom mouse cursor as the video capturing software that I used ignores the "remove mouse cursor" command and places it right back on top
So, here's a screen shot:
DownloadAnyway, I hope some people find some use of it. The download is a .zip file that contains the .h file, the .lib file, the .dll file, a readme, and a couple of simple examples (the examples were used for the screenshot and video).
You can
download it from MediaFire. It's provided under the zlib licence.
FeedbackIf you you have any suggestions or find any bugs, feel free to leave them in a comment on this thread.