Skip to content

Commit

Permalink
all: fix build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Jun 5, 2022
1 parent 9fcf375 commit 163ba2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions FontAtlasProsessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
const (
preRegisterString = " \"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
windows = "windows"
defaultFontSize = 14
)

// FontInfo represents a giu implementation of imgui font.
Expand Down
4 changes: 2 additions & 2 deletions Plot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions TextWidgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 163ba2b

Please sign in to comment.