diff --git a/src/mods/Graphics.cpp b/src/mods/Graphics.cpp index 5ca19ec0..614e7863 100644 --- a/src/mods/Graphics.cpp +++ b/src/mods/Graphics.cpp @@ -98,6 +98,7 @@ void Graphics::on_draw_ui() { } if (m_ultrawide_fix->value()) { + m_ultrawide_constrain_ui->draw("Ultrawide: Constrain UI to 16:9"); m_ultrawide_vertical_fov->draw("Ultrawide: Enable Vertical FOV"); m_ultrawide_custom_fov->draw("Ultrawide: Override FOV"); m_ultrawide_fov_multiplier->draw("Ultrawide: FOV Multiplier"); @@ -365,6 +366,10 @@ bool Graphics::on_pre_gui_draw_element(REComponent* gui_element, void* primitive // TODO: Check how this interacts with the other games, could be useful for them too. #if defined(SF6) fix_ui_element(gui_element); +#else + if (m_ultrawide_constrain_ui->value()) { + fix_ui_element(gui_element); + } #endif auto game_object = utility::re_component::get_game_object(gui_element); diff --git a/src/mods/Graphics.hpp b/src/mods/Graphics.hpp index 1f14fb4f..89c9a1df 100644 --- a/src/mods/Graphics.hpp +++ b/src/mods/Graphics.hpp @@ -166,6 +166,7 @@ class Graphics : public Mod { const ModToggle::Ptr m_ultrawide_fix{ ModToggle::create(generate_name("UltrawideFix"), false) }; const ModToggle::Ptr m_ultrawide_vertical_fov{ ModToggle::create(generate_name("UltrawideFixVerticalFOV_V2"), false) }; const ModToggle::Ptr m_ultrawide_custom_fov{ModToggle::create(generate_name("UltrawideCustomFOV"), false)}; + const ModToggle::Ptr m_ultrawide_constrain_ui{ModToggle::create(generate_name("UltrawideConstrainUI"), false)}; const ModSlider::Ptr m_ultrawide_fov_multiplier{ ModSlider::create(generate_name("UltrawideFOVMultiplier_V2"), 0.01f, 3.0f, 1.0f) }; const ModToggle::Ptr m_disable_gui{ ModToggle::create(generate_name("DisableGUI"), false) }; const ModToggle::Ptr m_force_render_res_to_window{ ModToggle::create(generate_name("ForceRenderResToWindow"), false) }; @@ -234,6 +235,7 @@ class Graphics : public Mod { *m_ultrawide_fix, *m_ultrawide_vertical_fov, *m_ultrawide_custom_fov, + *m_ultrawide_constrain_ui, *m_ultrawide_fov_multiplier, *m_disable_gui, *m_force_render_res_to_window,