mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 12:51:42 +00:00
config: added Aspect Ratio option (to be implemented)
This commit is contained in:
parent
ba0e4b204f
commit
b2c3ba8aca
5 changed files with 40 additions and 2 deletions
|
|
@ -35,6 +35,7 @@ public:
|
||||||
CONFIG_DEFINE("Video", int32_t, WindowWidth, 1280);
|
CONFIG_DEFINE("Video", int32_t, WindowWidth, 1280);
|
||||||
CONFIG_DEFINE("Video", int32_t, WindowHeight, 720);
|
CONFIG_DEFINE("Video", int32_t, WindowHeight, 720);
|
||||||
CONFIG_DEFINE_ENUM("Video", EWindowState, WindowState, EWindowState::Normal);
|
CONFIG_DEFINE_ENUM("Video", EWindowState, WindowState, EWindowState::Normal);
|
||||||
|
CONFIG_DEFINE_ENUM_LOCALISED("Video", EAspectRatio, AspectRatio, EAspectRatio::Auto);
|
||||||
|
|
||||||
CONFIG_DEFINE_CALLBACK("Video", float, ResolutionScale, 1.0f,
|
CONFIG_DEFINE_CALLBACK("Video", float, ResolutionScale, 1.0f,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,20 @@ CONFIG_DEFINE_ENUM_TEMPLATE(EWindowState)
|
||||||
{ "Maximized", EWindowState::Maximised }
|
{ "Maximized", EWindowState::Maximised }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class EAspectRatio : uint32_t
|
||||||
|
{
|
||||||
|
Auto,
|
||||||
|
Square,
|
||||||
|
Widescreen
|
||||||
|
};
|
||||||
|
|
||||||
|
CONFIG_DEFINE_ENUM_TEMPLATE(EAspectRatio)
|
||||||
|
{
|
||||||
|
{ "Auto", EAspectRatio::Auto },
|
||||||
|
{ "4:3", EAspectRatio::Square },
|
||||||
|
{ "16:9", EAspectRatio::Widescreen }
|
||||||
|
};
|
||||||
|
|
||||||
enum class EAntiAliasing : uint32_t
|
enum class EAntiAliasing : uint32_t
|
||||||
{
|
{
|
||||||
None = 0,
|
None = 0,
|
||||||
|
|
|
||||||
|
|
@ -192,9 +192,19 @@ CONFIG_DEFINE_LOCALE(BattleTheme)
|
||||||
{ ELanguage::English, { "Battle Theme", "Play the Werehog battle theme during combat.\n\nThis option will apply the next time you're in combat." } }
|
{ ELanguage::English, { "Battle Theme", "Play the Werehog battle theme during combat.\n\nThis option will apply the next time you're in combat." } }
|
||||||
};
|
};
|
||||||
|
|
||||||
CONFIG_DEFINE_LOCALE(WindowSize)
|
CONFIG_DEFINE_LOCALE(AspectRatio)
|
||||||
{
|
{
|
||||||
{ ELanguage::English, { "Window Size", "Adjust the size of the game window in windowed mode." } }
|
{ ELanguage::English, { "Aspect Ratio", "Change the aspect ratio." } }
|
||||||
|
};
|
||||||
|
|
||||||
|
CONFIG_DEFINE_ENUM_LOCALE(EAspectRatio)
|
||||||
|
{
|
||||||
|
{
|
||||||
|
ELanguage::English,
|
||||||
|
{
|
||||||
|
{ EAspectRatio::Auto, { "AUTO", "Auto: the aspect ratio will dynamically adjust to the window size." } }
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CONFIG_DEFINE_LOCALE(ResolutionScale)
|
CONFIG_DEFINE_LOCALE(ResolutionScale)
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,18 @@ inline static std::unordered_map<std::string, std::unordered_map<ELanguage, std:
|
||||||
{ ELanguage::English, "MAX" }
|
{ ELanguage::English, "MAX" }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Options_Name_WindowSize",
|
||||||
|
{
|
||||||
|
{ ELanguage::English, "Window Size" }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"Options_Desc_WindowSize",
|
||||||
|
{
|
||||||
|
{ ELanguage::English, "Adjust the size of the game window in windowed mode." }
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"Options_Desc_NotAvailable",
|
"Options_Desc_NotAvailable",
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -873,6 +873,7 @@ static void DrawConfigOptions()
|
||||||
break;
|
break;
|
||||||
case 3: // VIDEO
|
case 3: // VIDEO
|
||||||
// TODO: expose WindowWidth/WindowHeight as WindowSize.
|
// TODO: expose WindowWidth/WindowHeight as WindowSize.
|
||||||
|
DrawConfigOption(rowCount++, yOffset, &Config::AspectRatio, true);
|
||||||
DrawConfigOption(rowCount++, yOffset, &Config::ResolutionScale, true, nullptr, 0.25f, 1.0f, 2.0f);
|
DrawConfigOption(rowCount++, yOffset, &Config::ResolutionScale, true, nullptr, 0.25f, 1.0f, 2.0f);
|
||||||
DrawConfigOption(rowCount++, yOffset, &Config::Fullscreen, true);
|
DrawConfigOption(rowCount++, yOffset, &Config::Fullscreen, true);
|
||||||
DrawConfigOption(rowCount++, yOffset, &Config::VSync, true);
|
DrawConfigOption(rowCount++, yOffset, &Config::VSync, true);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue