From 286d34cfce230d5f458ee747bbf2702b138b92e9 Mon Sep 17 00:00:00 2001 From: Phil Schumann Date: Wed, 6 Dec 2023 09:45:15 +0100 Subject: [PATCH] Typo fix in README: NavEnableGamepad instead of NavEnableKeyboard intended Plus some minimal fairly-unimportant and minor tweakage =) --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8410375..d09a31b 100644 --- a/README.md +++ b/README.md @@ -259,7 +259,7 @@ Gamepad navigation requires more work, unless you have XInput gamepad, in which ```cpp ImGuiIO& io = ImGui::GetIO(); -io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; +io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; ``` By default, the first active joystick is used for navigation, but you can set joystick id explicitly like this: ```cpp @@ -269,9 +269,16 @@ ImGui::SFML::SetActiveJoystickId(5); High DPI screens ---- -As SFML is not currently DPI aware, your GUI may show at the incorrect scale. This is particularly noticeable on Apple systems with Retina displays. +As SFML is not currently DPI aware, your GUI may show at the incorrect scale. This is particularly noticeable on systems with "Retina" / "4K" / "UHD" displays. + +To work around this on macOS, you can create an app bundle (as opposed to just the exe) then modify the info.plist so that "High Resolution Capable" is set to "NO". + +Another option to help ameliorate this, at least for getting started and for the common ImGui use-case of "developer/debug/building UI", is to explore `FontGlobalScale`: -To fix this on macOS, you can create an app bundle (as opposed to just the exe) then modify the info.plist so that "High Resolution Capable" is set to "NO". +```cpp +ImGuiIO& io = ImGui::GetIO(); +io.FontGlobalScale = 2.0; // or any other value hardcoded or loaded from your config logic +``` License ---