Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.30.0 #180

Merged
merged 121 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
1238958
build(deps): bump LiveChartsCore.SkiaSharpView.WPF in /MHFZ_Overlay
dependabot[bot] Aug 3, 2023
2cce55c
docs(README): update README.md
DorielRivalet Aug 5, 2023
6dd4241
ci: fix dotnet workflow
DorielRivalet Aug 5, 2023
e4de71d
test: change target framework
DorielRivalet Aug 5, 2023
5d17dc4
feat(achievements): add more achievements
DorielRivalet Aug 5, 2023
d1a3b3e
feat(achievements): update achievements explanation in configuration …
DorielRivalet Aug 5, 2023
c2fd6eb
Merge pull request #154 from DorielRivalet/dependabot/nuget/MHFZ_Over…
DorielRivalet Aug 5, 2023
4b786ac
feat(audio): add challenge sound effects
DorielRivalet Aug 6, 2023
4d233e9
fix: remove warnings
DorielRivalet Aug 6, 2023
c46a078
build(deps): bump WPF-UI in /MHFZ_Overlay
dependabot[bot] Aug 7, 2023
30973d5
build(deps): bump NLog from 5.2.2 to 5.2.3 in /MHFZ_Overlay
dependabot[bot] Aug 7, 2023
35ce476
Merge pull request #160 from DorielRivalet/dependabot/nuget/MHFZ_Over…
DorielRivalet Aug 7, 2023
7241258
Merge pull request #161 from DorielRivalet/dependabot/nuget/MHFZ_Over…
DorielRivalet Aug 7, 2023
0c45548
feat: add more achievements
DorielRivalet Aug 7, 2023
87b2356
feat(audio): add sound effects files
DorielRivalet Aug 7, 2023
d9abdf2
Merge branch 'release' of github.com:DorielRivalet/mhfz-overlay into …
DorielRivalet Aug 7, 2023
f74cc5e
chore(nuget): update Wpf.Ui
DorielRivalet Aug 8, 2023
8ca2272
feat(configuration): add audio section
DorielRivalet Aug 8, 2023
f3cd221
feat(audio): implement audio configuration
DorielRivalet Aug 8, 2023
8fa3be8
feat(achievements): make more obtainable achievements
DorielRivalet Aug 8, 2023
2f1d405
feat(achievements): add more achievements
DorielRivalet Aug 10, 2023
458f9ae
feat(challenges): add challenges unlock button
DorielRivalet Aug 10, 2023
cddc2e2
feat(challenges): implement challenge unlock
DorielRivalet Aug 11, 2023
98c24dd
docs(FAQ): add LaTeX
DorielRivalet Aug 11, 2023
f724995
docs(FAQ): fix LaTeX formatting
DorielRivalet Aug 11, 2023
37eb8f3
docs(FAQ): separate math blocks
DorielRivalet Aug 11, 2023
2ee78bd
build(deps-dev): bump @commitlint/cli from 17.6.7 to 17.7.1
dependabot[bot] Aug 11, 2023
c926b7a
feat: add challenge button sound effects
DorielRivalet Aug 11, 2023
e57691b
Merge pull request #166 from DorielRivalet/dependabot/npm_and_yarn/re…
DorielRivalet Aug 11, 2023
6aec219
build(deps-dev): bump @commitlint/config-conventional
dependabot[bot] Aug 11, 2023
69bbfcb
build(deps): bump release-it from 16.1.3 to 16.1.4
dependabot[bot] Aug 11, 2023
76449e4
Merge pull request #165 from DorielRivalet/dependabot/npm_and_yarn/re…
DorielRivalet Aug 11, 2023
4c0f999
Merge pull request #163 from DorielRivalet/dependabot/npm_and_yarn/re…
DorielRivalet Aug 11, 2023
ff1540b
feat(challenge): add challenge states
DorielRivalet Aug 11, 2023
e0e1caa
feat(achievements): update achievements explanation in configuration …
DorielRivalet Aug 12, 2023
8e7057b
feat(bingo): add bingo data structures
DorielRivalet Aug 12, 2023
11794f4
feat(challenges): update challenges explanation
DorielRivalet Aug 13, 2023
49c0397
feat: add messengers
DorielRivalet Aug 13, 2023
64dcc1a
feat(bingo): add bingo buttons reactivity
DorielRivalet Aug 13, 2023
b285192
feat(bingo): add snackbar
DorielRivalet Aug 13, 2023
f410d9d
feat(bingo): add bingo cell model
DorielRivalet Aug 13, 2023
bef2c53
feat(bingo): generate bingo board view
DorielRivalet Aug 13, 2023
b5b23a2
build(deps): bump release-it from 16.1.4 to 16.1.5
dependabot[bot] Aug 14, 2023
a2b2b97
docs(README): create github actions workflow status badge
DorielRivalet Aug 14, 2023
f6ea1c0
docs: give example data flow
DorielRivalet Aug 15, 2023
d4b966d
feat(bingo): expand bingo functionality
DorielRivalet Aug 15, 2023
31a15e5
fix: code paths
DorielRivalet Aug 15, 2023
2aa4d2a
docs(FAQ): update FAQ.md
DorielRivalet Aug 16, 2023
81c4410
feat(challenges): add check for challenge window
DorielRivalet Aug 16, 2023
eebe66e
feat(challenges): add sky corridor to collection
DorielRivalet Aug 16, 2023
80336d5
docs(README): update acknowledgements
DorielRivalet Aug 16, 2023
23579c4
feat(assets): add gauntlet icons
DorielRivalet Aug 16, 2023
2eb964c
fix(assets): armor sphere icon
DorielRivalet Aug 16, 2023
d89d9f7
feat: add time service
DorielRivalet Aug 17, 2023
ccf7a19
feat(bingo): update bingo window layout
DorielRivalet Aug 17, 2023
7ded0ff
feat(benchmark): add benchmarks
DorielRivalet Aug 18, 2023
8ee9db8
feat(achievements): expand achievements collection
DorielRivalet Aug 18, 2023
5eaef16
refactor: remove stopwatches
DorielRivalet Aug 18, 2023
bf868c4
build: add project for benchmark
DorielRivalet Aug 18, 2023
3dd8ff4
docs(performance): add benchmarks location
DorielRivalet Aug 18, 2023
2c05144
feat(achievements): expand collection
DorielRivalet Aug 18, 2023
16c2d45
feat: make invariant cultureinfo default
DorielRivalet Aug 18, 2023
97b603b
fix: quest time percent
DorielRivalet Aug 18, 2023
b4edf7c
feat(bingo): expand monster collection
DorielRivalet Aug 18, 2023
f4c428a
feat: add more bitfields
DorielRivalet Aug 19, 2023
9eff2a6
feat: add quest id logging
DorielRivalet Aug 19, 2023
ab8099e
feat(bitfields): add more bitfields
DorielRivalet Aug 19, 2023
12921bb
fix: timers
DorielRivalet Aug 19, 2023
c513fe7
feat: add watermark modes options
DorielRivalet Aug 20, 2023
eefc246
fix: binding failures
DorielRivalet Aug 20, 2023
ff34d9c
feat: add hc/ul options
DorielRivalet Aug 20, 2023
17e8f47
refactor(bingo): implement interfaces
DorielRivalet Aug 20, 2023
812072c
feat(discord): add UL/HC
DorielRivalet Aug 21, 2023
cedcea3
fix: monster 2 hp bar visibility
DorielRivalet Aug 21, 2023
039d921
docs(README): update README.md
DorielRivalet Aug 21, 2023
f7120a8
build(deps): bump LiveChartsCore.SkiaSharpView.WPF in /MHFZ_Overlay
dependabot[bot] Aug 21, 2023
893fcd1
build(deps-dev): bump alex from 11.0.0 to 11.0.1
dependabot[bot] Aug 21, 2023
7c083ab
feat(achievements): expand collection
DorielRivalet Aug 23, 2023
dd65157
feat(bingo): add converters
DorielRivalet Aug 23, 2023
2b50a3a
feat(bitfields): add gauntlet boost
DorielRivalet Aug 23, 2023
bcbac76
feat(bingo): update models
DorielRivalet Aug 24, 2023
eca3e58
build(deps): bump NuGet.CommandLine from 6.6.1 to 6.7.0 in /MHFZ_Overlay
dependabot[bot] Aug 25, 2023
cab623b
feat(github): update bug report template
DorielRivalet Aug 28, 2023
0e46864
feat(achievements): update achievements
DorielRivalet Aug 28, 2023
e014250
feat: add frontier data collections for colors
DorielRivalet Aug 28, 2023
f1fb95d
feat(challenges): add inventory system
DorielRivalet Aug 28, 2023
6db07d1
feat(challenges): add book of secrets data
DorielRivalet Aug 28, 2023
37e2c77
docs: add stackoverflow link
DorielRivalet Aug 28, 2023
60554ac
build(deps): bump Microsoft.Web.WebView2 in /MHFZ_Overlay
dependabot[bot] Aug 29, 2023
aa6d19e
feat(challenges): update dragon parts description
DorielRivalet Aug 29, 2023
bd733ab
feat: expand bingo functionality
DorielRivalet Aug 29, 2023
5cee57e
feat: add ancient dragon images
DorielRivalet Aug 29, 2023
3bf4544
feat: update ancient dragon parts
DorielRivalet Aug 29, 2023
1e5f4b7
perf: remove gifs
DorielRivalet Aug 30, 2023
0640049
feat(achievements): expand collection
DorielRivalet Aug 30, 2023
52134ad
feat(bingo): adjust monster base score
DorielRivalet Aug 30, 2023
e7d480b
feat(assets): add images
DorielRivalet Aug 30, 2023
4886f58
feat(challenge): update ancient dragon parts
DorielRivalet Aug 30, 2023
fb09a35
feat(bingo): update tab layout
DorielRivalet Aug 30, 2023
7a2ae3f
feat: disable challenges with early return
DorielRivalet Aug 31, 2023
5e5b50b
fix: timer methods
DorielRivalet Aug 31, 2023
3cc2c24
fix: tab icons being clickable
DorielRivalet Aug 31, 2023
26c071b
perf: add timer benchmarks
DorielRivalet Aug 31, 2023
9ab8271
feat(achievements): expand collection
DorielRivalet Aug 31, 2023
0766420
perf: use timespan timer
DorielRivalet Aug 31, 2023
644ff63
feat(achievements): add more achievements
DorielRivalet Aug 31, 2023
a976c6c
Merge pull request #176 from DorielRivalet/dependabot/npm_and_yarn/re…
DorielRivalet Aug 31, 2023
5891d6d
Merge pull request #167 from DorielRivalet/dependabot/npm_and_yarn/re…
DorielRivalet Aug 31, 2023
d801c0a
Merge pull request #178 from DorielRivalet/dependabot/nuget/MHFZ_Over…
DorielRivalet Aug 31, 2023
d90b7ea
Merge pull request #179 from DorielRivalet/dependabot/nuget/MHFZ_Over…
DorielRivalet Aug 31, 2023
a2ea45b
Merge pull request #175 from DorielRivalet/dependabot/nuget/MHFZ_Over…
DorielRivalet Aug 31, 2023
c7f8f4b
feat(bingo): add true transcend gauge
DorielRivalet Aug 31, 2023
368c899
build(deps): update EZlion
DorielRivalet Aug 31, 2023
cb4f2fc
docs(README): update README.md
DorielRivalet Sep 1, 2023
0aa9187
fix: custom quest id showing when disabled in settings
DorielRivalet Sep 1, 2023
a7e0de8
feat(configuration): add missing overlay restart icons
DorielRivalet Sep 1, 2023
60e1bbb
fix(sqlite): date formatting
DorielRivalet Sep 1, 2023
c5bfb18
feat: add quest toggle mode functionality
DorielRivalet Sep 1, 2023
7ec3067
chore: bump version
DorielRivalet Sep 1, 2023
f64d23d
chore: release v0.30.0
DorielRivalet Sep 1, 2023
52aea5c
Merge branch 'main' into release
DorielRivalet Sep 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 1 addition & 28 deletions .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,42 +32,15 @@ body:
- Always
validations:
required: true
- type: textarea
id: operating-system
attributes:
label: What operating system are you using?
description: Operating system
placeholder: Tell us what operating system you using (Windows 11, Windows 10, etc.)
value: "Windows 10 21H2"
validations:
required: true
- type: textarea
id: version
attributes:
label: What version of the program are you using?
description: Program Version
placeholder: Tell us what version you using (x.y.z)
placeholder: Tell us what version you are using (x.y.z)
value: "Latest version"
validations:
required: true
- type: dropdown
id: game-version
attributes:
label: What version of the game are you using?
multiple: true
options:
- High-Grade Edition
- Non High-Grade Edition
validations:
required: true
- type: input
id: quest-id
attributes:
label: Quest ID
description: What is the Quest ID where the issue occurs? Enter the quest ID that you see in the overlay, enabled by going into Config -> Quest Log -> Settings. If the issue occurs in multiple quests, enter an example quest ID and tell us in the issue description that it happens in multiple quests. If the issue occurs outside quests, enter 0.
placeholder: '0'
validations:
required: true
- type: markdown
attributes:
value: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ jobs:
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
run: |
cd MHFZ_OverlayTest
dotnet test --no-restore --verbosity normal
195 changes: 195 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ The location of any previous settings are in the subfolders of `%LocalAppData%/D
5. Drag and drop the file.
6. Copy/Paste into Output Comparer the hash provided by the developer.
7. You should get the message `The hashes are the same.`.
8. Close DevToys.

### Command Line Interface

Expand Down Expand Up @@ -392,9 +393,12 @@ As an added bonus:

- Effective HP is the HP taking into account the monster's defense rate. Burning Freezing Elzelion has 1,000,000 EHP because his True HP is 30,000 and his defense rate is 0.03.

```text
Effective HP = True HP / Defense rate
1,000,000 = 30,000 / 0.03
```math
Effective HP = \frac{True HP}{DefenseRate}
```

