diff options
author | 2017-02-27 17:24:36 +0100 | |
---|---|---|
committer | 2017-02-27 17:24:36 +0100 | |
commit | 1ee2c077984d8f1ec5c70f34717220b29db6b98e (patch) | |
tree | 8ce4dd99d2369d9881f1b8d0177fb80a95cb2507 /imagelist.go | |
parent | Button: Add Image property (diff) | |
download | wireguard-windows-1ee2c077984d8f1ec5c70f34717220b29db6b98e.tar.xz wireguard-windows-1ee2c077984d8f1ec5c70f34717220b29db6b98e.zip |
Add support for populating image lists from resource manager
Diffstat (limited to 'imagelist.go')
-rw-r--r-- | imagelist.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/imagelist.go b/imagelist.go index fd1fc90b..6c6c75e0 100644 --- a/imagelist.go +++ b/imagelist.go @@ -136,6 +136,10 @@ func imageIndexAddIfNotExists(image interface{}, hIml win.HIMAGELIST, imageUintp imageIndex := int32(-1) if image != nil { + if name, ok := image.(string); ok { + image, _ = Resources.Image(name) + } + var ptr uintptr switch img := image.(type) { case *Bitmap: |