diff --git a/allg5ui/renderer.go b/allg5ui/renderer.go index d4c2fea..bd1b8de 100644 --- a/allg5ui/renderer.go +++ b/allg5ui/renderer.go @@ -200,7 +200,7 @@ func (r *Renderer) CreateTexture(source ui.ImageSource) (ui.Texture, error) { } func (r *Renderer) CreateTextureGo(im image.Image, source bool) (ui.Texture, error) { - return r.createTexture(ui.ImageSourceGo{im}, true) + return r.createTexture(ui.ImageSourceGo{Image: im}, source) } func (r *Renderer) CreateTexturePath(path string, source bool) (ui.Texture, error) { @@ -212,6 +212,9 @@ func (r *Renderer) CreateTexturePath(path string, source bool) (ui.Texture, erro if err != nil { return nil, err } + if source { + return &texture{bmp, ui.ImageSourceResource{Resources: r.res, Name: path}}, nil + } return &texture{bmp, nil}, nil }