Skip to content

Commit

Permalink
[release] v1.5.2.0 (patch) (dit-zy#23)
Browse files Browse the repository at this point in the history
fix mysterious game crash
  • Loading branch information
dit-zy authored Jul 27, 2024
1 parent 669c506 commit 9d91d1a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion ScoutHelper/ScoutHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Dalamud.NET.Sdk/9.0.2">
<PropertyGroup Label="feature">
<Authors>ditzy</Authors>
<Version>1.5.1.0</Version>
<Version>1.5.2.0</Version>
<Description>A helper plugin for pre-populating hunt train scout tracker links</Description>
<PackageProjectUrl>https://github.com/im-scared/scout-helper</PackageProjectUrl>
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
Expand Down
41 changes: 23 additions & 18 deletions ScoutHelper/Windows/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,29 @@ ConfigWindow configWindow
MaximumSize = new Vector2(float.MaxValue, float.MaxValue),
};

_buttonSize = new Lazy<Vector2>(
() => {
var buttonSize = new[] {
[Strings.BearButton],
[Strings.SirenButton],
[Strings.TurtleButton, Strings.TurtleCollabButton],
new[] { Strings.CopyModeLinkButton, Strings.CopyModeFullTextButton, },
}
.Select(
labels => labels
.Select(ImGuiHelpers.GetButtonSize)
.Aggregate((a, b) => new Vector2(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)))
)
.MaxBy(size => size.X);
buttonSize.X += 4 * ImGui.GetFontSize(); // add some horizontal padding
return buttonSize;
}
);
try {
_buttonSize = new Lazy<Vector2>(
() => {
var buttonSize = new[] {
[Strings.BearButton],
[Strings.SirenButton],
[Strings.TurtleButton, Strings.TurtleCollabButton],
new[] { Strings.CopyModeLinkButton, Strings.CopyModeFullTextButton, },
}
.Select(
labels => labels
.Select(ImGuiHelpers.GetButtonSize)
.Aggregate((a, b) => new Vector2(Math.Max(a.X, b.X), Math.Max(a.Y, b.Y)))
)
.MaxBy(size => size.X);
buttonSize.X += 4 * ImGui.GetFontSize(); // add some horizontal padding
return buttonSize;
}
);
} catch (Exception e) {
_log.Error(e, "error while determining button size.");
throw;
}

_notices = Constants.Notices;

Expand Down

0 comments on commit 9d91d1a

Please sign in to comment.