| 4971 | } |
| 4972 | |
| 4973 | bool 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 | |
| 4990 | bool ShowInputMapSelector(const char* label) { |
| 4991 | static int map_idx = -1; |
no test coverage detected