mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-26 09:18:40 -04:00
Add LetterboxMode enum and update settings
This commit is contained in:
+21
-1
@@ -68,6 +68,13 @@ enum class MagicArmorMode : u8 {
|
||||
COSMETIC = 4,
|
||||
};
|
||||
|
||||
enum class LetterboxMode : u8 {
|
||||
Off = 0,
|
||||
On = 1,
|
||||
CutsceneOnly = 2,
|
||||
GameplayOnly = 3,
|
||||
};
|
||||
|
||||
namespace config {
|
||||
template <>
|
||||
struct ConfigEnumRange<BloomMode> {
|
||||
@@ -123,6 +130,12 @@ struct ConfigEnumRange<MagicArmorMode> {
|
||||
static constexpr auto max = MagicArmorMode::COSMETIC;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ConfigEnumRange<LetterboxMode> {
|
||||
static constexpr auto min = LetterboxMode::Off;
|
||||
static constexpr auto max = LetterboxMode::GameplayOnly;
|
||||
};
|
||||
|
||||
template <>
|
||||
struct ConfigValueTraits<ui::ControlLayout> {
|
||||
static constexpr bool enabled = true;
|
||||
@@ -209,7 +222,7 @@ struct UserSettings {
|
||||
ConfigVar<Resampler> resampler;
|
||||
ConfigVar<bool> enableMapBackground;
|
||||
ConfigVar<bool> disableCutscenePillarboxing;
|
||||
ConfigVar<bool> disableLetterboxing;
|
||||
ConfigVar<LetterboxMode> disableLetterboxing;
|
||||
ConfigVar<bool> enableHighQualityMinimapTextures;
|
||||
|
||||
// Audio
|
||||
@@ -314,6 +327,13 @@ UserSettings& getSettings();
|
||||
|
||||
void registerSettings();
|
||||
|
||||
inline bool isLetterboxingDisabled(bool inCutscene) {
|
||||
const auto mode = getSettings().game.disableLetterboxing.getValue();
|
||||
return mode == LetterboxMode::On ||
|
||||
(mode == LetterboxMode::CutsceneOnly && inCutscene) ||
|
||||
(mode == LetterboxMode::GameplayOnly && !inCutscene);
|
||||
}
|
||||
|
||||
// Transient settings
|
||||
|
||||
struct CollisionViewSettings {
|
||||
|
||||
Reference in New Issue
Block a user