Skip to content

Commit

Permalink
Typo fix in README: NavEnableGamepad instead of NavEnableKeyboard int…
Browse files Browse the repository at this point in the history
…ended

Plus some minimal fairly-unimportant and minor tweakage  =)
  • Loading branch information
metaleap authored and eliasdaler committed Dec 6, 2023
1 parent ba22e6c commit 286d34c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
---
Expand Down

0 comments on commit 286d34c

Please sign in to comment.