better display and debugging
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
2ce5732053
commit
682fc29bab
4
area.go
4
area.go
|
@ -107,7 +107,7 @@ func (ah GuiArea) KeyEvent(a *ui.Area, ke *ui.AreaKeyEvent) (handled bool) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func ShowTextBox(gw *GuiWindow, newText *ui.AttributedString, custom func(*GuiButton)) *GuiBox {
|
func ShowTextBox(gw *GuiWindow, newText *ui.AttributedString, custom func(*GuiButton), name string) *GuiBox {
|
||||||
log.Println("ShowTextBox() START")
|
log.Println("ShowTextBox() START")
|
||||||
if (gw == nil) {
|
if (gw == nil) {
|
||||||
log.Println("ShowTextBox() ERROR gw = nil")
|
log.Println("ShowTextBox() ERROR gw = nil")
|
||||||
|
@ -118,7 +118,7 @@ func ShowTextBox(gw *GuiWindow, newText *ui.AttributedString, custom func(*GuiBu
|
||||||
var newbox *GuiBox
|
var newbox *GuiBox
|
||||||
newbox = new(GuiBox)
|
newbox = new(GuiBox)
|
||||||
newbox.Window = gw
|
newbox.Window = gw
|
||||||
newbox.Name = "Hbox1"
|
newbox.Name = name
|
||||||
hbox := ui.NewVerticalBox()
|
hbox := ui.NewVerticalBox()
|
||||||
newbox.UiBox = hbox
|
newbox.UiBox = hbox
|
||||||
|
|
||||||
|
|
16
debug.go
16
debug.go
|
@ -20,6 +20,17 @@ func WatchGUI() {
|
||||||
for {
|
for {
|
||||||
if (count > 20) {
|
if (count > 20) {
|
||||||
log.Println("Sleep() in watchGUI()")
|
log.Println("Sleep() in watchGUI()")
|
||||||
|
if (Config.Debug) {
|
||||||
|
DumpBoxes()
|
||||||
|
}
|
||||||
|
count = 0
|
||||||
|
}
|
||||||
|
count += 1
|
||||||
|
time.Sleep(200 * time.Millisecond)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func DumpBoxes() {
|
||||||
for i, window := range Data.Windows {
|
for i, window := range Data.Windows {
|
||||||
log.Println("watchGUI() Data.Windows", i, "Name =", window.Name)
|
log.Println("watchGUI() Data.Windows", i, "Name =", window.Name)
|
||||||
for name, abox := range window.BoxMap {
|
for name, abox := range window.BoxMap {
|
||||||
|
@ -39,11 +50,6 @@ func WatchGUI() {
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
count = 0
|
|
||||||
}
|
|
||||||
count += 1
|
|
||||||
time.Sleep(200 * time.Millisecond)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func addTableTab() {
|
func addTableTab() {
|
||||||
|
|
Loading…
Reference in New Issue