```math
1,000,000 = \frac{30,000}{0.03}
```

- True HP is the HP of the monster without taking into account the monster's defense rate.
Expand Down
149 changes: 149 additions & 0 deletions MHFZOverlayBenchmark/Comparisons/TimerComparison.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
// © 2023 The mhfz-overlay developers.
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

namespace MHFZOverlayBenchmark.Comparisons;

using BenchmarkDotNet.Attributes;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Runtime.Intrinsics.Arm;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

public enum TimerFormat
{
MinutesSeconds,
MinutesSecondsMilliseconds,
HoursMinutesSeconds,
}

public enum TimerMode
{
TimeLeft,
Elapsed,
}

// TODO optimize
[RPlotExporter]
[MedianColumn, MinColumn, MaxColumn]
[UnicodeConsoleLogger]
[MemoryDiagnoser]
[ExceptionDiagnoser]
public class TimerComparison
{
public const decimal FramesPerSecond = 30;

public string TimeLeftPercentNumber = " (100%)";

[Params(120 * 60 * 30)]
public int TimeDefInt;

[Benchmark]
public string BenchmarkSimpleTimer()
{
string s = string.Empty;
for (int i = TimeDefInt; i > 0; i--)
{
s = SimpleTimer(i, TimerFormat.MinutesSecondsMilliseconds, true, TimeDefInt, true, TimeLeftPercentNumber, TimerMode.Elapsed);
};

return s;
}

[Benchmark]
public string BenchmarkTimeSpanTimer()
{
string s = string.Empty;
for (int i = TimeDefInt; i > 0; i--)
{
s = TimeSpanTimer(i, TimerFormat.MinutesSecondsMilliseconds, true, TimeDefInt, true, TimeLeftPercentNumber, TimerMode.Elapsed);
};

return s;
}

[Benchmark]
public string BenchmarkStringBuilderTimer()
{
string s = string.Empty;
for (int i = TimeDefInt; i > 0; i--)
{
s = StringBuilderTimer(i, TimerFormat.MinutesSecondsMilliseconds, true, TimeDefInt, true, TimeLeftPercentNumber, TimerMode.Elapsed);
};

return s;
}

public string SimpleTimer(decimal timeInt, TimerFormat timerFormat, bool isFrames = true, decimal timeDefInt = 0, bool timeLeftPercentShown = false, string timeLeftPercentNumber = "", TimerMode timerMode = TimerMode.Elapsed)
{
// TODO wrong conditionals for timeint >= timedefint?
decimal time = timerMode == TimerMode.Elapsed && timeInt <= timeDefInt ? time = timeDefInt - timeInt : time = timeInt;
decimal framesPerSecond = isFrames ? FramesPerSecond : 1;
decimal milliseconds = time / framesPerSecond * 1000;
decimal totalMinutes = Math.Floor(milliseconds / 60000);
decimal minutes = totalMinutes >= 60 ? totalMinutes : Math.Floor(milliseconds / 60000);
decimal seconds = Math.Floor((milliseconds - (minutes * 60000)) / 1000);
decimal remainingMilliseconds = milliseconds - (minutes * 60000) - (seconds * 1000);
var timeLeftPercent = timeLeftPercentShown ? timeLeftPercentNumber : string.Empty;

return timerFormat switch
{
TimerFormat.MinutesSeconds => $"{minutes:00}:{seconds:00}" + timeLeftPercent,
TimerFormat.MinutesSecondsMilliseconds => $"{minutes:00}:{seconds:00}.{remainingMilliseconds:000}" + timeLeftPercent,
_ => $"{minutes:00}:{seconds:00}.{remainingMilliseconds:000}" + timeLeftPercent,
};
}

public string StringBuilderTimer(decimal timeInt, TimerFormat timerFormat, bool isFrames = true, decimal timeDefInt = 0, bool timeLeftPercentShown = false, string timeLeftPercentNumber = "", TimerMode timerMode = TimerMode.Elapsed)
{
decimal time = timerMode == TimerMode.Elapsed && timeInt <= timeDefInt ? time = timeDefInt - timeInt : time = timeInt;
decimal framesPerSecond = isFrames ? FramesPerSecond : 1;
decimal totalSeconds = time / framesPerSecond;
decimal totalMinutes = Math.Floor(totalSeconds / 60);
decimal minutes = totalMinutes >= 60 ? totalMinutes : Math.Floor(totalSeconds / 60);
decimal seconds = Math.Floor(totalSeconds % 60);
decimal milliseconds = Math.Round((time % framesPerSecond) * (1000M / framesPerSecond));
var timeLeftPercent = timeLeftPercentShown ? timeLeftPercentNumber : string.Empty;

StringBuilder sb = new StringBuilder();
switch (timerFormat)
{
default:
sb.AppendFormat(CultureInfo.InvariantCulture, "{0:00}:{1:00}.{2:000}", minutes, seconds, milliseconds);
break;
case TimerFormat.MinutesSeconds:
sb.AppendFormat(CultureInfo.InvariantCulture, "{0:00}:{1:00}", minutes, seconds);
break;
case TimerFormat.MinutesSecondsMilliseconds:
sb.AppendFormat(CultureInfo.InvariantCulture, "{0:00}:{1:00}.{2:000}", minutes, seconds, milliseconds);
break;
}

sb.Append(timeLeftPercent);
return sb.ToString();
}

public string TimeSpanTimer(decimal timeInt, TimerFormat timerFormat, bool isFrames = true, decimal timeDefInt = 0, bool timeLeftPercentShown = false, string timeLeftPercentNumber = "", TimerMode timerMode = TimerMode.Elapsed)
{
decimal time = timerMode == TimerMode.Elapsed && timeInt <= timeDefInt ? time = timeDefInt - timeInt : time = timeInt;
decimal framesPerSecond = isFrames ? FramesPerSecond : 1;
decimal timeInSeconds = time / framesPerSecond;
TimeSpan timeInSecondsSpan = TimeSpan.FromSeconds((double)timeInSeconds);
int roundedMilliseconds = (int)(Math.Round(timeInSecondsSpan.TotalMilliseconds) % 1000);
var totalMinutes = Math.Floor(timeInSecondsSpan.TotalSeconds / 60);
var minutes = totalMinutes >= 60 ? totalMinutes : timeInSecondsSpan.Minutes;
var timeLeftPercent = timeLeftPercentShown ? timeLeftPercentNumber : string.Empty;

// Format the TimeSpan object as a string
return timerFormat switch
{
TimerFormat.MinutesSeconds => $"{minutes:00}:{timeInSecondsSpan.Seconds:00}" + timeLeftPercent,
TimerFormat.MinutesSecondsMilliseconds => $"{minutes:00}:{timeInSecondsSpan.Seconds:00}.{roundedMilliseconds:000}" + timeLeftPercent,
_ => $"{minutes:00}:{timeInSecondsSpan.Seconds:00}.{roundedMilliseconds:000}" + timeLeftPercent,
};
}
}
14 changes: 14 additions & 0 deletions MHFZOverlayBenchmark/MHFZOverlayBenchmark.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.7" />
</ItemGroup>

