mirror of
https://github.com/gwm17/implot.git
synced 2025-02-21 04:58:52 -05:00
document and demo PlotText colors
This commit is contained in:
parent
df0a159391
commit
510366e12e
2
implot.h
2
implot.h
|
@ -280,7 +280,7 @@ void PlotDigital(const char* label_id, const float* xs, const float* ys, int cou
|
|||
void PlotDigital(const char* label_id, const double* xs, const double* ys, int count, int offset = 0, int stride = sizeof(double));
|
||||
void PlotDigital(const char* label_id, ImPlotPoint (*getter)(void* data, int idx), void* data, int count, int offset = 0);
|
||||
|
||||
// Plots a text label at point x,y.
|
||||
// Plots a text label at point x,y. Text color can be changed with ImGui::PushStyleColor(ImGuiCol_Text, ...).
|
||||
void PlotText(const char* text, float x, float y, bool vertical = false, const ImVec2& pixel_offset = ImVec2(0,0));
|
||||
void PlotText(const char* text, double x, double y, bool vertical = false, const ImVec2& pixel_offset = ImVec2(0,0));
|
||||
|
||||
|
|
|
@ -540,7 +540,10 @@ void ShowDemoWindow(bool* p_open) {
|
|||
|
||||
ImPlot::PlotText("Filled Markers", 1.5, 11.75);
|
||||
ImPlot::PlotText("Open Markers", 6.75, 11.75);
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0,1,0,1));
|
||||
ImPlot::PlotText("Fancy Markers", 4.5, 4.25, true);
|
||||
ImGui::PopStyleColor();
|
||||
|
||||
ImPlot::SetColormap(ImPlotColormap_Default);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user