Skip to content

Commit

Permalink
[PR] Fix the UI toggles being inverted
Browse files Browse the repository at this point in the history
The UI controls for toggling BGM per-mount were inverted. This has been fixed, and the UI should now show the BGM state of mounts correctly.
  • Loading branch information
PrincessRTFM committed Jul 11, 2024
1 parent 702ab41 commit d81474d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion AutoMountBgm/AutoMountBgm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Product>AutoMountBGM</Product>
<Version>2.2.1</Version>
<Version>2.2.2</Version>
<Description>Automatically enables/disables mount BGM depending on the mount you use</Description>
<Copyright>Copyleft VariableVixen 2023</Copyright>
</PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions AutoMountBgm/ConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ private void drawMountList() {
bool enableBgm = Plugin.Config.IsBgmEnabled(mount);
if (ImGui.Checkbox($"{mount.Name}###mount{mount.Id}", ref enableBgm)) {
if (enableBgm)
Plugin.Config.BgmDisabledMounts.Add(mount.Id);
Plugin.Config.DisableBgm(mount);
else
Plugin.Config.BgmDisabledMounts.Remove(mount.Id);
Plugin.Config.EnableBgm(mount);
Plugin.Config.Save();
}

Expand Down
2 changes: 1 addition & 1 deletion AutoMountBgm/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public void DisableAll() {
this.DisableBgm(mount);
}

public bool IsBgmEnabled(ushort mountId) => this.BgmDisabledMounts.Contains(mountId);
public bool IsBgmEnabled(ushort mountId) => !this.BgmDisabledMounts.Contains(mountId);
public bool IsBgmEnabled(MountData mount) => this.IsBgmEnabled(mount.Id);
}

0 comments on commit d81474d

Please sign in to comment.