ENH:Add color for XYZ
Change-Id: I4aa5c5edb35c934906bcd5f848e23e5250023f3a
This commit is contained in:
parent
1f51d775fc
commit
3765c6aed4
1 changed files with 9 additions and 1 deletions
|
@ -283,7 +283,15 @@ void ImGui::TextAlignCenter(const char *label)
|
|||
float item_width = ImGui::CalcItemWidth();
|
||||
float font_size = ImGui::GetFontSize() * strlen(label) / 2;
|
||||
ImGui::SameLine(ImGui::GetCursorPos().x + (item_width - font_size) / 2);
|
||||
ImGui::Text(label);
|
||||
|
||||
if ('X' == *label)
|
||||
ImGui::TextColored(ImVec4(1.0, 0.0, 0.0, 1.0),label);
|
||||
else if ('Y' == *label)
|
||||
ImGui::TextColored(ImVec4(0.0, 0.6, 0.2, 1.0),label);
|
||||
else if ('Z' == *label)
|
||||
ImGui::TextColored(ImVec4(0.0, 0.0, 1.0, 1.0),label);
|
||||
else
|
||||
ImGui::Text(label);
|
||||
}
|
||||
|
||||
void ImGui::TextV(const char* fmt, va_list args)
|
||||
|
|
Loading…
Reference in a new issue