diff --git a/FontAtlasProsessor.go b/FontAtlasProsessor.go index d009d160..986de6bd 100644 --- a/FontAtlasProsessor.go +++ b/FontAtlasProsessor.go @@ -14,6 +14,7 @@ import ( const ( preRegisterString = " \"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" windows = "windows" + defaultFontSize = 14 ) // FontInfo represents a giu implementation of imgui font. diff --git a/Plot.go b/Plot.go index 125eebc1..388047b0 100644 --- a/Plot.go +++ b/Plot.go @@ -392,8 +392,8 @@ func (p *PlotPieChartWidget) Normalize(n bool) *PlotPieChartWidget { } // LabelFormat sets format of labels. -func (p *PlotPieChartWidget) LabelFormat(fmContext.FontAtlas.RegisterString string) *PlotPieChartWidget { - p.labelFormat = fmContext.FontAtlas.RegisterString +func (p *PlotPieChartWidget) LabelFormat(fmtStr string) *PlotPieChartWidget { + p.labelFormat = fmtStr return p } diff --git a/TextWidgets.go b/TextWidgets.go index c893d804..dc6ee2a2 100644 --- a/TextWidgets.go +++ b/TextWidgets.go @@ -73,7 +73,7 @@ func (i *InputTextMultilineWidget) Size(width, height float32) *InputTextMultili func (i *InputTextMultilineWidget) Build() { if imgui.InputTextMultilineV( Context.FontAtlas.RegisterString(i.label), - Context.FontAtlas.RegisterStringPtr(i.text), + Context.FontAtlas.RegisterStringPointer(i.text), imgui.Vec2{ X: i.width, Y: i.height, @@ -229,7 +229,7 @@ func (i *InputTextWidget) Build() { defer PopItemWidth() } - isChanged := imgui.InputTextWithHint(i.label, i.hint, Context.FontAtlas.RegisterStringPtr(i.value), int(i.flags), i.cb) + isChanged := imgui.InputTextWithHint(i.label, i.hint, Context.FontAtlas.RegisterStringPointer(i.value), int(i.flags), i.cb) if isChanged && i.onChange != nil { i.onChange()