Skip to content

Jaksuhn/XIVPainter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XIVPainter

XIVPainter is a drawing library in Imgui designed to work within Dalamud Plugins. It can draw polygons, images, text, and so on to your world.

Getting Started

Add XIVPainter as a submodule to your project:

git submodule add https://github.com/ArchiDog1998/XIVPainter

Add it to your plugin's CSProj file:

<ItemGroup>
	<ProjectReference Include="..\XIVPainter\XIVPainter\XIVPainter.csproj" />
</ItemGroup>

Then, in the entry point of your plugin:

var painter = XIVPainter.XIVPainter.Create(pluginInterface, "%NAME%");

where pluginInterface is a DalamudPluginInterface.

And there is a good example of it in Rotation Solver.

Don't forget to dispose it!

Usage

Hotbar highlighting

painter.AddDrawings(new DrawingHighlightHotbar(new(0f, 1f, 0.8f, 1f), 7411));

highlight

Drawing stuff

painter.AddDrawings(new Drawing3DCircularSectorO(Player.Object, 5, ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.4f, 0.15f)), 5));

Moving

Animation stuff

var deadTime = DateTime.Now.AddSeconds(10);
var r = new Random();
var col = ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.2f, 0.15f));
var colIn = ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.2f, 0.5f));
painter.AddDrawings(
    new Drawing3DAnnulus(Player.Object.Position + new Vector3((float)r.NextDouble() * 3, 0, (float)r.NextDouble() * 3), 3, 5, col, 2)
    {
        DeadTime = deadTime,
        InsideColor = colIn,
        PolylineType = XIVPainter.Enum.PolylineType.ShouldGoOut,
    },

    new Drawing3DCircularSector(Player.Object.Position + new Vector3((float)r.NextDouble() * 3, 0, (float)r.NextDouble() * 3), 3, col, 2)
    {
        DeadTime = deadTime,
        InsideColor = colIn,
        PolylineType = XIVPainter.Enum.PolylineType.ShouldGoOut,
    });

DeadTime will make an animation about disappear.

PolylineType will show the moving suggestion for you.

Suggestion

About

A painter for FFXIV.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%