</Project>
18 changes: 18 additions & 0 deletions MHFZOverlayBenchmark/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// © 2023 The mhfz-overlay developers.
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

// See https://aka.ms/new-console-template for more information
using BenchmarkDotNet.Running;
using System.Management;
using MHFZOverlayBenchmark.Comparisons;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Reports;
using Perfolizer.Horology;
using BenchmarkDotNet.Columns;

var summary = BenchmarkRunner.Run<TimerComparison>(
DefaultConfig.Instance.WithSummaryStyle(
SummaryStyle.Default
.WithTimeUnit(TimeUnit.Millisecond)
.WithSizeUnit(SizeUnit.MB)));
6 changes: 6 additions & 0 deletions MHFZ_Overlay.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MHFZ_Overlay", "MHFZ_Overla
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MHFZ_OverlayTest", "MHFZ_OverlayTest\MHFZ_OverlayTest.csproj", "{13ED7686-F93C-4DBC-9258-061DE45FFC60}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MHFZOverlayBenchmark", "MHFZOverlayBenchmark\MHFZOverlayBenchmark.csproj", "{7A166AB3-8381-45A7-A827-AD42A9EDD863}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -21,6 +23,10 @@ Global
{13ED7686-F93C-4DBC-9258-061DE45FFC60}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13ED7686-F93C-4DBC-9258-061DE45FFC60}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13ED7686-F93C-4DBC-9258-061DE45FFC60}.Release|Any CPU.Build.0 = Release|Any CPU
{7A166AB3-8381-45A7-A827-AD42A9EDD863}.Debug|Any CPU.ActiveCfg = Release|Any CPU
{7A166AB3-8381-45A7-A827-AD42A9EDD863}.Debug|Any CPU.Build.0 = Release|Any CPU
{7A166AB3-8381-45A7-A827-AD42A9EDD863}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A166AB3-8381-45A7-A827-AD42A9EDD863}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
38 changes: 37 additions & 1 deletion MHFZ_Overlay/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@
<value>180</value>
</setting>
<setting name="ShowDiscordRPCOverlayMode" serializeAs="String">
<value>True</value>
<value>False</value>
</setting>
<setting name="QuestAttemptsShown" serializeAs="String">
<value>False</value>
Expand Down Expand Up @@ -954,6 +954,42 @@
<setting name="BingoProgressShown" serializeAs="String">
<value>False</value>
</setting>
<setting name="VolumeMain" serializeAs="String">
<value>0.5</value>
</setting>
<setting name="VolumeAchievementUnlock" serializeAs="String">
<value>1</value>
</setting>
<setting name="VolumeChallengeUnlock" serializeAs="String">
<value>1</value>
</setting>
<setting name="VolumeChallengeStart" serializeAs="String">
<value>1</value>
</setting>
<setting name="VolumeHover" serializeAs="String">
<value>1</value>
</setting>
<setting name="VolumeGachaUnlock" serializeAs="String">
<value>1</value>
</setting>
<setting name="VolumeGachaTrial" serializeAs="String">
<value>1</value>
</setting>
<setting name="VolumeSelect" serializeAs="String">
<value>1</value>
</setting>
<setting name="VolumeGachaRare" serializeAs="String">
<value>1</value>
</setting>
<setting name="OverlayWatermarkMode" serializeAs="String">
<value>Final</value>
</setting>
<setting name="DiscordOverlayMode" serializeAs="String">
<value>Automatic</value>
</setting>
<setting name="QuestToggleMonsterModeShown" serializeAs="String">
<value>True</value>
</setting>
</MHFZ_Overlay.Settings>
</userSettings>
</configuration>
2 changes: 1 addition & 1 deletion MHFZ_Overlay/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
https://stackoverflow.com/questions/3425720/xaml-the-property-resources-is-set-more-than-once#3425956
-->
<ResourceDictionary.MergedDictionaries>
<ui:ThemesDictionary Theme="Dark" />
<ui:ThemesDictionary ApplicationTheme="Dark" />
<ui:ControlsDictionary />
<ResourceDictionary Source="./Assets/Themes/CatppuccinMocha.xaml" />
<!--<materialDesign:CustomColorTheme BaseTheme="Dark" PrimaryColor="#a6e3a1" SecondaryColor="#b4befe" />-->
Expand Down
22 changes: 19 additions & 3 deletions MHFZ_Overlay/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ namespace MHFZ_Overlay;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Interop;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Threading;
using MHFZ_Overlay.Models.Constant;
Expand Down Expand Up @@ -93,12 +95,26 @@ protected override void OnStartup(StartupEventArgs e)

// Start the stopwatch
stopwatch.Start();

// https://stackoverflow.com/questions/12729922/how-to-set-cultureinfo-invariantculture-default
CultureInfo culture = CultureInfo.InvariantCulture;

Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;

CultureInfo.DefaultThreadCurrentCulture = culture;
CultureInfo.DefaultThreadCurrentUICulture = culture;

FrameworkElement.LanguageProperty.OverrideMetadata(
typeof(FrameworkElement),
new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.Name)));

var loggingRules = NLog.LogManager.Configuration.LoggingRules;
var s = (Settings)Current.TryFindResource("Settings");
loggingRules[0].SetLoggingLevels(LoggingService.GetLogLevel(s.LogLevel), NLog.LogLevel.Fatal);
Logger.Info(CultureInfo.InvariantCulture, "Started WPF application");
Logger.Trace(CultureInfo.InvariantCulture, "Call stack: {0}", new StackTrace().ToString());
Logger.Debug("OS: {0}, is64BitOS: {1}, is64BitProcess: {2}, CLR version: {3}", Environment.OSVersion, Environment.Is64BitOperatingSystem, Environment.Is64BitProcess, Environment.Version);
Logger.Debug(CultureInfo.InvariantCulture, "OS: {0}, is64BitOS: {1}, is64BitProcess: {2}, CLR version: {3}", Environment.OSVersion, Environment.Is64BitOperatingSystem, Environment.Is64BitProcess, Environment.Version);

