MCPcopy Create free account
hub / github.com/brenocq/implot3d / ShowColormapSelector

Function ShowColormapSelector

implot3d.cpp:3031–3046  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3029}
3030
3031bool ShowColormapSelector(const char* label) {
3032 ImPlot3DContext& gp = *GImPlot3D;
3033 bool set = false;
3034 if (ImGui::BeginCombo(label, gp.ColormapData.GetName(gp.Style.Colormap))) {
3035 for (int i = 0; i < gp.ColormapData.Count; ++i) {
3036 const char* name = gp.ColormapData.GetName(i);
3037 if (ImGui::Selectable(name, gp.Style.Colormap == i)) {
3038 gp.Style.Colormap = i;
3039 BustItemCache();
3040 set = true;
3041 }
3042 }
3043 ImGui::EndCombo();
3044 }
3045 return set;
3046}
3047
3048void PushStyleColor(ImPlot3DCol idx, ImU32 col) {
3049 ImPlot3DContext& gp = *GImPlot3D;

Callers 1

DemoConfigFunction · 0.85

Calls 2

BustItemCacheFunction · 0.85
GetNameMethod · 0.80

Tested by

no test coverage detected