MCPcopy Create free account
hub / github.com/clementgallet/libTAS / GetAutoColor

Function GetAutoColor

src/external/imgui/implot.cpp:259–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

GetStyleColorVec4Function · 0.85

Calls 2

GetStyleColorVec4Function · 0.85
ImVec4Class · 0.85

Tested by

no test coverage detected