// TODO: test if this doesnt conflict with squirrel update
CurrentProgramVersion = $"v{GetAssemblyVersion}";
Expand Down Expand Up @@ -143,14 +159,14 @@ protected override void OnStartup(StartupEventArgs e)
private static void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) =>

// Log/inspect the inspection here
Logger.Error("Unhandled exception\n\nMessage: {0}\n\nStack Trace: {1}\n\nHelp Link: {2}\n\nHResult: {3}\n\nSource: {4}\n\nTarget Site: {5}", e.Exception.Message, e.Exception.StackTrace, e.Exception.HelpLink, e.Exception.HResult, e.Exception.Source, e.Exception.TargetSite);
Logger.Error(CultureInfo.InvariantCulture, "Unhandled exception\n\nMessage: {0}\n\nStack Trace: {1}\n\nHelp Link: {2}\n\nHResult: {3}\n\nSource: {4}\n\nTarget Site: {5}", e.Exception.Message, e.Exception.StackTrace, e.Exception.HelpLink, e.Exception.HResult, e.Exception.Source, e.Exception.TargetSite);

private static void SetRenderingMode(string renderingMode)
{
RenderOptions.ProcessRenderMode = renderingMode == "Hardware"
? RenderMode.Default
: RenderMode.SoftwareOnly;
Logger.Info($"Rendering mode: {renderingMode}");
Logger.Info(CultureInfo.InvariantCulture, $"Rendering mode: {renderingMode}");
}

// https://github.com/Squirrel/Squirrel.Windows/issues/198#issuecomment-299262613
Expand Down
Binary file added MHFZ_Overlay/Assets/Background/10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading