parent
dfaa789464
commit
3f3dee0ea5
|
@ -125,7 +125,7 @@ func DebugGolangWindow(p *gui.Node) *gadgets.BasicWindow {
|
|||
og = w.Box().NewGroup("output").Pad()
|
||||
outputTextbox = og.NewTextbox("outputBox")
|
||||
outputTextbox.Custom = func () {
|
||||
log.Log(INFO, "custom TextBox() for golang output a =", outputTextbox.S)
|
||||
log.Log(INFO, "custom TextBox() for golang output a =", outputTextbox.GetText())
|
||||
}
|
||||
|
||||
return w
|
||||
|
|
4
main.go
4
main.go
|
@ -134,7 +134,7 @@ func dropdownWindow(p *gui.Node) {
|
|||
|
||||
dd := p.NewDropdown("Window Dropdown")
|
||||
dd.Custom = func() {
|
||||
name := dd.S
|
||||
name := dd.GetText()
|
||||
activeWidget = mapWindows[name]
|
||||
setActiveWidget(activeWidget)
|
||||
log.Log(INFO, "The Window was set to", name)
|
||||
|
@ -165,7 +165,7 @@ func dropdownWindowWidgets(p *gui.Node) {
|
|||
|
||||
dd := p.NewDropdown("Window Widgets Dropdown")
|
||||
dd.Custom = func() {
|
||||
name := dd.S
|
||||
name := dd.GetText()
|
||||
activeWidget = mapWindows[name]
|
||||
setActiveWidget(activeWidget)
|
||||
}
|
||||
|
|
28
widget.go
28
widget.go
|
@ -84,7 +84,7 @@ func DebugWidgetWindow(p *gui.Node) *gadgets.BasicWindow {
|
|||
|
||||
g = w.Box().NewGroup("change things")
|
||||
g.NewButton("AddText()", func () {
|
||||
activeWidget.AddText(activeLabelNewName.S)
|
||||
activeWidget.AddText(activeLabelNewName.GetText())
|
||||
/*
|
||||
activeWidget.S = activeLabelNewName.S
|
||||
a := newAction(activeWidget, toolkit.AddText)
|
||||
|
@ -92,9 +92,9 @@ func DebugWidgetWindow(p *gui.Node) *gadgets.BasicWindow {
|
|||
*/
|
||||
})
|
||||
g.NewButton("SetText()", func () {
|
||||
activeWidget.SetText(activeLabelNewName.S)
|
||||
activeWidget.SetText(activeLabelNewName.GetText())
|
||||
/*
|
||||
activeWidget.S = activeLabelNewName.S
|
||||
activeWidget.S = activeLabelNewName.GetText()
|
||||
a := newAction(activeWidget, toolkit.SetText)
|
||||
sendAction(a)
|
||||
*/
|
||||
|
@ -140,7 +140,7 @@ func debugAddWidgetButtons(n *gui.Node) {
|
|||
a.AddText("make something for tim for qflow")
|
||||
a.AddText("and for riscv")
|
||||
a.Custom = func () {
|
||||
log.Log(WARN, "custom dropdown() a =", a.ProgName(), a.S)
|
||||
log.Log(WARN, "custom dropdown() a =", a.ProgName(), a.GetText())
|
||||
}
|
||||
})
|
||||
n.NewButton("Combobox", func () {
|
||||
|
@ -148,7 +148,7 @@ func debugAddWidgetButtons(n *gui.Node) {
|
|||
a.AddText("mirrors.wit.com")
|
||||
a.AddText("go.wit.com")
|
||||
a.Custom = func () {
|
||||
log.Log(WARN, "custom combobox() a =", a.ProgName(), a.S)
|
||||
log.Log(WARN, "custom combobox() a =", a.ProgName(), a.GetText())
|
||||
}
|
||||
})
|
||||
n.NewButton("Grid", func () {
|
||||
|
@ -211,10 +211,10 @@ func debugAddWidgetButton(n *gui.Node) {
|
|||
activeLabelNewType.AddText("Dialog")
|
||||
|
||||
n.NewButton("Add", func () {
|
||||
name := activeLabelNewName.S
|
||||
newX := activeLabelNewX.I
|
||||
newY := activeLabelNewY.I
|
||||
newB := activeLabelNewB.B
|
||||
name := activeLabelNewName.GetText()
|
||||
newX := activeLabelNewX.GetInt()
|
||||
newY := activeLabelNewY.GetInt()
|
||||
newB := activeLabelNewB.GetBool()
|
||||
|
||||
if (newY == -1) {
|
||||
name = name + " (" + strconv.Itoa(activeWidget.NextW) + "," + strconv.Itoa(activeWidget.NextH) + ")"
|
||||
|
@ -223,7 +223,7 @@ func debugAddWidgetButton(n *gui.Node) {
|
|||
name = name + " (" + strconv.Itoa(newX) + "," + strconv.Itoa(newY) + ")"
|
||||
}
|
||||
log.Log(INFO, "New Name =", name)
|
||||
log.Log(INFO, "New Type =", activeLabelNewType.S)
|
||||
log.Log(INFO, "New Type =", activeLabelNewType.GetText())
|
||||
log.Log(INFO, "New X =", newX)
|
||||
log.Log(INFO, "New Y =", newY)
|
||||
log.Log(INFO, "activeWidget.NextW =", activeWidget.NextW)
|
||||
|
@ -234,7 +234,7 @@ func debugAddWidgetButton(n *gui.Node) {
|
|||
// activeWidget.X = newX
|
||||
// activeWidget.Y = newY
|
||||
|
||||
switch activeLabelNewType.S {
|
||||
switch activeLabelNewType.GetText() {
|
||||
case "Grid":
|
||||
activeWidget.NewGrid(name, newX, newY)
|
||||
case "Group":
|
||||
|
@ -248,14 +248,14 @@ func debugAddWidgetButton(n *gui.Node) {
|
|||
case "Checkbox":
|
||||
a := activeWidget.NewCheckbox(name)
|
||||
a.Custom = func () {
|
||||
log.Log(WARN, "custom checkox func a=", a.B)
|
||||
log.Log(WARN, "custom checkox func a=", a.GetBool())
|
||||
}
|
||||
case "Dropdown":
|
||||
a := activeWidget.NewDropdown(name)
|
||||
a.AddText(name + " yay")
|
||||
a.AddText(name + " haha")
|
||||
a.Custom = func () {
|
||||
log.Log(WARN, "WTF a=", a.B)
|
||||
log.Log(WARN, "WTF a=", a.GetBool())
|
||||
}
|
||||
case "Combobox":
|
||||
a := activeWidget.NewCombobox(name)
|
||||
|
@ -270,7 +270,7 @@ func debugAddWidgetButton(n *gui.Node) {
|
|||
case "Spinner":
|
||||
activeWidget.NewSpinner(name, newX, newY)
|
||||
default:
|
||||
log.Error(errors.New("make what type?"), activeLabelNewType.S)
|
||||
log.Error(errors.New("make what type?"), activeLabelNewType.GetText())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue