Skip to content

Commit

Permalink
common: fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Dec 21, 2024
1 parent d6dd326 commit 0a2ecb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
_ "github.com/AllenDang/cimgui-go/immarkdown"
_ "github.com/AllenDang/cimgui-go/imnodes"
"github.com/AllenDang/cimgui-go/implot"
"github.com/AllenDang/cimgui-go/utils"
)

var (
Expand Down Expand Up @@ -136,8 +137,8 @@ func ShowImPlotDemo() {
imgui.SetNextWindowSizeV(imgui.NewVec2(500, 300), imgui.CondOnce)
imgui.Begin("Plot window")
if implot.BeginPlotV("Plot", imgui.NewVec2(-1, -1), 0) {
implot.PlotBarsS64PtrInt("Bar", barValues, int32(len(barValues)))
implot.PlotLineS64PtrInt("Line", barValues, int32(len(barValues)))
implot.PlotBarsS64PtrInt("Bar", utils.SliceToPtr(barValues), int32(len(barValues)))
implot.PlotLineS64PtrInt("Line", utils.SliceToPtr(barValues), int32(len(barValues)))
implot.EndPlot()
}
imgui.End()
Expand Down

0 comments on commit 0a2ecb5

Please sign in to comment.