summaryrefslogtreecommitdiff
path: root/slider.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-03-01 11:35:36 -0600
committerJeff Carr <[email protected]>2023-03-01 11:35:36 -0600
commit8dbf5a09097b7868e9218bf98716c57eac998a10 (patch)
treeab3bdfeaf5a59a55de9d2a6661d2d824090491e5 /slider.go
parentf3bb68396afa7452ecf1c8d4744c825a9d81057c (diff)
lots cleaner code between the pluginv0.6.1
Queue() around SetText is helping userspace crashing merge forceDump(bool) into Dump() debugging output configuration is pretty clean keep cutting down duplicate things --gui-verbose flag works make label "standard" code add debug.FreeOSMemory() move the GO language internals to display in the GUI update push to do tags and go to github.com/wit-go/ remove the other license file it might be confusing golang.org and github proper WidgetType added a Quit() button Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'slider.go')
-rw-r--r--slider.go26
1 files changed, 10 insertions, 16 deletions
diff --git a/slider.go b/slider.go
index 35867a3..300fc8f 100644
--- a/slider.go
+++ b/slider.go
@@ -1,22 +1,16 @@
package gui
-func (n *Node) NewSlider(name string, x int, y int) *Node {
- newNode := n.New(name, "Slider")
- newNode.Widget.X = x
- newNode.Widget.Y = y
-
- newNode.Widget.Custom = func() {
- log(debugGui, "even newer clicker() name in NewSlider", newNode.Widget)
- }
+import (
+ "git.wit.org/wit/gui/toolkit"
+)
- for _, aplug := range allPlugins {
- log(debugGui, "gui.NewSlider() aplug =", aplug.name, "name =", newNode.Widget.Name)
- if (aplug.NewSlider == nil) {
- log(debugGui, "\tgui.NewSlider() aplug.NewSlider = nil", aplug.name)
- continue
- }
- aplug.NewSlider(&n.Widget, &newNode.Widget)
- }
+func (n *Node) NewSlider(name string, x int, y int) *Node {
+ newNode := n.New(name, toolkit.Slider, func() {
+ log(debugGui, "even newer clicker() name in NewSlider name =", name)
+ })
+ newNode.widget.X = x
+ newNode.widget.Y = y
+ send(n, newNode)
return newNode
}