MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / ShowColormapSelector

Function ShowColormapSelector

Source/3rdParty/implot/implot.cpp:4973–4988  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4971}
4972
4973bool ShowColormapSelector(const char* label) {
4974 ImPlotContext& gp = *GImPlot;
4975 bool set = false;
4976 if (ImGui::BeginCombo(label, gp.ColormapData.GetName(gp.Style.Colormap))) {
4977 for (int i = 0; i < gp.ColormapData.Count; ++i) {
4978 const char* name = gp.ColormapData.GetName(i);
4979 if (ImGui::Selectable(name, gp.Style.Colormap == i)) {
4980 gp.Style.Colormap = i;
4981 ImPlot::BustItemCache();
4982 set = true;
4983 }
4984 }
4985 ImGui::EndCombo();
4986 }
4987 return set;
4988}
4989
4990bool ShowInputMapSelector(const char* label) {
4991 static int map_idx = -1;

Callers 1

Demo_ConfigFunction · 0.85

Calls 3

SelectableFunction · 0.85
BustItemCacheFunction · 0.85
GetNameMethod · 0.45

Tested by

no test coverage detected