mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-04-28 13:17:58 +03:00
Reimplement ImGui Scaling option. (#5124)
This commit is contained in:
parent
112fab503f
commit
05ab17d3a8
2 changed files with 10 additions and 20 deletions
|
@ -68,8 +68,6 @@ static std::unordered_map<Ship::WindowBackend, const char*> windowBackendNames =
|
|||
{ Ship::WindowBackend::FAST3D_SDL_METAL, "Metal" },
|
||||
};
|
||||
|
||||
static const char* imguiScaleOptions[4] = { "Small", "Normal", "Large", "X-Large" };
|
||||
|
||||
static const char* filters[3] = {
|
||||
#ifdef __WIIU__
|
||||
"",
|
||||
|
@ -89,24 +87,6 @@ Ship::WindowBackend configWindowBackend;
|
|||
extern std::shared_ptr<Ship::GuiWindow> mGfxDebuggerWindow;
|
||||
|
||||
void DrawSettingsMenu() {
|
||||
//if (ImGui::BeginMenu("Settings"))
|
||||
//{
|
||||
// if (ImGui::BeginMenu("Graphics")) {
|
||||
// ImGui::Text("ImGui Menu Scale");
|
||||
// ImGui::SameLine();
|
||||
// ImGui::TextColored({ 0.85f, 0.35f, 0.0f, 1.0f }, "(Experimental)");
|
||||
// if (UIWidgets::EnhancementCombobox(CVAR_SETTING("ImGuiScale"), imguiScaleOptions, 1)) {
|
||||
// OTRGlobals::Instance->ScaleImGui();
|
||||
// }
|
||||
// UIWidgets::Tooltip("Changes the scaling of the ImGui menu elements.");
|
||||
|
||||
// // Draw LUS settings menu (such as Overlays Text Font)
|
||||
// Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGameOverlay()->DrawSettings();
|
||||
|
||||
// ImGui::EndMenu();
|
||||
// }
|
||||
// ImGui::EndMenu();
|
||||
//}
|
||||
}
|
||||
|
||||
void SohMenuBar::InitElement() {
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace SohGui {
|
|||
extern std::shared_ptr<SohMenu> mSohMenu;
|
||||
using namespace UIWidgets;
|
||||
static std::unordered_map<int32_t, const char*> languages = {{ LANGUAGE_ENG, "English" }, { LANGUAGE_GER, "German" }, { LANGUAGE_FRA, "French" }};
|
||||
static std::unordered_map<int32_t, const char*> imguiScaleOptions = {{ 0, "Small" }, { 1, "Normal" }, { 2, "Large" }, { 3, "X-Large" }};
|
||||
|
||||
const char* GetGameVersionString(uint32_t index) {
|
||||
uint32_t gameVersion = ResourceMgr_GetGameVersion(index);
|
||||
|
@ -115,6 +116,15 @@ void SohMenu::AddMenuSettings() {
|
|||
AddWidget(path, "Disable Idle Camera Re-Centering", WIDGET_CVAR_CHECKBOX)
|
||||
.CVar(CVAR_SETTING("A11yDisableIdleCam"))
|
||||
.Options(CheckboxOptions().Tooltip("Disables the automatic re-centering of the camera when idle."));
|
||||
AddWidget(path, "EXPERIMENTAL", WIDGET_SEPARATOR_TEXT)
|
||||
.Options(WidgetOptions().Color(Colors::Orange));
|
||||
AddWidget(path, "ImGui Menu Scaling", WIDGET_CVAR_COMBOBOX)
|
||||
.CVar(CVAR_SETTING("ImGuiScale"))
|
||||
.Options(ComboboxOptions().ComboMap(imguiScaleOptions).Tooltip("Changes the scaling of the ImGui menu elements.").DefaultIndex(1)
|
||||
.ComponentAlignment(ComponentAlignment::Right).LabelPosition(LabelPosition::Far))
|
||||
.Callback([](WidgetInfo& info) {
|
||||
OTRGlobals::Instance->ScaleImGui();
|
||||
});
|
||||
|
||||
// General - About
|
||||
path.column = SECTION_COLUMN_2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue