1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Merge branch 'master' into 2016-02-colorpicker

This commit is contained in:
ocornut 2016-04-26 11:06:24 +02:00
commit 6bcc31e575
12 changed files with 304 additions and 198 deletions

View file

@ -268,7 +268,7 @@ void ImGui::ShowTestWindow(bool* p_opened)
if (ImGui::CollapsingHeader("Widgets"))
{
if (ImGui::TreeNode("Tree"))
if (ImGui::TreeNode("Trees"))
{
for (int i = 0; i < 5; i++)
{
@ -412,7 +412,7 @@ void ImGui::ShowTestWindow(bool* p_opened)
for (int i = 0; i < 16; i++)
{
ImGui::PushID(i);
if (ImGui::Selectable("Me", &selected[i], 0, ImVec2(50,50)))
if (ImGui::Selectable("Sailor", &selected[i], 0, ImVec2(50,50)))
{
int x = i % 4, y = i / 4;
if (x > 0) selected[i - 1] ^= 1;
@ -1862,7 +1862,7 @@ static void ShowExampleAppCustomRendering(bool* opened)
points.pop_back();
}
}
draw_list->PushClipRect(ImVec4(canvas_pos.x, canvas_pos.y, canvas_pos.x+canvas_size.x, canvas_pos.y+canvas_size.y)); // clip lines within the canvas (if we resize it, etc.)
draw_list->PushClipRect(canvas_pos, ImVec2(canvas_pos.x+canvas_size.x, canvas_pos.y+canvas_size.y)); // clip lines within the canvas (if we resize it, etc.)
for (int i = 0; i < points.Size - 1; i += 2)
draw_list->AddLine(ImVec2(canvas_pos.x + points[i].x, canvas_pos.y + points[i].y), ImVec2(canvas_pos.x + points[i+1].x, canvas_pos.y + points[i+1].y), 0xFF00FFFF, 2.0f);
draw_list->PopClipRect();