CursorAPI
NOTE: This is only for mod developers who want to add custom cursors to the game.
A small API that took under a day to make
Github repository, where you can look at CursorAPI's code and download it: https://github.com/SpecialAPI/CursorAPI
An API that allows easily adding new custom cursors to the game.
To use this API, just
- Add it's files except files from Examples folder, CursorAPI.csproj and CursorAPI.sln, README.md, .gitignore and .gitattributes and everything from the Properties folder to your project.
- Call
CursorMaker.Init()
in yourETGModule.Start()
method.
CursorAPI Guide
Various CursorAPI classes and enums
Spoiler!
CursorMaker
- the core class that can make cursors.CursorTools
- a class containing all tools used by CursorAPI.UIRootProcessedFlag
- it just exists.ResourceGetter
- allows you to get resources from your project.
Making a cursor
Spoiler!
To make a cursor, you need to do this: CursorMaker.BuildCursor(textureFilePath)
. The textureFilePath
argument is the filepath to your cursor's texture in your Visual Studio project.
And that is literally it.
ExampleModule.cs
Spoiler!
An example ETGModule
that has an example of cursor making. You should NOT add it to your project, but you can look at if when you want to see how to make a cursor (or you can just look at the CursorAPI guide here)
Downloads107
Views1,643
Publish Date3 years ago
Last Updated3 years ago
Versionv1.1
Members
SpecialAPIOwner
Comments