Skip to content

Commit

Permalink
Release 2.0.1 (Remove staging icon font handle)
Browse files Browse the repository at this point in the history
  • Loading branch information
WorkingRobot committed Apr 23, 2024
1 parent c124fa5 commit c0489fe
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Waitingway/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Uri ServerUri
public EstimatorType Estimator { get; set; } = EstimatorType.Geometric;
public float DefaultRate { get; set; } = 75;
public int MinimumPositionThreshold { get; set; } = 40;
public int NotificationThreshold { get; set; } = 0;
public int NotificationThreshold { get; set; }

public void Save() =>
Service.PluginInterface.SavePluginConfig(this);
Expand Down
10 changes: 5 additions & 5 deletions Waitingway/Utils/ImGuiUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static class ImGuiUtils
{
private static Vector2 GetIconSize(FontAwesomeIcon icon)
{
using var font = Service.PluginInterface.UiBuilder.IconFontFixedWidthHandle.Push();
using var font = Service.PluginInterface.UiBuilder.IconFontHandle.Push();
return ImGui.CalcTextSize(icon.ToIconString());
}

Expand All @@ -25,20 +25,20 @@ private static void DrawCenteredIcon(FontAwesomeIcon icon, Vector2 offset, Vecto
if (iconSize.X > iconSize.Y)
{
scale = size.X / iconSize.X;
iconOffset = new(0, (size.Y - (iconSize.Y * scale)) / 2f);
iconOffset = new(0, size.Y - (iconSize.Y * scale));
}
else if (iconSize.Y > iconSize.X)
{
scale = size.Y / iconSize.Y;
iconOffset = new((size.X - (iconSize.X * scale)) / 2f, 0);
iconOffset = new(size.X - (iconSize.X * scale), 0);
}
else
{
scale = size.X / iconSize.X;
iconOffset = Vector2.Zero;
}

using var font = Service.PluginInterface.UiBuilder.IconFontFixedWidthHandle.Lock();
using var font = Service.PluginInterface.UiBuilder.IconFontHandle.Lock();
ImGui.GetWindowDrawList().AddText(font.ImFont, font.ImFont.FontSize * scale, offset + iconOffset, ImGui.GetColorU32(!isDisabled ? ImGuiCol.Text : ImGuiCol.TextDisabled), icon.ToIconString());
}

Expand All @@ -54,7 +54,7 @@ public static bool IconButtonSquare(FontAwesomeIcon icon, float size = -1)
ret = true;

var isDisabled = ImGuiInternals.GetItemFlags().HasFlag(ImGuiItemFlags.Disabled);
DrawCenteredIcon(icon, pos + spacing, buttonSize - spacing * 2 + Vector2.One, isDisabled);
DrawCenteredIcon(icon, pos + spacing, buttonSize - spacing * 2, isDisabled);

return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion Waitingway/Waitingway.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Authors>Asriel Camora</Authors>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
<PackageProjectUrl>https://github.com/WorkingRobot/Waitingway</PackageProjectUrl>
<Configurations>Debug;Release</Configurations>
<AssemblyName>Waitingway.Dalamud</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion web/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "waitingway-web"
authors = ["Asriel Camora <[email protected]>"]
description = "Backend web server for Waitingway"
repository = "https://github.com/WorkingRobot/Waitingway"
version = "2.0.0"
version = "2.0.1"
edition = "2021"

[dependencies]
Expand Down

0 comments on commit c0489fe

Please sign in to comment.