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

Commit

Permalink
fix: fixed percent condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Nov 8, 2023
1 parent 2b2f966 commit d7cd205
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Resources/Supporters.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[
"Vipps",
"LuckyTM",
"Vain",
"Abuse",
"Constantinescu Marius",
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public float TimeToKill
/// Is this action's target is a boss?
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Please use Target.IsBossFromTTK() or Target.IsBossFromIcon instead.", true)]
[Obsolete("Please use Target.IsBossFromTTK() or Target.IsBossFromIcon() instead.", true)]
public bool IsTargetBoss => Target?.IsBossFromTTK() ?? false;

/// <inheritdoc/>
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/IBaseAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public interface IBaseAction : IAction
/// Is target a boss.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Please use Target.IsBossFromTTK() or Target.IsBossFromIcon instead.", true)]
[Obsolete("Please use Target.IsBossFromTTK() or Target.IsBossFromIcon() instead.", true)]
bool IsTargetBoss { get; }

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/UI/ConditionDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ public static void DrawByteEnum<T>(string name, ref T value, Func<T, string> fun
public static bool DrawDragFloat(ConfigUnitType type, string name, ref float value)
{
ImGui.SameLine();
var show = type == ConfigUnitType.Percent ? $"{value:F1}{type.ToSymbol()}" : $"{value:F2}{type.ToSymbol()}";
var show = type == ConfigUnitType.Percent ? $"{value * 100:F1}{type.ToSymbol()}" : $"{value:F2}{type.ToSymbol()}";

ImGui.SetNextItemWidth(Math.Max(50 * ImGuiHelpers.GlobalScale, ImGui.CalcTextSize(show).X));
var result = ImGui.DragFloat(name, ref value, 0.1f, 0, 0, show);
var result = ImGui.DragFloat(name, ref value, type == ConfigUnitType.Percent ? 0.001f : 0.1f, 0, 0, show);
ImguiTooltips.HoveredTooltip(type.ToDesc());
return result;
}
Expand Down

0 comments on commit d7cd205

Please sign in to comment.