Skip to content

Commit e385d10

Browse files
committed
add setting, start on changelog
1 parent d34d983 commit e385d10

File tree

6 files changed

+34
-15
lines changed

6 files changed

+34
-15
lines changed

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Menu Loop Randomizer Changelog
2+
## v1.12.0
3+
*<c-aaaaaa>Friendly reminder that</c> <cl>some</c> <cj>features</c> <c-aaaaaa>of this mod (including features from this update and features related to bugfixes in this update) require [Better Touch Prio](mod:alk.better-touch-prio) to be installed. These decisions are still here to stay.</c>*
4+
- <cg>Added</c> playback increment/decrement controls.
5+
- You can toggle this option off in the mod settings.
6+
- [Better Touch Prio](mod:alk.better-touch-prio) is <cl>requ</c><cj>ired</c> for this feature.
7+
- <co>Fixed</c> an issue where menu loop positions wouldn't be restored when leaving a level whose most recently played song was also the most recently selected menu loop.
28
## v1.11.3, v1.11.4, and v1.11.5
39
*<c-aaaaaa>Friendly reminder that</c> <cl>some</c> <cj>features</c> <c-aaaaaa>of this mod (including features related to bugfixes in this update) require [Better Touch Prio](mod:alk.better-touch-prio) to be installed. These decisions are still here to stay.</c>*
410
- Fix massive oversights.

