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 bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jul 17, 2023
1 parent 1bf70e4 commit e785c71
Show file tree
Hide file tree
Showing 13 changed files with 358 additions and 138 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,12 @@ jobs:
- name: Build Plugin
run: |
invoke-expression 'dotnet build --no-restore --configuration Release RotationSolver'
invoke-expression 'dotnet build --no-restore --configuration Release ActionTimelineEx'
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
path: .\RotationSolver\bin\Release\net7.0-windows\RotationSolver\

- name: publish on version change
id: publish_nuget
uses: alirezanet/[email protected]
with:
PROJECT_FILE_PATH: RotationSolver.Basic/RotationSolver.Basic.csproj
VERSION_FILE_PATH: Directory.Build.props
NUGET_KEY: ${{secrets.nuget_api_key}}
path: .\ActionTimelineEx\bin\Release\net7.0-windows\ActionTimelineEx\

release:
name: release
Expand Down
7 changes: 6 additions & 1 deletion ActionTimelineEx/Configurations/DrawingSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public class DrawingSettings
public Vector4 BackgroundColor = new Vector4(0.5f, 0.5f, 0.5f, 0.5f);
public Vector4 GCDBorderColor = new Vector4(0.9f, 0.9f, 0.9f, 1f);
public float GCDThickness = 1.5f;
public float GCDHeightLow = 0.5f;
public float GCDHeightHigh = 0.8f;
public float GCDRound = 2;

public Vector4 CastInProgressColor = new Vector4(0.2f, 0.8f, 0.2f, 1f);
public Vector4 CastFinishedColor = new Vector4(0.5f, 0.5f, 0.5f, 1f);
Expand All @@ -50,7 +53,7 @@ public class DrawingSettings
public Vector4 AnimationLockColor = new Vector4(0.8f, 0.7f, 0.6f, 1f);

public bool ShowStatusLine = true;
public float StatusLineSize = 24;
public float StatusLineSize = 18;

public bool ShowGrid = true;
public bool ShowGridCenterLine = false;
Expand All @@ -59,9 +62,11 @@ public class DrawingSettings
public bool GridSubdivideSeconds = true;
public int GridSubdivisionCount = 2;
public float GridLineWidth = 1;
public float GridCenterLineWidth = 0.1f;
public float GridStartLineWidth = 3;
public float GridSubdivisionLineWidth = 1;
public Vector4 GridLineColor = new Vector4(0.3f, 0.3f, 0.3f, 1f);
public Vector4 GridCenterLineColor = new Vector4(0.5f, 0.5f, 0.5f, 0.3f);
public Vector4 GridStartLineColor = new Vector4(0.3f, 0.5f, 0.2f, 1f);
public Vector4 GridSubdivisionLineColor = new Vector4(0.3f, 0.3f, 0.3f, 0.2f);

Expand Down
4 changes: 2 additions & 2 deletions ActionTimelineEx/Configurations/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ public class Settings : IPluginConfiguration
{
public bool ShowTimelineOnlyInDuty = false;
public bool ShowTimelineOnlyInCombat = false;
public float StatusCheckDelay = 0.1f;
//public float StatusCheckDelay = 0.1f;
public DrawingSettings TimelineSetting = new DrawingSettings();

public HashSet<ushort> HideStatusIds = new HashSet<ushort>();
public int Version { get; set; } = 6;

public void Save()
Expand Down
28 changes: 27 additions & 1 deletion ActionTimelineEx/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public class Plugin : IDalamudPlugin

{ 10155, 1 }, //PLD Fight or Flight.

{ 12556, 1 }, //WAR Inner Strength.

{ 17926, 1 }, //DRK Blood Weapon.

{ 13601, 1 }, //GNB No mercy.
Expand Down Expand Up @@ -93,9 +95,33 @@ public void Dispose()
}

[Cmd("/atl", "Opens the ActionTimeline configuration window.")]
[SubCmd("lock", "Lock all windows")]
[SubCmd("unlock", "Unlock all windows")]
private void PluginCommand(string command, string arguments)
{
_settingsWindow.IsOpen = !_settingsWindow.IsOpen;
var sub = arguments.Split(' ').FirstOrDefault();
if(string.Equals("unlock", sub, StringComparison.OrdinalIgnoreCase))
{
foreach (var window in _windowSystem.Windows)
{
if (window is not TimelineWindow tWindow) continue;

tWindow.Setting.Locked = false;
}
}
else if (string.Equals("lock", sub, StringComparison.OrdinalIgnoreCase))
{
foreach (var window in _windowSystem.Windows)
{
if (window is not TimelineWindow tWindow) continue;

tWindow.Setting.Locked = true;
}
}
else
{
_settingsWindow.IsOpen = !_settingsWindow.IsOpen;
}
}

private void CreateWindows()
Expand Down
21 changes: 21 additions & 0 deletions ActionTimelineEx/Timeline/ActionControlCategory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
namespace ActionTimelineEx.Timeline;

/// <summary>
/// From https://github.com/Kouzukii/ffxiv-deathrecap/blob/master/Game/ActorControlCategory.cs
/// </summary>
public enum ActorControlCategory : ushort
{
Death = 0x6,
CancelAbility = 0xF,
GainEffect = 0x14,
LoseEffect = 0x15,
UpdateEffect = 0x16,
TargetIcon = 0x22,
Tether = 0x23,
Targetable = 0x36,
DirectorUpdate = 0x6D,
SetTargetSign = 0x1F6,
LimitBreak = 0x1F9,
HoT = 0x603,
DoT = 0x604
}
2 changes: 1 addition & 1 deletion ActionTimelineEx/Timeline/StatusLineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void DrawItemWithCenter(Vector2 centerPos, Vector2 windowPos, DrawingSett

var statusHeight = setting.StatusLineSize;
var flag = ImDrawFlags.RoundCornersAll;
var rounding = 2;
var rounding = setting.GCDRound;

TextureWrap? texture = DrawHelper.GetTextureFromIconId(Icon);
if (texture == null) return;
Expand Down
6 changes: 3 additions & 3 deletions ActionTimelineEx/Timeline/TimelineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ private void DrawItemWithCenter(ImDrawListPtr drawList, Vector2 centerPos, Vecto

case TimelineLayer.General:
//Get Info.
float highPos = 0.5f;
float lowPos = 0.8f;
float rounding = 2f;
float highPos = setting.GCDHeightLow;
float lowPos = setting.GCDHeightHigh;
float rounding = setting.GCDRound;

var leftTop = new Vector2(centerPos.X, centerPos.Y - iconSize / 2 + highPos * iconSize);
var leftBottom = new Vector2(centerPos.X, centerPos.Y - iconSize / 2 + lowPos * iconSize);
Expand Down
Loading

0 comments on commit e785c71

Please sign in to comment.