mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-03 00:53:47 -04:00
Recording Mode & Enable Autosave in Dusk preset (#685)
* branch for recording without a HUD * no more black bars thanks maddie * Backslash hotkey * mute music * dont check for null twice * renamed option to recording mode, and added it to the rmlui menu * Move recording mode to Interface * re-added & renamed minimal hud option * Mute all BGM if recording mode is on * Update Interface section * Un-experimentalize Autosave & enable in Dusk preset --------- Co-authored-by: MelonSpeedruns <melonspeedruns@stratobox.net> Co-authored-by: Irastris <irastris15@gmail.com> Co-authored-by: Luke Street <luke@street.dev>
This commit is contained in:
+50
-34
@@ -10,11 +10,11 @@
|
||||
#include "dusk/livesplit.h"
|
||||
#include "graphics_tuner.hpp"
|
||||
#include "m_Do/m_Do_main.h"
|
||||
#include "menu_bar.hpp"
|
||||
#include "number_button.hpp"
|
||||
#include "pane.hpp"
|
||||
#include "prelaunch.hpp"
|
||||
#include "ui.hpp"
|
||||
#include "menu_bar.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -340,9 +340,7 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
.getValue =
|
||||
[] {
|
||||
const auto& state = prelaunch_state();
|
||||
if (!state.configuredDiscCanLaunch ||
|
||||
!state.configuredDiscInfo.isPal)
|
||||
{
|
||||
if (!state.configuredDiscCanLaunch || !state.configuredDiscInfo.isPal) {
|
||||
return kLanguageNames[0];
|
||||
}
|
||||
const u8 idx = static_cast<u8>(getSettings().game.language.getValue());
|
||||
@@ -480,7 +478,8 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
.key = "Pause on Focus Lost",
|
||||
.isDisabled = [] { return IsMobile; },
|
||||
});
|
||||
leftPane.register_control(leftPane.add_select_button({
|
||||
leftPane.register_control(
|
||||
leftPane.add_select_button({
|
||||
.key = "Show FPS Counter",
|
||||
.getValue =
|
||||
[] {
|
||||
@@ -499,25 +498,27 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
},
|
||||
}),
|
||||
rightPane, [](Pane& pane) {
|
||||
pane.add_button({
|
||||
.text = "Off",
|
||||
.isSelected =
|
||||
[] { return !getSettings().video.enableFpsOverlay.getValue(); },
|
||||
})
|
||||
pane.add_button(
|
||||
{
|
||||
.text = "Off",
|
||||
.isSelected =
|
||||
[] { return !getSettings().video.enableFpsOverlay.getValue(); },
|
||||
})
|
||||
.on_pressed([] {
|
||||
mDoAud_seStartMenu(kSoundItemChange);
|
||||
getSettings().video.enableFpsOverlay.setValue(false);
|
||||
config::Save();
|
||||
});
|
||||
for (int i = 0; i < static_cast<int>(kFpsOverlayCornerNames.size()); ++i) {
|
||||
pane.add_button({
|
||||
.text = kFpsOverlayCornerNames[i],
|
||||
.isSelected =
|
||||
[i] {
|
||||
return getSettings().video.enableFpsOverlay.getValue() &&
|
||||
getSettings().video.fpsOverlayCorner.getValue() == i;
|
||||
},
|
||||
})
|
||||
pane.add_button(
|
||||
{
|
||||
.text = kFpsOverlayCornerNames[i],
|
||||
.isSelected =
|
||||
[i] {
|
||||
return getSettings().video.enableFpsOverlay.getValue() &&
|
||||
getSettings().video.fpsOverlayCorner.getValue() == i;
|
||||
},
|
||||
})
|
||||
.on_pressed([i] {
|
||||
mDoAud_seStartMenu(kSoundItemChange);
|
||||
getSettings().video.enableFpsOverlay.setValue(true);
|
||||
@@ -743,8 +744,8 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
leftPane.add_section("General");
|
||||
addOption("Mirror Mode", getSettings().game.enableMirrorMode,
|
||||
"Mirrors the world horizontally, matching the Wii version of the game.");
|
||||
addOption("Disable Main HUD", getSettings().game.disableMainHUD,
|
||||
"Disables the main HUD of the game.<br/>Useful for recording or a more immersive "
|
||||
addOption("Minimal HUD", getSettings().game.minimalHUD,
|
||||
"Disables the elements of the main HUD of the game.<br/>Useful for a more immersive "
|
||||
"experience.");
|
||||
addOption("Restore Wii 1.0 Glitches", getSettings().game.restoreWiiGlitches,
|
||||
"Restores patched glitches from Wii USA 1.0, the first released version.");
|
||||
@@ -792,11 +793,8 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
config_bool_select(leftPane, rightPane, getSettings().game.autoSave,
|
||||
{
|
||||
.key = "Autosave",
|
||||
.icon = "warning",
|
||||
.helpText =
|
||||
"Autosaves the game when going to a new area, opening a dungeon door, "
|
||||
"or getting a new item.<br/><br/><icon class=\"warning\"/> Experimental "
|
||||
"feature: Use at your own risk.",
|
||||
.helpText = "Autosaves the game when going to a new area, opening a dungeon door, "
|
||||
"or getting a new item.",
|
||||
});
|
||||
addOption("Instant Saves", getSettings().game.instantSaves,
|
||||
"Skips the delay when writing to the Memory Card.");
|
||||
@@ -884,11 +882,11 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
"Lets the magic armor work without consuming rupees.");
|
||||
});
|
||||
|
||||
// TODO: Reorganize all of this?
|
||||
add_tab("Interface", [this](Rml::Element* content) {
|
||||
auto& leftPane = add_child<Pane>(content, Pane::Type::Controlled);
|
||||
auto& rightPane = add_child<Pane>(content, Pane::Type::Uncontrolled);
|
||||
|
||||
leftPane.add_section("Dusk");
|
||||
config_bool_select(leftPane, rightPane, getSettings().game.enableAchievementNotifications,
|
||||
{
|
||||
.key = "Achievement Notifications",
|
||||
@@ -912,22 +910,40 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {
|
||||
.helpText = "When starting Dusk, skip the main menu and boot straight into the "
|
||||
"game if a disc image is available.",
|
||||
});
|
||||
config_bool_select(leftPane, rightPane, getSettings().game.hideTvSettingsScreen,
|
||||
{
|
||||
.key = "Skip TV Settings Screen",
|
||||
.helpText = "Skips the TV calibration screen shown when loading a save.",
|
||||
});
|
||||
config_bool_select(leftPane, rightPane, getSettings().backend.showPipelineCompilation,
|
||||
{
|
||||
.key = "Show Pipeline Compilation",
|
||||
.helpText = "Show an overlay when shaders are being compiled for your hardware.",
|
||||
});
|
||||
|
||||
config_bool_select(leftPane, rightPane, getSettings().backend.enableAdvancedSettings,
|
||||
{
|
||||
.key = "Enable Advanced Settings",
|
||||
.helpText = "Show the advanced settings on the menu bar.<br/>Most users should have this disabled.",
|
||||
.onChange = [](bool value) { get_document_stack()[0] = std::make_unique<MenuBar>(); },
|
||||
.icon = "warning",
|
||||
.helpText = "Show advanced settings and debugging tools with "
|
||||
"Shift+F1.<br/><br/><icon class=\"warning\"/> WARNING: Debugging tools "
|
||||
"can easily break your game. Do not use on a regular save!",
|
||||
.onChange =
|
||||
[](bool) {
|
||||
for (auto& doc : get_document_stack()) {
|
||||
if (dynamic_cast<MenuBar*>(doc.get())) {
|
||||
doc = std::make_unique<MenuBar>();
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
leftPane.add_section("Game");
|
||||
config_bool_select(leftPane, rightPane, getSettings().game.hideTvSettingsScreen,
|
||||
{
|
||||
.key = "Skip TV Settings Screen",
|
||||
.helpText = "Skips the TV calibration screen shown when loading a save.",
|
||||
});
|
||||
config_bool_select(leftPane, rightPane, getSettings().game.recordingMode,
|
||||
{
|
||||
.key = "Recording Mode",
|
||||
.helpText = "Disables the game HUD and all background music.<br/><br/>Useful for "
|
||||
"recording footage.",
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user