0.3.4 Added dialog for adding beads. /JL

This commit is contained in:
2022-12-21 00:36:16 +01:00
parent 39f280e10e
commit 3fa09049eb
3 changed files with 37 additions and 1 deletions
+11
View File
@@ -129,6 +129,17 @@ func NewBeadColor(mw *MyMainWindow, name string, id int, red byte, green byte, b
}
img, _ := walk.NewImageFromFileForDPI("images/plus_alpha.png", 96)
color.add.SetImage(img)
color.add.MouseDown().Attach(func(x, y int, button walk.MouseButton) {
var data Serie
if button == walk.LeftButton {
for _, s := range color.Series {
if s.Name == mw.serie_combo.Text() {
data = *s
}
}
mw.addBeads(name, data, color.ColorID, color.backgroundColor)
}
})
color.info, err = walk.NewImageView(cm)
if err != nil {
log.Println("Error creating info image view: ", err)