mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
Stickers: replaced haptics option with double-click tab action
This commit is contained in:
parent
33a99dac8a
commit
30edef14e5
7 changed files with 37 additions and 7 deletions
|
@ -15,6 +15,9 @@ public static partial class BTKUIAddon
|
||||||
private static readonly MultiSelection _desktopKeybindSelection =
|
private static readonly MultiSelection _desktopKeybindSelection =
|
||||||
BTKUILibExtensions.CreateMelonMultiSelection(ModSettings.Entry_PlaceBinding);
|
BTKUILibExtensions.CreateMelonMultiSelection(ModSettings.Entry_PlaceBinding);
|
||||||
|
|
||||||
|
private static readonly MultiSelection _tabDoubleClickSelection =
|
||||||
|
BTKUILibExtensions.CreateMelonMultiSelection(ModSettings.Entry_TabDoubleClick);
|
||||||
|
|
||||||
#region Category Setup
|
#region Category Setup
|
||||||
|
|
||||||
private static void Setup_StickersModCategory()
|
private static void Setup_StickersModCategory()
|
||||||
|
@ -35,8 +38,6 @@ public static partial class BTKUIAddon
|
||||||
|
|
||||||
Button openMultiSelectionButton = _ourCategory.AddButton("Sticker SFX", "Stickers-headset", "Choose the SFX used when a sticker is placed.", ButtonStyle.TextWithIcon);
|
Button openMultiSelectionButton = _ourCategory.AddButton("Sticker SFX", "Stickers-headset", "Choose the SFX used when a sticker is placed.", ButtonStyle.TextWithIcon);
|
||||||
openMultiSelectionButton.OnPress += () => QuickMenuAPI.OpenMultiSelect(_sfxSelection);
|
openMultiSelectionButton.OnPress += () => QuickMenuAPI.OpenMultiSelect(_sfxSelection);
|
||||||
|
|
||||||
_ourCategory.AddMelonToggle(ModSettings.Entry_HapticsOnPlace);
|
|
||||||
|
|
||||||
ToggleButton toggleDesktopKeybindButton = _ourCategory.AddToggle("Use Desktop Keybind", "Should the Desktop keybind be active.", ModSettings.Entry_UsePlaceBinding.Value);
|
ToggleButton toggleDesktopKeybindButton = _ourCategory.AddToggle("Use Desktop Keybind", "Should the Desktop keybind be active.", ModSettings.Entry_UsePlaceBinding.Value);
|
||||||
Button openDesktopKeybindButton = _ourCategory.AddButton("Desktop Keybind", "Stickers-alphabet", "Choose the key binding to place stickers.", ButtonStyle.TextWithIcon);
|
Button openDesktopKeybindButton = _ourCategory.AddButton("Desktop Keybind", "Stickers-alphabet", "Choose the key binding to place stickers.", ButtonStyle.TextWithIcon);
|
||||||
|
@ -46,8 +47,9 @@ public static partial class BTKUIAddon
|
||||||
ModSettings.Entry_UsePlaceBinding.Value = b;
|
ModSettings.Entry_UsePlaceBinding.Value = b;
|
||||||
openDesktopKeybindButton.Disabled = !b;
|
openDesktopKeybindButton.Disabled = !b;
|
||||||
};
|
};
|
||||||
|
|
||||||
//AddMelonToggle(ref _ourCategory, ModSettings.Entry_UsePlaceBinding);
|
Button openTabDoubleClickButton = _ourCategory.AddButton("Tab Double Click", "Stickers-mouse", "Choose the action to perform when double clicking the Stickers tab.", ButtonStyle.TextWithIcon);
|
||||||
|
openTabDoubleClickButton.OnPress += () => QuickMenuAPI.OpenMultiSelect(_tabDoubleClickSelection);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Category Setup
|
#endregion Category Setup
|
||||||
|
|
|
@ -30,7 +30,8 @@ public static partial class BTKUIAddon
|
||||||
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-headset", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-headset.png"));
|
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-headset", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-headset.png"));
|
||||||
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-magnifying-glass", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-magnifying-glass.png"));
|
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-magnifying-glass", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-magnifying-glass.png"));
|
||||||
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-magic-wand", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-magic-wand.png"));
|
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-magic-wand", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-magic-wand.png"));
|
||||||
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-pencil", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-pencil.png"));
|
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-mouse", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-mouse.png"));
|
||||||
|
//QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-pencil", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-pencil.png"));
|
||||||
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-puzzle", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-puzzle.png"));
|
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-puzzle", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-puzzle.png"));
|
||||||
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-rubbish-bin", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-rubbish-bin.png"));
|
QuickMenuAPI.PrepareIcon(ModSettings.ModName, "Stickers-rubbish-bin", BTKUILibExtensions.GetIconStream("Gohsantosadrive_Icons.Stickers-rubbish-bin.png"));
|
||||||
}
|
}
|
||||||
|
@ -82,7 +83,21 @@ public static partial class BTKUIAddon
|
||||||
TimeSpan timeDifference = DateTime.Now - lastTime;
|
TimeSpan timeDifference = DateTime.Now - lastTime;
|
||||||
if (timeDifference.TotalSeconds <= 0.5)
|
if (timeDifference.TotalSeconds <= 0.5)
|
||||||
{
|
{
|
||||||
StickerSystem.Instance.IsInStickerMode = !StickerSystem.Instance.IsInStickerMode;
|
switch (ModSettings.Entry_TabDoubleClick.Value)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
case TabDoubleClick.ToggleStickerMode:
|
||||||
|
OnPlaceStickersButtonClick();
|
||||||
|
break;
|
||||||
|
case TabDoubleClick.ClearAllStickers:
|
||||||
|
OnClearAllStickersButtonClick();
|
||||||
|
break;
|
||||||
|
case TabDoubleClick.ClearSelfStickers:
|
||||||
|
OnClearSelfStickersButtonClick();
|
||||||
|
break;
|
||||||
|
case TabDoubleClick.None:
|
||||||
|
break;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
lastTime = DateTime.Now;
|
lastTime = DateTime.Now;
|
||||||
|
|
|
@ -50,6 +50,9 @@ public static class ModSettings
|
||||||
internal static readonly MelonPreferences_Entry<KeyBind> Entry_PlaceBinding =
|
internal static readonly MelonPreferences_Entry<KeyBind> Entry_PlaceBinding =
|
||||||
Category.CreateEntry("place_binding", KeyBind.G, "Sticker Bind", "The key binding to place stickers.");
|
Category.CreateEntry("place_binding", KeyBind.G, "Sticker Bind", "The key binding to place stickers.");
|
||||||
|
|
||||||
|
internal static readonly MelonPreferences_Entry<TabDoubleClick> Entry_TabDoubleClick =
|
||||||
|
Category.CreateEntry("tab_double_click", TabDoubleClick.ToggleStickerMode, "Tab Double Click", "The action to perform when double clicking the Stickers tab.");
|
||||||
|
|
||||||
internal static readonly MelonPreferences_Entry<string[]> Hidden_SelectedStickerNames =
|
internal static readonly MelonPreferences_Entry<string[]> Hidden_SelectedStickerNames =
|
||||||
Category.CreateEntry("selected_sticker_name", Array.Empty<string>(),
|
Category.CreateEntry("selected_sticker_name", Array.Empty<string>(),
|
||||||
display_name: "Selected Sticker Name",
|
display_name: "Selected Sticker Name",
|
||||||
|
|
BIN
Stickers/Resources/Gohsantosadrive_Icons/Stickers-mouse.png
Normal file
BIN
Stickers/Resources/Gohsantosadrive_Icons/Stickers-mouse.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
Binary file not shown.
Before Width: | Height: | Size: 49 KiB |
|
@ -22,7 +22,6 @@
|
||||||
<None Remove="Resources\Gohsantosadrive_Icons\Stickers-magic-wand.png" />
|
<None Remove="Resources\Gohsantosadrive_Icons\Stickers-magic-wand.png" />
|
||||||
<EmbeddedResource Include="Resources\Gohsantosadrive_Icons\Stickers-magic-wand.png" />
|
<EmbeddedResource Include="Resources\Gohsantosadrive_Icons\Stickers-magic-wand.png" />
|
||||||
<None Remove="Resources\Gohsantosadrive_Icons\Stickers-pencil.png" />
|
<None Remove="Resources\Gohsantosadrive_Icons\Stickers-pencil.png" />
|
||||||
<EmbeddedResource Include="Resources\Gohsantosadrive_Icons\Stickers-pencil.png" />
|
|
||||||
<None Remove="Resources\Gohsantosadrive_Icons\Stickers-puzzle.png" />
|
<None Remove="Resources\Gohsantosadrive_Icons\Stickers-puzzle.png" />
|
||||||
<EmbeddedResource Include="Resources\Gohsantosadrive_Icons\Stickers-puzzle.png" />
|
<EmbeddedResource Include="Resources\Gohsantosadrive_Icons\Stickers-puzzle.png" />
|
||||||
<None Remove="Resources\Gohsantosadrive_Icons\Stickers-rubbish-bin.png" />
|
<None Remove="Resources\Gohsantosadrive_Icons\Stickers-rubbish-bin.png" />
|
||||||
|
@ -31,6 +30,8 @@
|
||||||
<EmbeddedResource Include="Resources\Gohsantosadrive_Icons\Stickers-alphabet.png" />
|
<EmbeddedResource Include="Resources\Gohsantosadrive_Icons\Stickers-alphabet.png" />
|
||||||
<None Remove="Resources\Gohsantosadrive_Icons\Stickers-magnifying-glass.png" />
|
<None Remove="Resources\Gohsantosadrive_Icons\Stickers-magnifying-glass.png" />
|
||||||
<EmbeddedResource Include="Resources\Gohsantosadrive_Icons\Stickers-magnifying-glass.png" />
|
<EmbeddedResource Include="Resources\Gohsantosadrive_Icons\Stickers-magnifying-glass.png" />
|
||||||
|
<None Remove="Resources\Gohsantosadrive_Icons\Stickers-mouse.png" />
|
||||||
|
<EmbeddedResource Include="Resources\Gohsantosadrive_Icons\Stickers-mouse.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="BTKUILib">
|
<Reference Include="BTKUILib">
|
||||||
|
|
9
Stickers/Stickers/Enums/StickerTabDoubleClick.cs
Normal file
9
Stickers/Stickers/Enums/StickerTabDoubleClick.cs
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
namespace NAK.Stickers;
|
||||||
|
|
||||||
|
internal enum TabDoubleClick
|
||||||
|
{
|
||||||
|
ToggleStickerMode,
|
||||||
|
ClearAllStickers,
|
||||||
|
ClearSelfStickers,
|
||||||
|
None
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue