mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Demo: Clamping font scale. Added helpers in demo. Comments. Update sponsors. (#3206)
This commit is contained in:
@ -6610,6 +6610,7 @@ ImVec2 ImGui::GetFontTexUvWhitePixel()
|
||||
|
||||
void ImGui::SetWindowFontScale(float scale)
|
||||
{
|
||||
IM_ASSERT(scale > 0.0f);
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiWindow* window = GetCurrentWindow();
|
||||
window->FontWindowScale = scale;
|
||||
@ -6818,6 +6819,7 @@ static void ImGui::ErrorCheckEndFrameSanityChecks()
|
||||
ImGuiContext& g = *GImGui;
|
||||
|
||||
// Verify that io.KeyXXX fields haven't been tampered with. Key mods should not be modified between NewFrame() and EndFrame()
|
||||
// One possible reason leading to this assert is that your back-ends update inputs _AFTER_ NewFrame().
|
||||
const ImGuiKeyModFlags expected_key_mod_flags = GetMergedKeyModFlags();
|
||||
IM_ASSERT(g.IO.KeyMods == expected_key_mod_flags && "Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods");
|
||||
IM_UNUSED(expected_key_mod_flags);
|
||||
|
Reference in New Issue
Block a user