-
Notifications
You must be signed in to change notification settings - Fork 89
Update settings_overlay.cpp #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1186,6 +1186,12 @@ void DrawStartupScreen() { | |
| const float startY = std::max(0.0f, (viewport->Size.y - titleSize.y) * 0.5f); | ||
| ImGui::SetCursorPos(ImVec2(titleX, startY)); | ||
| ImGui::TextUnformatted(kTitle); | ||
| constexpr const char* kHint = "Press F10 to open settings"; | ||
| const ImVec2 hintSize = ImGui::CalcTextSize(kHint); | ||
| ImGui::SetWindowFontScale(0.8f); | ||
| ImGui::SetCursorPos(ImVec2(std::max(0.0f, (viewport->Size.x - hintSize.x) * 0.5f), | ||
| startY + titleSize.y + 12.0f)); | ||
| ImGui::TextUnformatted(kHint); | ||
|
Comment on lines
+1192
to
+1194
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: rg -n 'HandleEvents' runtime
rg -n 'DrawTopBar|DrawStartupScreen|StartupScreenVisible' runtime/src/settings_overlay.cpp
sed -n '1170,1205p' runtime/src/settings_overlay.cpp
sed -n '1382,1422p' runtime/src/settings_overlay.cpp
sed -n '1448,1480p' runtime/src/settings_overlay.cppRepository: patchzyy/Wiicompiled Length of output: 5792 🏁 Script executed: set -o pipefail
sed -n '80,135p' runtime/include/aurora_events.h
rg -n -A35 -B15 'ApplyInputBlockState|SetTopBarVisible|g_topBarVisible|HandleEvents\(' runtime/src runtime/includeRepository: patchzyy/Wiicompiled Length of output: 43951 🏁 Script executed: rg -n -A12 -B8 'UpdateAuroraAndProcessEvents|ProcessAuroraEvents' runtimeRepository: patchzyy/Wiicompiled Length of output: 8047 Draw the startup screen before the top bar.
Suggested fix- DrawTopBar();
+ DrawStartupScreen();
+ DrawTopBar();
DrawExitPrompt();
controller_mapping_wizard::Draw();
ApplyInputBlockState();
- DrawStartupScreen();🤖 Prompt for AI Agents |
||
| } | ||
| ImGui::End(); | ||
| ImGui::PopStyleVar(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: patchzyy/Wiicompiled
Length of output: 4166
🏁 Script executed:
Repository: patchzyy/Wiicompiled
Length of output: 2420
🏁 Script executed:
Repository: patchzyy/Wiicompiled
Length of output: 242
🏁 Script executed:
Repository: patchzyy/Wiicompiled
Length of output: 4469
🏁 Script executed:
Repository: patchzyy/Wiicompiled
Length of output: 3659
🌐 Web query:
Dear ImGui v1.91.9b-docking source SetWindowFontScale CalcTextSize g.FontSize💡 Result:
🏁 Script executed:
Repository: patchzyy/Wiicompiled
Length of output: 9690
Apply the 0.8 scale before measuring the hint.
CalcTextSize(kHint)runs at the inherited 1.25 scale.SetWindowFontScale(0.8f)then changes the font size used byTextUnformatted, so the hint is drawn narrower thanhintSizeand appears left of center.Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents