diff --git a/implot.cpp b/implot.cpp index 06aef86..5ba1bcb 100644 --- a/implot.cpp +++ b/implot.cpp @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -// ImPlot v0.6 WIP +// ImPlot v0.7 WIP /* @@ -156,6 +156,23 @@ const char* GetStyleColorName(ImPlotCol col) { return col_names[col]; } +const char* GetMarkerName(ImPlotMarker marker) { + switch (marker) { + case ImPlotMarker_None: return "None"; + case ImPlotMarker_Circle: return "Circle"; + case ImPlotMarker_Square: return "Square"; + case ImPlotMarker_Diamond: return "Diamond"; + case ImPlotMarker_Up: return "Up"; + case ImPlotMarker_Down: return "Down"; + case ImPlotMarker_Left: return "Left"; + case ImPlotMarker_Right: return "Right"; + case ImPlotMarker_Cross: return "Cross"; + case ImPlotMarker_Plus: return "Plus"; + case ImPlotMarker_Asterisk: return "Asterisk"; + default: return ""; + } +} + ImVec4 GetAutoColor(ImPlotCol idx) { ImVec4 col(0,0,0,1); switch(idx) { diff --git a/implot.h b/implot.h index fa91743..634a22e 100644 --- a/implot.h +++ b/implot.h @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -// ImPlot v0.6 WIP +// ImPlot v0.7 WIP #pragma once #include "imgui.h" @@ -30,7 +30,7 @@ //----------------------------------------------------------------------------- // ImPlot version string -#define IMPLOT_VERSION "0.6 WIP" +#define IMPLOT_VERSION "0.7 WIP" // Indicates variable should deduced automatically. #define IMPLOT_AUTO -1 // Special color used to indicate that a color should be deduced automatically. @@ -480,6 +480,8 @@ void SetNextErrorBarStyle(const ImVec4& col = IMPLOT_AUTO_COL, float size = IMPL // Returns the null terminated string name for an ImPlotCol. const char* GetStyleColorName(ImPlotCol color); +// Returns the null terminated string name for an ImPlotMarker. +const char* GetMarkerName(ImPlotMarker marker); //----------------------------------------------------------------------------- // Colormaps diff --git a/implot_demo.cpp b/implot_demo.cpp index bf3caf8..36cbe6e 100644 --- a/implot_demo.cpp +++ b/implot_demo.cpp @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -// ImPlot v0.6 WIP +// ImPlot v0.7 WIP #include "implot.h" #include diff --git a/implot_internal.h b/implot_internal.h index f312e58..1f4969d 100644 --- a/implot_internal.h +++ b/implot_internal.h @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -// ImPlot v0.6 WIP +// ImPlot v0.7 WIP // You may use this file to debug, understand or extend ImPlot features but we // don't provide any guarantee of forward compatibility! diff --git a/implot_items.cpp b/implot_items.cpp index aebf2a5..24206a5 100644 --- a/implot_items.cpp +++ b/implot_items.cpp @@ -20,7 +20,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -// ImPlot v0.6 WIP +// ImPlot v0.7 WIP #include "implot.h" #include "implot_internal.h"