Apply Omar feedback and convert remaining 0xAABBGGRR's into IM_COL32(RR,GG,BB,AA) format.

This commit is contained in:
Michał Cichoń
2016-08-06 10:57:52 +02:00
parent d75d2b1871
commit 1999c01db8
4 changed files with 32 additions and 32 deletions

View File

@ -8849,7 +8849,7 @@ bool ImGui::BeginMenu(const char* label, bool enabled)
tb.y = ta.y + ImMax((tb.y - extra) - ta.y, -100.0f); // triangle is maximum 200 high to limit the slope and the bias toward large sub-menus // FIXME: Multiply by fb_scale?
tc.y = ta.y + ImMin((tc.y + extra) - ta.y, +100.0f);
moving_within_opened_triangle = ImIsPointInTriangle(g.IO.MousePos, ta, tb, tc);
//window->DrawList->PushClipRectFullScreen(); window->DrawList->AddTriangleFilled(ta, tb, tc, moving_within_opened_triangle ? 0x80008000 : 0x80000080); window->DrawList->PopClipRect(); // Debug
//window->DrawList->PushClipRectFullScreen(); window->DrawList->AddTriangleFilled(ta, tb, tc, moving_within_opened_triangle ? IM_COL32(0,128,0,128) : IM_COL32(128,0,0,128)); window->DrawList->PopClipRect(); // Debug
}
}
@ -9205,7 +9205,7 @@ void ImGui::EndGroup()
window->DC.GroupStack.pop_back();
//window->DrawList->AddRect(group_bb.Min, group_bb.Max, 0xFFFF00FF); // Debug
//window->DrawList->AddRect(group_bb.Min, group_bb.Max, IM_COL32(255,0,255,255)); // Debug
}
// Gets back to previous line and continue with horizontal layout
@ -9545,10 +9545,10 @@ void ImGui::ValueColor(const char* prefix, ImU32 v)
SameLine();
ImVec4 col;
col.x = (float)((v >> 0) & 0xFF) / 255.0f;
col.y = (float)((v >> 8) & 0xFF) / 255.0f;
col.z = (float)((v >> 16) & 0xFF) / 255.0f;
col.w = (float)((v >> 24) & 0xFF) / 255.0f;
col.x = (float)((v >> IM_COL32_R_SHIFT) & 0xFF) / 255.0f;
col.y = (float)((v >> IM_COL32_G_SHIFT) & 0xFF) / 255.0f;
col.z = (float)((v >> IM_COL32_B_SHIFT) & 0xFF) / 255.0f;
col.w = (float)((v >> IM_COL32_A_SHIFT) & 0xFF) / 255.0f;
ColorButton(col, true);
}