Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: fixed some config bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jun 9, 2023
1 parent 0e64569 commit 6969218
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 20 deletions.
52 changes: 33 additions & 19 deletions RotationSolver/UI/PainterManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public override void UpdateOnFrame(XIVPainter.XIVPainter painter)
{
SubItems = Array.Empty<IDrawing3D>();

if (!Service.Config.ShowTarget) return;
if (!Service.Config.ShowTarget || DataCenter.StateType == StateCommandType.Cancel) return;

if (ActionUpdater.NextAction is not BaseAction act) return;

Expand All @@ -101,9 +101,11 @@ public override void UpdateOnFrame(XIVPainter.XIVPainter painter)
var d = DateTime.Now.Millisecond / 1000f;
var ratio = (float)DrawingHelper.EaseFuncRemap(EaseFuncType.None, EaseFuncType.Cubic)(d);

_target.Color = ImGui.GetColorU32(Service.Config.TargetColor);
List<IDrawing3D> subItems = new List<IDrawing3D>() { _target,
new Drawing3DImage(act.GetTexture(), act.Target.Position)
};

List<IDrawing3D> subItems = new List<IDrawing3D>() { _target };
_target.Color = ImGui.GetColorU32(Service.Config.TargetColor);
_target.Center = act.Target.Position;
_target.Radius = targetRadius * ratio;

Expand Down Expand Up @@ -181,9 +183,9 @@ public static void Init()

_painter.DrawingHeight = Service.Config.DrawingHeight;
_painter.SampleLength = Service.Config.SampleLength;
_painter.UseTaskForAccelerate = Service.Config.UseTaskToDrawing;

var annulus = new Drawing3DAnnulusO(Player.Object, 3, 3 + Service.Config.MeleeRangeOffset,
ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.8f, 0.75f, 0)), 2);
var annulus = new Drawing3DAnnulusO(Player.Object, 3, 3 + Service.Config.MeleeRangeOffset, 0, 2);
annulus.InsideColor = ImGui.ColorConvertFloat4ToU32(new Vector4(0.8f, 0.3f, 0.2f, 0.15f));

annulus.UpdateEveryFrame = () =>
Expand Down Expand Up @@ -224,24 +226,36 @@ public static void Init()
_painter.AddDrawings(_positional, annulus, movingTarget, new TargetDrawing(), new TargetText());

#if DEBUG
//_painter.AddDrawings(
// new Drawing3DCircularSectorO(Player.Object, 3, ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.4f, 0.5f)), -5, arcStartSpan: new Vector2(0, MathF.PI /2))
// {
// IsFill = false,
// },

// new Drawing3DAnnulus(Player.Object.Position, 10, 10 + Service.Config.MeleeRangeOffset,
// ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.8f, 0.75f, 0.15f)), 2)
// {
// DeadTime = DateTime.Now.AddSeconds(5),
// }

//new Drawing3DCircularSector(Player.Object.Position, 10,
var deadTime = DateTime.Now.AddSeconds(5);
var r = new Random();
var col = ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.8f, 0.75f, 0.15f));
var colIn = ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.8f, 0.75f, 0.8f));
_painter.AddDrawings(
new Drawing3DAnnulus(Player.Object.Position + new Vector3((float)r.NextDouble() * 3, 0, (float)r.NextDouble() * 3), 5, 10, 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), 5, col, 2)
{
DeadTime = deadTime,
InsideColor = colIn,
PolylineType = XIVPainter.Enum.PolylineType.ShouldGoOut,
}

//new Drawing3DCircularSectorO(Player.Object, 3, ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.4f, 0.5f)), -5, arcStartSpan: new Vector2(0, MathF.PI / 2))
//{
// IsFill = false,
//},

//new Drawing3DCircularSector(Player.Object.Position, 5,
//ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.8f, 0.75f, 0.15f)), 2)
//{
// DeadTime = DateTime.Now.AddSeconds(5),
//}
// );
);
//var color = ImGui.ColorConvertFloat4ToU32(new Vector4(1f, 0.5f, 0.4f, 0.15f));

//var p = new Drawing3DCircularSector(Player.Object.Position, 5, color, 5);
Expand Down
2 changes: 1 addition & 1 deletion XIVPainter

0 comments on commit 6969218

Please sign in to comment.