Texture-based round corners: Removed polling for Shift key in draw functions, moved that responsibility to demo code.

Minor coding style tweaks. Using IM_ASSERT_PARANOID where suitable.
This commit is contained in:
omar
2019-12-08 15:40:21 +01:00
committed by ocornut
parent ff3e7feba7
commit 1858d8d3f5
3 changed files with 40 additions and 60 deletions

View File

@ -265,7 +265,8 @@ static void TestTextureBasedRender()
ImGui::Begin("tex_round_corners");
ImGui::Text("Hold SHIFT to toggle (%s)", io.KeyShift ? "SHIFT ON -- Using textures." : "SHIFT OFF -- Old method.");
style.TexturedRoundCorners = io.KeyShift;
ImGui::Checkbox("style.TexturedRoundCorners (hold SHIFT to toggle)", &style.TexturedRoundCorners);
static float radius = 16.0f; // ImFontAtlasRoundCornersMaxSize * 0.5f;
static int segments = 20;