diff options
| -rw-r--r-- | debug.go | 15 | ||||
| -rw-r--r-- | gui.go | 4 | ||||
| -rw-r--r-- | mainCloudBox.go | 13 | ||||
| -rw-r--r-- | structs.go | 13 |
4 files changed, 24 insertions, 21 deletions
@@ -30,9 +30,9 @@ func setupCloudUI() { Data.Window1.W.SetChild(Data.Window1.T) Data.Window1.W.SetMargined(true) - Data.tabcount = 0 + // Data.tabcount = 0 Data.Window1.T.Append("Cloud Info", makeCloudInfoBox()) - Data.Window1.T.SetMargined(Data.tabcount, true) + // Data.Window1.T.SetMargined(Data.tabcount, true) Data.Window1.W.Show() } @@ -70,12 +70,23 @@ func addDebuggingButtons(vbox *ui.Box) { vbox.Append(add2button, false) // ATTEMPT TO ADD THE TABLE HERE END + vbox.Append(CreateButton(nil, nil, "Hide & Show Box1&2", "HIDE", runTestHide), false) + vbox.Append(CreateButton(nil, nil, "Close GUI", "QUIT", nil), false) vbox.Append(CreateButton(nil, nil, "DEBUG goroutines", "DEBUG", nil), false) vbox.Append(CreateButton(nil, nil, "xterm", "XTERM", runTestExecClick), false) vbox.Append(CreateButton(nil, nil, "Load test.json config file", "CONFIG", nil), false) } +func runTestHide(b *ButtonMap) { + log.Println("runTestHide START") + Data.Window1.Box1.Hide() + Data.Window1.Box2.Hide() + time.Sleep(2000 * time.Millisecond) + Data.State = "HIDE" + log.Println("runTestHide END") +} + func runPingClick(b *ButtonMap) { log.Println("runPingClick START") log.Println("runTestExecClick b.VM", b.VM) @@ -41,7 +41,7 @@ func InitColumns(mh *TableData, parts []TableColumnData) { } } -func AddTableTab(mytab *ui.Tab, mytabcount int, name string, rowcount int, parts []TableColumnData, account *pb.Account) *TableData { +func AddTableTab(mytab *ui.Tab, junk int, name string, rowcount int, parts []TableColumnData, account *pb.Account) *TableData { mh := new(TableData) mh.RowCount = rowcount @@ -83,7 +83,7 @@ func AddTableTab(mytab *ui.Tab, mytabcount int, name string, rowcount int, parts vbox.Append(table, true) mytab.Append(name, vbox) - mytab.SetMargined(mytabcount, true) + // mytab.SetMargined(mytabcount, true) vbox.Append(ui.NewVerticalSeparator(), false) diff --git a/mainCloudBox.go b/mainCloudBox.go index e4ccb6f..9ab998d 100644 --- a/mainCloudBox.go +++ b/mainCloudBox.go @@ -16,6 +16,7 @@ func makeCloudInfoBox() *ui.Box { hbox.SetPadded(true) if (Data.Debug) { + log.Println("makeCloudInfoBox() add debugging buttons") vbox := ui.NewVerticalBox() vbox.SetPadded(true) hbox.Append(vbox, false) @@ -164,8 +165,8 @@ func ShowAccountQuestionTab() { log.Println("Sleep(200)") time.Sleep(200 * time.Millisecond) - Data.smallBox = AddAccountQuestionBox() - Data.Window1.T.InsertAt("New Account?", 0, Data.smallBox) + Data.Window1.Box2 = AddAccountQuestionBox() + Data.Window1.T.InsertAt("New Account?", 0, Data.Window1.Box2) Data.Window1.T.SetMargined(0, true) } @@ -201,8 +202,8 @@ func ShowMainTab() { log.Println("Sleep(200)") time.Sleep(200 * time.Millisecond) - Data.smallBox = makeCloudInfoBox() - Data.Window1.T.InsertAt("Main", 0, Data.smallBox) + Data.Window1.Box2 = makeCloudInfoBox() + Data.Window1.T.InsertAt("Main", 0, Data.Window1.Box2) Data.Window1.T.SetMargined(0, true) } @@ -235,9 +236,9 @@ func makeCloudWindow() { Data.Window1.W.SetMargined(true) text := makeAttributedString() - Data.Window1.B1 = ShowSplashBox(text) + Data.Window1.Box1 = ShowSplashBox(text) - Data.Window1.T.Append("WIT Splash", Data.Window1.B1) + Data.Window1.T.Append("WIT Splash", Data.Window1.Box1) Data.Window1.T.SetMargined(0, true) Data.Window1.W.Show() @@ -58,12 +58,6 @@ type GuiDataStructure struct { EntryNick *ui.Entry EntryUser *ui.Entry EntryPass *ui.Entry - - // stuff for the splash screen / setup tabs -// cloudBox *ui.Box - smallBox *ui.Box - - tabcount int } type TableColumnData struct { @@ -89,16 +83,13 @@ type EntryMap struct { T *ui.Tab Action string // what type of button - - // custom callback function to your main application -// custom func (*EntryMap) } type WindowMap struct { W *ui.Window - B1 *ui.Box T *ui.Tab - A *ui.Area + Box1 *ui.Box + Box2 *ui.Box AH *AreaHandler } |
