Skip to content

Commit

Permalink
Testing Release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ottermandias committed Feb 25, 2021
1 parent 2d40fd5 commit c4ff754
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions GUI/AutoVisorUi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ public AutoVisorUi( AutoVisor plugin, DalamudPluginInterface pi, AutoVisorConfig
_pi = pi;
_config = config;
_players = _config.States.Select( kvp => kvp.Key ).ToList();
VisorStateNames[ VisorStateNames.Length - 1 ] = "W. Drawn";
var idx = Array.IndexOf( VisorStateNames, "Drawn" );
if( idx < 0 )
return;
VisorStateNames[ idx ] = "W. Drawn";
}

private bool AddPlayer( PlayerConfig config )
Expand Down Expand Up @@ -100,15 +103,16 @@ private void DrawEnabledCheckbox()

private void DrawSettingsHeaders( int which )
{
var names = which == 2 ? VisorStateWeaponNames : VisorStateNames;
var names = which == 2 ? VisorStateWeaponNames : VisorStateNames;
ImGui.Columns( names.Length + 1, $"##header_{_currentPlayer}", true );

if( !_setColumnWidth )
{
ImGui.SetColumnWidth( 0, FirstColumnWidth );
for( var i = 1; i <= VisorStateNames.Length; ++i)
for( var i = 1; i <= VisorStateNames.Length; ++i )
ImGui.SetColumnWidth( i, OtherColumnWidths );
}

ImGui.NextColumn();
foreach( var name in names )
{
Expand Down Expand Up @@ -139,7 +143,7 @@ private void DrawSettingsLine( PlayerConfig settings, int which )
};

ImGui.Separator();
ImGui.PushStyleVar( ImGuiStyleVar.ItemSpacing, new Vector2(2,0) );
ImGui.PushStyleVar( ImGuiStyleVar.ItemSpacing, new Vector2( 2, 0 ) );
if( job != Job.Default )
{
if( ImGui.Button( $"-##0{_currentPlayer}_{_currentJob}_{which}", new Vector2( 20, 23 ) ) )
Expand All @@ -154,7 +158,7 @@ private void DrawSettingsLine( PlayerConfig settings, int which )

ImGui.SameLine();
}

ImGui.Text( name );
ImGui.PopStyleVar();
ImGui.NextColumn();
Expand Down
2 changes: 1 addition & 1 deletion Managers/VisorManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public void ResetState()
0x00FF00FFFF0000FF,
0x00FF000000000000,
0x00FF000000000000,
0x0000FFFF00000000
0x0000FFFF00FF0000
};

public unsafe void OnFrameworkUpdate( object framework )
Expand Down

0 comments on commit c4ff754

Please sign in to comment.