diff --git a/Context.go b/Context.go index f9ad465f..a0590999 100644 --- a/Context.go +++ b/Context.go @@ -43,7 +43,7 @@ type state struct { data Disposable } -// GUIContext represents a giu context. (Current context is giu.Context. +// GIUContext represents a giu context. (Current context is giu.Context. type GIUContext struct { backend backend.Backend[glfwbackend.GLFWWindowFlags] @@ -101,7 +101,7 @@ func (c *GIUContext) IO() *imgui.IO { // invalidAllState should be called before rendering. // it ensures all states are marked as invalid for that moment. func (c *GIUContext) invalidAllState() { - c.state.Range(func(k, v any) bool { + c.state.Range(func(_, v any) bool { if s, ok := v.(*state); ok { c.m.Lock() s.valid = false diff --git a/Plot.go b/Plot.go index e7262065..d13966da 100644 --- a/Plot.go +++ b/Plot.go @@ -6,9 +6,10 @@ import ( "github.com/AllenDang/cimgui-go/implot" ) -// PlotAxis types. type ( + // PlotXAxis allows to chose X axis. PlotXAxis = implot.PlotAxisEnum + // PlotYAxis allows to chose Y axis. PlotYAxis = implot.PlotAxisEnum ) diff --git a/SliderWidgets.go b/SliderWidgets.go index da22dec1..c9d43fd9 100644 --- a/SliderWidgets.go +++ b/SliderWidgets.go @@ -64,6 +64,7 @@ func (s *SliderIntWidget) Labelf(format string, args ...any) *SliderIntWidget { return s.Label(fmt.Sprintf(format, args...)) } +// ID manually sets widget id. func (s *SliderIntWidget) ID(id ID) *SliderIntWidget { s.label = id return s @@ -146,6 +147,7 @@ func (vs *VSliderIntWidget) Labelf(format string, args ...any) *VSliderIntWidget return vs.Label(fmt.Sprintf(format, args...)) } +// ID manually sets widget id. func (vs *VSliderIntWidget) ID(id ID) *VSliderIntWidget { vs.label = id return vs diff --git a/StyleSetter.go b/StyleSetter.go index b52bab39..d23260c6 100644 --- a/StyleSetter.go +++ b/StyleSetter.go @@ -84,6 +84,7 @@ func (ss *StyleSetter) To(widgets ...Widget) *StyleSetter { return ss } +// Range implements Splitable interface. func (ss *StyleSetter) Range(rangeFunc func(w Widget)) { if ss.layout != nil { var result Layout