mod.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,14 @@
234234
"default": false,
235235
"enable-if": "!randomizeWhenExitingEditor"
236236
},
237+
"useMiniaudioForLength": {
238+
"name": "Use Miniaudio to Find Song Length",
239+
"description": "<c-ff0000>***__IF THE \"BETTER TOUCH PRIO\" MOD BY UNDEFINED0 + ALK1M123 IS NOT INSTALLED, THIS OPTION DOES NOTHING.__***</c>\n\nChoose if you prefer Miniaudio over FMOD for finding the length of a song. If this option is disabled, FMOD will find the lengths of all of your songs instead. This means song length calculations are more precise, but take slightly longer to complete.\n\n<c-aaaaaa>*(Note that in some cases, FMOD may still be used to find the length of a song if Miniaudio fails to do so.)*</c>",
240+
"type": "bool",
241+
"default": true,
242+
"enable-if": "loaded:alk.better-touch-prio",
243+
"platforms": ["win", "mac", "android"]
244+
},
237245
"showScrollingShortcuts": {
238246
"name": "Song List: Show Scrolling Shortcuts",
239247
"description": "Choose if you want scrolling shortcuts in the Song List menu.",
@@ -286,13 +294,12 @@
286294
"default": true,
287295
"enable-if": "loaded:alk.better-touch-prio"
288296
},
289-
"useMiniaudioForLength": {
290-
"name": "Song List: Use Miniaudio to Find Song Length",
291-
"description": "<c-ff0000>***__IF THE \"BETTER TOUCH PRIO\" MOD BY UNDEFINED0 + ALK1M123 IS NOT INSTALLED, THIS OPTION DOES NOTHING.__***</c>\n\nChoose if you prefer Miniaudio over FMOD for finding the length of a song. If this option is disabled, FMOD will find the lengths of all of your songs instead. This means song length calculations are more precise, but take slightly longer to complete.\n\n<c-aaaaaa>*(Note that in some cases, FMOD may still be used to find the length of a song if Miniaudio fails to do so.)*</c>",
297+
"showPlaybackProgressAndControls": {
298+
"name": "Control Panel: Show Playback Progress and Controls",
299+
"description": "<c-ff0000>***__IF THE \"BETTER TOUCH PRIO\" MOD BY UNDEFINED0 + ALK1M123 IS NOT INSTALLED, NO CONTROLS OR PROGRESS BAR WILL APPEAR.__***</c>\n\nChoose if you want to show playback controls and playback progress about the currently playing song in the Control Panel menu.",
292300
"type": "bool",
293301
"default": true,
294-
"enable-if": "loaded:alk.better-touch-prio",
295-
"platforms": ["win", "mac", "android"]
302+
"enable-if": "loaded:alk.better-touch-prio"
296303
},
297304
"specificSongOverride": {
298305
"name": "Specific Menu Loop File Override",

src/SongManager.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,12 @@ bool SongManager::getPauseSongPositionTracking() const {
309309
return m_comingFromGJBGL;
310310
}
311311

312-
void SongManager::setWasPlaying(const bool value) {
313-
m_wasPlaying = value;
312+
void SongManager::setShowPlaybackProgressAndControls(const bool value) {
313+
m_showPlaybackProgressAndControls = value;
314314
}
315315

316-
bool SongManager::getWasPlaying() const {
317-
return m_wasPlaying;
316+
bool SongManager::getShowPlaybackProgressAndControls() const {
317+
return m_showPlaybackProgressAndControls;
318318
}
319319

320320
void SongManager::setFinishedCalculatingSongLengths(const bool value) {

src/SongManager.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ class SongManager {
9494
bool getVibecodedVentilla() const;
9595
void setPauseSongPositionTracking(const bool);
9696
bool getPauseSongPositionTracking() const;
97-
void setWasPlaying(const bool);
98-
bool getWasPlaying() const;
97+
void setShowPlaybackProgressAndControls(const bool);
98+
bool getShowPlaybackProgressAndControls() const;
9999
void setFinishedCalculatingSongLengths(const bool);
100100
bool getFinishedCalculatingSongLengths() const;
101101

@@ -122,7 +122,7 @@ class SongManager {
122122
bool m_shouldRestoreMenuLoopPoint = false;
123123
bool m_vibecodedVentilla = false;
124124
bool m_comingFromGJBGL = false;
125-
bool m_wasPlaying = false;
125+
bool m_showPlaybackProgressAndControls = false;
126126
int m_lastPosition = 0;
127127
std::vector<std::string> m_blacklist {};
128128
std::vector<std::string> m_favorites {};

src/main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,11 @@ bool originalOverrideWasEmpty = false;
194194
if (SongManager::get().getUndefined0Alk1m123TouchPrio() || !showExtraInfoLabel) return;
195195
Utils::showMDPopup("Song List Extra Info Label", USE_BETTER_TOUCH_PRIO_DAMMIT, 20260105, "search-bar-song-sorting");
196196
});
197+
listenForSettingChanges<bool>("showPlaybackProgressAndControls", [](const bool showPlaybackProgressAndControls) {
198+
SongManager::get().setShowPlaybackProgressAndControls(showPlaybackProgressAndControls);
199+
if (SongManager::get().getUndefined0Alk1m123TouchPrio() || !showPlaybackProgressAndControls) return;
200+
Utils::showMDPopup("Control Panel Playback Progress Controls", USE_BETTER_TOUCH_PRIO_DAMMIT, 20260105, "show-playback-progress-controls");
201+
});
197202
listenForSettingChanges<bool>("advancedLogs", [](const bool newAdvancedLogs) {
198203
SongManager::get().setAdvancedLogs(newAdvancedLogs);
199204
});

src/ui/SongControlMenu.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#define REST_OF_THE_OWL this->m_songControlsMenu, this
88
#define DEFAULT_FOOTER_TEXT fmt::format("Hi! Menu Loop Randomizer will never resemble Spotify or its distant cousin EditorMusic. Please respect that. :) [Platform: {}]", Utils::getPlatform())
9+
#define CAN_USE_PLAYBACK_CONTROLS (songManager.getFinishedCalculatingSongLengths() && songManager.getUndefined0Alk1m123TouchPrio() && songManager.getShowPlaybackProgressAndControls())
910

1011
bool SongControlMenu::setup() {
1112
this->setTitle("Menu Loop Randomizer - Control Panel");
@@ -247,7 +248,7 @@ void SongControlMenu::checkDaSongPositions(float) {
247248
}
248249

249250
SongManager& songManager = SongManager::get();
250-
const bool canShowPlaybackProgress = songManager.getFinishedCalculatingSongLengths() && songManager.getUndefined0Alk1m123TouchPrio() && !songManager.isOverride() && !VANILLA_GD_MENU_LOOP_DISABLED;
251+
const bool canShowPlaybackProgress = CAN_USE_PLAYBACK_CONTROLS && !songManager.isOverride() && !VANILLA_GD_MENU_LOOP_DISABLED;
251252

252253
if (this->m_currTimeLb) this->m_currTimeLb->setVisible(canShowPlaybackProgress);
253254
if (this->m_totlTimeLb) this->m_totlTimeLb->setVisible(canShowPlaybackProgress);
@@ -347,7 +348,7 @@ void SongControlMenu::onSettingsButton(CCObject*) {
347348

348349
void SongControlMenu::onSkipBkwdButton(CCObject*) {
349350
SongManager& songManager = SongManager::get();
350-
if (!songManager.getFinishedCalculatingSongLengths() || !songManager.getUndefined0Alk1m123TouchPrio()) return;
351+
if (!CAN_USE_PLAYBACK_CONTROLS || VANILLA_GD_MENU_LOOP_DISABLED) return;
351352

352353
FMODAudioEngine* fmod = FMODAudioEngine::get();
353354
const std::string& currSong = songManager.getCurrentSong();
@@ -373,7 +374,7 @@ void SongControlMenu::onSkipBkwdButton(CCObject*) {
373374

374375
void SongControlMenu::onSkipFwrdButton(CCObject*) {
375376
SongManager& songManager = SongManager::get();
376-
if (!songManager.getFinishedCalculatingSongLengths() || !songManager.getUndefined0Alk1m123TouchPrio()) return;
377+
if (!CAN_USE_PLAYBACK_CONTROLS || VANILLA_GD_MENU_LOOP_DISABLED) return;
377378

378379
FMODAudioEngine* fmod = FMODAudioEngine::get();
379380
const std::string& currSong = songManager.getCurrentSong();

0 commit comments

Comments
 (0)