Closed gucio321 closed 2 months ago
@gucio321 plot.go line 214: "imgui.AxisX," I think it should be "imgui.AxisX1" ?
yes...
so cimgui-go is bugged because this shouldn't work now.
AxisX1 = 0
should be
AxisX1 PlotAxisEnum = 0
it appears two times:
in cimplot_enums.go
// original name: ImAxis_
type PlotAxisEnum int32
const (
AxisX1 = 0
AxisX2 = 1
AxisX3 = 2
AxisY1 = 3
AxisY2 = 4
AxisY3 = 5
AxisCOUNT = 6
)
in cimgui_enums.go
// X/Y enums are fixed to 0/1 so they may be used to index ImVec2
// original name: ImGuiAxis
type Axis int32
const (
AxisNone = -1
AxisX = 0
AxisY = 1
)
you are deffinitly right. moreover, it shouldn't compile - this is a bug in cimgui-go. It considers these constants "untyped int" and it interpolates its type.
ok, let me create an excel template for my physical labs and I'll fix that in cimgui-go :smile:
you are deffinitly right. moreover, it shouldn't compile - this is a bug in cimgui-go. It considers these constants "untyped int" and it interpolates its type.
it compiles, because they are different AxisX1 and AxisX, and it works because both are 0
yep, and now after cimgui-go update it shouldn't compile :smnile:
@gucio321 old code was:
it switches to time scale for x-axis, looks like this:
Originally posted by @francmarx in https://github.com/AllenDang/giu/issues/632#issuecomment-1957732626