nice-cursor

A lightweight and simple custom cursor library for HaxeFlixel and OpenFL games.
https://github.com/pedrinducavalo/Nice-Cursor

To install, run:

haxelib install nice-cursor 1.0.1 

See using Haxelib in Haxelib documentation for more information.

README.md

Nice Cursor

A lightweight custom cursor library for HaxeFlixel and OpenFL games. It provides several built-in cursor styles and optional HaxeUI support.

Built-in cursor styles

Installation

Install the library with Haxelib:

haxelib install nice-cursor

Then include the library in your HaxeFlixel project's Project.xml or equivalent build configuration file:

<haxelib name="nice-cursor" />

Usage

Import Cursor and CursorStyle, then show the custom cursor when your game starts:

import cursor.Cursor;
import cursor.config.CursorStyle;

// Call when setting up your game.
Cursor.show();

Change the cursor style by assigning a CursorStyle value:

Cursor.cursorStyle = CursorStyle.Pointer;

The built-in styles are Default, Pointer, Grab, Cross, Text, and Loading. For example:

Cursor.cursorStyle = CursorStyle.Loading;

HaxeUI support

The library also supports HaxeUI. When using HaxeUI, initialize it with Cursor.init() before showing the cursor:

Cursor.init();
Cursor.show();

These functions are available only when HaxeUI is included in your project.

Contributors
dre
Version
1.0.1
Published
2 weeks ago
Dependencies
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub

⌂