MCPcopy Create free account
hub / github.com/MrDrElliot/LuminaEngine / GetAutoColor

Function GetAutoColor

Engine/Source/ThirdParty/imgui/implot.cpp:262–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262ImVec4 GetAutoColor(ImPlotCol idx) {
263 ImVec4 col(0,0,0,1);
264 switch(idx) {
265 case ImPlotCol_Line: return col; // these are plot dependent!
266 case ImPlotCol_Fill: return col; // these are plot dependent!
267 case ImPlotCol_MarkerOutline: return col; // these are plot dependent!
268 case ImPlotCol_MarkerFill: return col; // these are plot dependent!
269 case ImPlotCol_ErrorBar: return ImGui::GetStyleColorVec4(ImGuiCol_Text);
270 case ImPlotCol_FrameBg: return ImGui::GetStyleColorVec4(ImGuiCol_FrameBg);
271 case ImPlotCol_PlotBg: return ImGui::GetStyleColorVec4(ImGuiCol_WindowBg);
272 case ImPlotCol_PlotBorder: return ImGui::GetStyleColorVec4(ImGuiCol_Border);
273 case ImPlotCol_LegendBg: return ImGui::GetStyleColorVec4(ImGuiCol_PopupBg);
274 case ImPlotCol_LegendBorder: return GetStyleColorVec4(ImPlotCol_PlotBorder);
275 case ImPlotCol_LegendText: return GetStyleColorVec4(ImPlotCol_InlayText);
276 case ImPlotCol_TitleText: return ImGui::GetStyleColorVec4(ImGuiCol_Text);
277 case ImPlotCol_InlayText: return ImGui::GetStyleColorVec4(ImGuiCol_Text);
278 case ImPlotCol_AxisText: return ImGui::GetStyleColorVec4(ImGuiCol_Text);
279 case ImPlotCol_AxisGrid: return GetStyleColorVec4(ImPlotCol_AxisText) * ImVec4(1,1,1,0.25f);
280 case ImPlotCol_AxisTick: return GetStyleColorVec4(ImPlotCol_AxisGrid);
281 case ImPlotCol_AxisBg: return ImVec4(0,0,0,0);
282 case ImPlotCol_AxisBgHovered: return ImGui::GetStyleColorVec4(ImGuiCol_ButtonHovered);
283 case ImPlotCol_AxisBgActive: return ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive);
284 case ImPlotCol_Selection: return ImVec4(1,1,0,1);
285 case ImPlotCol_Crosshairs: return GetStyleColorVec4(ImPlotCol_PlotBorder);
286 default: return col;
287 }
288}
289
290struct ImPlotStyleVarInfo {
291 ImGuiDataType Type;

Callers 1

GetStyleColorVec4Function · 0.85

Calls 2

GetStyleColorVec4Function · 0.85
ImVec4Class · 0.70

Tested by

no test coverage detected