Lines Matching defs:col

253 void ImGui::TextColored(const ImVec4& col, const char* fmt, ...)
257 TextColoredV(col, fmt, args);
261 void ImGui::TextColoredV(const ImVec4& col, const char* fmt, va_list args)
263 PushStyleColor(ImGuiCol_Text, col);
573 const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
575 RenderFrame(bb.Min, bb.Max, col, true, style.FrameRounding);
647 const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
649 RenderFrame(bb.Min, bb.Max, col, true, g.Style.FrameRounding);
701 ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
703 window->DrawList->AddCircleFilled(bb.GetCenter() + ImVec2(0.0f, -0.5f), g.FontSize * 0.5f + 1.0f, col, 9);
896 const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
898 RenderFrame(bb.Min, bb.Max, col, true, ImClamp((float)ImMin(padding.x, padding.y), 0.0f, style.FrameRounding));
1258 const ImU32 col = GetColorU32(held ? ImGuiCol_SeparatorActive : (hovered && g.HoveredIdTimer >= hover_visibility_delay) ? ImGuiCol_SeparatorHovered : ImGuiCol_Separator);
1259 window->DrawList->AddRectFilled(bb_render.Min, bb_render.Max, col, g.Style.FrameRounding);
3820 bool ImGui::ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags)
3822 return ColorEdit4(label, col, flags | ImGuiColorEditFlags_NoAlpha);
3828 bool ImGui::ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags)
3851 ColorEditOptionsPopup(col, flags);
3867 float f[4] = { col[0], col[1], col[2], alpha ? col[3] : 1.0f };
3951 const ImVec4 col_v4(col[0], col[1], col[2], alpha ? col[3] : 1.0f);
3976 value_changed |= ColorPicker4("##picker", col, picker_flags, &g.ColorPickerRef.x);
3998 col[0] = f[0];
3999 col[1] = f[1];
4000 col[2] = f[2];
4002 col[3] = f[3];
4015 memcpy((float*)col, payload->Data, sizeof(float) * 3); // Preserve alpha if any //-V512
4020 memcpy((float*)col, payload->Data, sizeof(float) * components);
4036 bool ImGui::ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags)
4038 float col4[4] = { col[0], col[1], col[2], 1.0f };
4041 col[0] = col4[0]; col[1] = col4[1]; col[2] = col4[2];
4057 void ImGui::RenderColorRectWithAlphaCheckerboard(ImVec2 p_min, ImVec2 p_max, ImU32 col, float grid_step, ImVec2 grid_off, float rounding, int rounding_corners_flags)
4060 if (((col & IM_COL32_A_MASK) >> IM_COL32_A_SHIFT) < 0xFF)
4062 ImU32 col_bg1 = GetColorU32(ImAlphaBlendColor(IM_COL32(204,204,204,255), col));
4063 ImU32 col_bg2 = GetColorU32(ImAlphaBlendColor(IM_COL32(128,128,128,255), col));
4087 window->DrawList->AddRectFilled(p_min, p_max, col, rounding, rounding_corners_flags);
4102 bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags, const float* ref_col)
4119 ColorPickerOptionsPopup(col, flags);
4140 memcpy(backup_initial_col, col, components * sizeof(float));
4154 ColorConvertRGBtoHSV(col[0], col[1], col[2], H, S, V);
4224 col[3] = 1.0f - ImSaturate((io.MousePos.y - picker_pos.y) / (sv_picker_size-1));
4250 ImVec4 col_v4(col[0], col[1], col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : col[3]);
4260 memcpy(col, ref_col, components * sizeof(float));
4270 ColorConvertHSVtoRGB(H >= 1.0f ? H - 10 * 1e-6f : H, S > 0.0f ? S : 10*1e-6f, V > 0.0f ? V : 1e-6f, col[0], col[1], col[2]);
4280 if (ColorEdit4("##rgb", col, sub_flags | ImGuiColorEditFlags_RGB))
4288 value_changed |= ColorEdit4("##hsv", col, sub_flags | ImGuiColorEditFlags_HSV);
4290 value_changed |= ColorEdit4("##hex", col, sub_flags | ImGuiColorEditFlags_HEX);
4298 ColorConvertRGBtoHSV(col[0], col[1], col[2], new_H, new_S, new_V);
4302 ColorConvertHSVtoRGB(H, S, new_V <= 0 ? V * 0.5f : new_V, col[0], col[1], col[2]);
4304 ColorConvertHSVtoRGB(H, new_S <= 0 ? S * 0.5f : new_S, new_V, col[0], col[1], col[2]);
4310 ImU32 col32_no_alpha = ColorConvertFloat4ToU32(ImVec4(col[0], col[1], col[2], 1.0f));
4386 float alpha = ImSaturate(col[3]);
4397 if (value_changed && memcmp(backup_initial_col, col, components * sizeof(float)) == 0)
4410 bool ImGui::ColorButton(const char* desc_id, const ImVec4& col, ImGuiColorEditFlags flags, ImVec2 size)
4434 ImVec4 col_without_alpha(col.x, col.y, col.z, 1.0f);
4440 if ((flags & ImGuiColorEditFlags_AlphaPreviewHalf) && col.w < 1.0f)
4443 RenderColorRectWithAlphaCheckerboard(ImVec2(bb_inner.Min.x + grid_step, bb_inner.Min.y), bb_inner.Max, GetColorU32(col), grid_step, ImVec2(-grid_step + off, off), rounding, ImDrawCornerFlags_TopRight| ImDrawCornerFlags_BotRight);
4449 ImVec4 col_source = (flags & ImGuiColorEditFlags_AlphaPreview) ? col : col_without_alpha;
4466 SetDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_3F, &col, sizeof(float) * 3, ImGuiCond_Once);
4468 SetDragDropPayload(IMGUI_PAYLOAD_TYPE_COLOR_4F, &col, sizeof(float) * 4, ImGuiCond_Once);
4469 ColorButton(desc_id, col, flags);
4477 ColorTooltip(desc_id, &col.x, flags & (ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf));
4501 void ImGui::ColorTooltip(const char* text, const float* col, ImGuiColorEditFlags flags)
4505 int cr = IM_F32_TO_INT8_SAT(col[0]), cg = IM_F32_TO_INT8_SAT(col[1]), cb = IM_F32_TO_INT8_SAT(col[2]), ca = (flags & ImGuiColorEditFlags_NoAlpha) ? 255 : IM_F32_TO_INT8_SAT(col[3]);
4516 ColorButton("##preview", ImVec4(col[0], col[1], col[2], col[3]), (flags & (ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf)) | ImGuiColorEditFlags_NoTooltip, sz);
4519 Text("#%02X%02X%02X\nR: %d, G: %d, B: %d\n(%.3f, %.3f, %.3f)", cr, cg, cb, cr, cg, cb, col[0], col[1], col[2]);
4521 Text("#%02X%02X%02X%02X\nR:%d, G:%d, B:%d, A:%d\n(%.3f, %.3f, %.3f, %.3f)", cr, cg, cb, ca, cr, cg, cb, ca, col[0], col[1], col[2], col[3]);
4525 void ImGui::ColorEditOptionsPopup(const float* col, ImGuiColorEditFlags flags)
4552 int cr = IM_F32_TO_INT8_SAT(col[0]), cg = IM_F32_TO_INT8_SAT(col[1]), cb = IM_F32_TO_INT8_SAT(col[2]), ca = (flags & ImGuiColorEditFlags_NoAlpha) ? 255 : IM_F32_TO_INT8_SAT(col[3]);
4554 ImFormatString(buf, IM_ARRAYSIZE(buf), "(%.3ff, %.3ff, %.3ff, %.3ff)", col[0], col[1], col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : col[3]);
4864 const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
4870 RenderFrame(frame_bb.Min, frame_bb.Max, col, true, style.FrameRounding);
4892 RenderFrame(frame_bb.Min, frame_bb.Max, col, false);
5091 const ImU32 col = GetColorU32((held && hovered) ? ImGuiCol_HeaderActive : hovered ? ImGuiCol_HeaderHovered : ImGuiCol_Header);
5092 RenderFrame(bb.Min, bb.Max, col, false, 0.0f);
5916 const ImU32 col = GetColorU32((flags & ImGuiTabBarFlags_IsFocused) ? ImGuiCol_TabActive : ImGuiCol_Tab);
5921 window->DrawList->AddLine(ImVec2(separator_min_x, y), ImVec2(separator_max_x, y), col, 1.0f);
6555 void ImGui::TabItemBackground(ImDrawList* draw_list, const ImRect& bb, ImGuiTabItemFlags flags, ImU32 col)
6569 draw_list->PathFillConvex(col);