mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 23:00:42 -07:00
overlay: UI scaling option (#495)
## Link to GitHub Issue, if one exists #477 ## Description of change Add a new option for scaling the overlay. Gitadora Arena will receive 250% by default. Various overlay windows have been updated to scale properly, not perfect but they are at least usable.
This commit is contained in:
@@ -959,6 +959,12 @@ int main_implementation(int argc, char *argv[]) {
|
||||
if (options[launcher::Options::DisableOverlay].value_bool()) {
|
||||
overlay::ENABLED = false;
|
||||
}
|
||||
if (options[launcher::Options::OverlayScaling].is_active() && !cfg::CONFIGURATOR_STANDALONE && !cfg_run) {
|
||||
const auto val = options[launcher::Options::OverlayScaling].value_uint32();
|
||||
if (10 <= val && val <= 400 && val != 100) {
|
||||
overlay::UI_SCALE_PERCENT = options[launcher::Options::OverlayScaling].value_uint32();
|
||||
}
|
||||
}
|
||||
if (options[launcher::Options::DisableAudioHooks].value_bool()) {
|
||||
hooks::audio::ENABLED = false;
|
||||
deferredlogs::defer_error_messages({
|
||||
|
||||
@@ -383,12 +383,24 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
|
||||
.disabled = true,
|
||||
},
|
||||
{
|
||||
// DisableOverlay
|
||||
.title = "Disable Spice Overlay",
|
||||
.name = "overlaydisable",
|
||||
.desc = "Disables the in-game overlay",
|
||||
.type = OptionType::Bool,
|
||||
.category = "Overlay",
|
||||
},
|
||||
{
|
||||
// OverlayScaling
|
||||
.title = "Spice Overlay UI Scale %",
|
||||
.name = "overlayscale",
|
||||
.desc = "Forces UI scaling for the overlay, "
|
||||
"things can look off since the UI was written for 100% scaling. "
|
||||
"Enter value in percentage, between 10-400, inclusive",
|
||||
.type = OptionType::Integer,
|
||||
.setting_name = "200",
|
||||
.category = "Overlay",
|
||||
},
|
||||
{
|
||||
// spice2x_FpsAutoShow
|
||||
.title = "Auto Show FPS/Clock",
|
||||
|
||||
@@ -47,6 +47,7 @@ namespace launcher {
|
||||
SOFTID,
|
||||
VREnable,
|
||||
DisableOverlay,
|
||||
OverlayScaling,
|
||||
spice2x_FpsAutoShow,
|
||||
spice2x_FpsOpposite,
|
||||
spice2x_SubScreenAutoShow,
|
||||
|
||||
Reference in New Issue
Block a user