diff --git a/FontAtlasProsessor.go b/FontAtlasProsessor.go index 21d5a553..f0e3e2f3 100644 --- a/FontAtlasProsessor.go +++ b/FontAtlasProsessor.go @@ -289,7 +289,7 @@ func (a *FontAtlas) rebuildFontAtlas() { } else { fontConfig.SetFontDataOwnedByAtlas(false) fonts.AddFontFromMemoryTTFV( - unsafe.Pointer(imgui.SliceToPtr(fontInfo.fontByte)), //nolint:gosec // we need this here + uintptr(unsafe.Pointer(imgui.SliceToPtr(fontInfo.fontByte))), //nolint:gosec // we need this here int32(len(fontInfo.fontByte)), fontInfo.size, fontConfig, @@ -327,7 +327,7 @@ func (a *FontAtlas) rebuildFontAtlas() { fontConfig := imgui.NewFontConfig() fontConfig.SetFontDataOwnedByAtlas(false) f = fonts.AddFontFromMemoryTTFV( - unsafe.Pointer(imgui.SliceToPtr(fontInfo.fontByte)), //nolint:gosec // we need this here + uintptr(unsafe.Pointer(imgui.SliceToPtr(fontInfo.fontByte))), //nolint:gosec // we need this here int32(len(fontInfo.fontByte)), fontInfo.size, fontConfig, diff --git a/MasterWindow.go b/MasterWindow.go index 029d5b72..d3fc622e 100644 --- a/MasterWindow.go +++ b/MasterWindow.go @@ -74,7 +74,7 @@ type MasterWindow struct { func NewMasterWindow(title string, width, height int, flags MasterWindowFlags) *MasterWindow { imGuiContext := imgui.CreateContext() imgui.PlotCreateContext() - // imgui.ImNodesCreateContext() // TODO after implementing ImNodes in cimgui + imgui.ImNodesCreateContext() io := imgui.CurrentIO() @@ -207,7 +207,7 @@ func (w *MasterWindow) afterRender() { func (w *MasterWindow) beforeDestroy() { imgui.PlotDestroyContext() - // imgui.ImNodesDestroyContext() // TODO: after adding ImNodes (https://github.com/AllenDang/cimgui-go/issues/137) + imgui.ImNodesDestroyContext() } func (w *MasterWindow) render() { diff --git a/Texture.go b/Texture.go index 955cbd80..7f4c5371 100644 --- a/Texture.go +++ b/Texture.go @@ -43,5 +43,5 @@ func (t *Texture) ID() imgui.TextureID { return t.tex.ID() } - return nil + return imgui.TextureID{} } diff --git a/examples/dragdrop/dragdrop.go b/examples/dragdrop/dragdrop.go index 40ce4b4b..cc4f056b 100644 --- a/examples/dragdrop/dragdrop.go +++ b/examples/dragdrop/dragdrop.go @@ -19,7 +19,7 @@ func loop() { data := 9 imgui.SetDragDropPayload( "DND_DEMO", - unsafe.Pointer(&data), + uintptr(unsafe.Pointer(&data)), 0, ) g.Label("9").Build() @@ -32,7 +32,7 @@ func loop() { data := 10 imgui.SetDragDropPayload( "DND_DEMO", - unsafe.Pointer(&data), + uintptr(unsafe.Pointer(&data)), 0, ) g.Label("10").Build() diff --git a/go.mod b/go.mod index fc565724..de88980f 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/AllenDang/giu go 1.21 require ( - github.com/AllenDang/cimgui-go v0.0.0-20231219093052-24bd5dc22643 + github.com/AllenDang/cimgui-go v0.0.0-20240217115856-389161c9afbe github.com/AllenDang/go-findfont v0.0.0-20200702051237-9f180485aeb8 github.com/faiface/mainthread v0.0.0-20171120011319-8b78f0a41ae3 github.com/mazznoer/csscolorparser v0.1.3 diff --git a/go.sum b/go.sum index 05272e0a..bd9dda97 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/AllenDang/cimgui-go v0.0.0-20231219093052-24bd5dc22643 h1:lhxdXiabL5kqRx5VEHOABr8T25J+IbwxNsbmmSLGrEY= -github.com/AllenDang/cimgui-go v0.0.0-20231219093052-24bd5dc22643/go.mod h1:UH0IZCbsJKA1hAVQQU6AIDfamqTk0/d3VucaN8lp1Gs= +github.com/AllenDang/cimgui-go v0.0.0-20240217115856-389161c9afbe h1:hCgPHyxsipQgkSIDoDkFS6/axFK2tDqXgRySwqdYvZc= +github.com/AllenDang/cimgui-go v0.0.0-20240217115856-389161c9afbe/go.mod h1:e6feXR4FrATVY/UrWS3si3KCJOm0wruwbxVI/B85fUM= github.com/AllenDang/go-findfont v0.0.0-20200702051237-9f180485aeb8 h1:dKZMqib/yUDoCFigmz2agG8geZ/e3iRq304/KJXqKyw= github.com/AllenDang/go-findfont v0.0.0-20200702051237-9f180485aeb8/go.mod h1:b4uuDd0s6KRIPa84cEEchdQ9ICh7K0OryZHbSzMca9k= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=