Skip to content

Commit 87b6ff9

Browse files
committed
v2.4.6
1 parent e465ff9 commit 87b6ff9

4 files changed

Lines changed: 34 additions & 19 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Click Sounds Full
1+
# Click Sounds Mega Neo Full Ultra S26 Deluxe Game of the Year Edition + Click Sounds Index: Now with support for keybinds! Change your click and release sounds in the settings menu, which can be accessed from the pause menu or from its Geode page. Unlike ZCB Live, you can mix and match any click and release sounds you want! The Click Sounds Index is also now available, which allows you to easily download and use custom click sound packs from the community. The sounds everywhere option is still just as buggy as before, and I have no idea how to fix it nor do I have plans to fix it! Thank you MXGaming01 for supporting Click Sounds and thank you alicemiku for creating the default click pack that will be present from March to June. If you want to support Click Sounds, consider giving me money! It's completely free and I absolutely love money! Now with over one thousand copyrighted sounds!
22

33
Plays a click sound whenever you press a jump button, or (optionally) a release sound whenever you release a jump button.
44
If you want a new built-in click sound or feature to be added, join the [discord server](https://discord.gg/RwbRP8ADdc). <3

changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Changelog
2+
## Version v2.4.6
3+
* Added a keybind for quickly toggling the 'Sounds Everywhere' setting (unbound by default).
24
## Version v2.4.5
35
* Changed the mod name to more accurately reflect the purpose of the mod.
46
## Version v2.4.4

mod.json

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"geode": "5.4.1",
2+
"geode": "5.5.3",
33
"gd": {
44
"win": "2.2081",
55
"android": "2.2081",
66
"mac": "2.2081",
77
"ios": "2.2081"
88
},
9-
"version": "v2.4.5",
9+
"version": "v2.4.6",
1010
"id": "beat.click-sound",
1111
"name": "Click Sounds Mega Neo Full Ultra S26 Deluxe Game of the Year Edition + Click Sounds Index: Now with support for keybinds! Change your click and release sounds in the settings menu, which can be accessed from the pause menu or from its Geode page. Unlike ZCB Live, you can mix and match any click and release sounds you want! The Click Sounds Index is also now available, which allows you to easily download and use custom click sound packs from the community. The sounds everywhere option is still just as buggy as before, and I have no idea how to fix it nor do I have plans to fix it! Thank you MXGaming01 for supporting Click Sounds and thank you alicemiku for creating the default click pack that will be present from March to June. If you want to support Click Sounds, consider giving me money! It's completely free and I absolutely love money! Now with over one thousand copyrighted sounds!",
1212
"developers": [
@@ -171,17 +171,28 @@
171171
"slider": true
172172
}
173173
},
174-
"advanced-section": {
175-
"name": "Advanced Options",
176-
"type": "title",
177-
"description": "Only touch these if you know what you're doing."
174+
"keybinds-section": {
175+
"name": "Keybinds",
176+
"description": "This category is for settings that are for <cr>Keybind bindings</c>",
177+
"type": "title"
178178
},
179179
"master-toggle-keybind": {
180180
"name": "Master toggle keybind",
181181
"description": "The keybind to toggle all sounds on and off.",
182182
"type": "keybind",
183183
"default": "Ctrl+Shift+F6"
184184
},
185+
"sounds-everywhere-keybind": {
186+
"name": "Sounds everywhere keybind",
187+
"description": "The keybind to toggle the buggy sounds everywhere option on and off.",
188+
"type": "keybind",
189+
"default": ""
190+
},
191+
"advanced-section": {
192+
"name": "Advanced Options",
193+
"type": "title",
194+
"description": "Only touch these if you know what you're doing."
195+
},
185196
"downloadOnStartup": {
186197
"name": "Download index on startup",
187198
"description": "When enabled, the Click Sounds Index will automatically download on startup. This is very data heavy and not recommended for those on cellular data.",

src/Keybinds.cpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,25 @@
22

33
using namespace geode::prelude;
44

5-
$on_mod(Loaded) {
6-
listenForKeybindSettingPresses("master-toggle-keybind", [](Keybind const& keybind, bool down, bool repeat, double timestamp) {
5+
static void registerToggleKeybind(std::string keybindId, std::string settingKey, std::string displayName) {
6+
listenForKeybindSettingPresses(keybindId, [settingKey, displayName](Keybind const& keybind, bool down, bool repeat, double timestamp) {
77
static geode::Ref<Notification> notification;
88
if (down && !repeat) {
9-
if (notification) {
10-
notification->cancel();
11-
}
12-
Mod::get()->setSettingValue<bool>("enable-master", !Mod::get()->getSettingValue<bool>("enable-master"));
9+
if (notification) notification->cancel();
10+
11+
auto newVal = !Mod::get()->getSettingValue<bool>(settingKey);
12+
Mod::get()->setSettingValue<bool>(settingKey, newVal);
13+
1314
notification = Notification::create(
14-
fmt::format("CS: Master has been {}",
15-
Mod::get()->getSettingValue<bool>("enable-master") ? "enabled" : "disabled"
16-
),
17-
CCSprite::createWithSpriteFrameName(
18-
Mod::get()->getSettingValue<bool>("enable-master") ? "GJ_completesIcon_001.png" : "GJ_deleteIcon_001.png"
19-
)
15+
fmt::format("CS: {} has been {}", displayName, newVal ? "enabled" : "disabled"),
16+
CCSprite::createWithSpriteFrameName(newVal ? "GJ_completesIcon_001.png" : "GJ_deleteIcon_001.png")
2017
);
2118
notification->show();
2219
}
2320
});
21+
}
22+
23+
$on_mod(Loaded) {
24+
registerToggleKeybind("master-toggle-keybind", "enable-master", "Master");
25+
registerToggleKeybind("sounds-everywhere-keybind", "sounds-everywhere", "Sounds everywhere");
2426
};

0 commit comments

Comments
 (0)