summaryrefslogtreecommitdiffstatshomepage
path: root/imagelist.go
diff options
context:
space:
mode:
authorAlexander Neumann <alexander.neumann@picos-software.com>2017-02-27 17:24:36 +0100
committerAlexander Neumann <alexander.neumann@picos-software.com>2017-02-27 17:24:36 +0100
commit1ee2c077984d8f1ec5c70f34717220b29db6b98e (patch)
tree8ce4dd99d2369d9881f1b8d0177fb80a95cb2507 /imagelist.go
parentButton: Add Image property (diff)
downloadwireguard-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.go4
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: