diff options
| author | Jeff Carr <[email protected]> | 2019-05-24 00:04:14 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-24 00:04:14 -0700 |
| commit | 2c1db72a6fa47c4b6049506e9bfe84109bf3cc46 (patch) | |
| tree | 339329c0f76ca79f2b1f4035a655ab4f6f941a8c /gui.go | |
| parent | d65e2507cc5f2c156239a3d440fb4d6edefdf9e6 (diff) | |
formating + standard error box
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gui.go')
| -rw-r--r-- | gui.go | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -23,12 +23,18 @@ type GuiDataStructure struct { ButtonClick func(*ButtonMap) CurrentVM string MyArea *ui.Area + + // general information Version string GitCommit string GoVersion string HomeDir string Debug bool + // official hostname and IPv6 address for this box + Hostname string + IPv6 string + // account entry textboxes AccNick string AccUser string @@ -228,6 +234,23 @@ func CreateAccountButton(account string, custom func(int, string)) *ui.Button { return newB } +func CreateLoginButton(account string, custom func(int, string)) *ui.Button { + name := "Login " + account + newB := ui.NewButton(name) + + newB.OnClicked(defaultButtonClick) + + var newmap ButtonMap + newmap.B = newB + newmap.Note = "LOGIN" + newmap.Name = name + newmap.AccNick = account + newmap.custom = custom + Data.allButtons = append(Data.allButtons, newmap) + + return newB +} + func CreateFontButton(name string, note string, custom func(int, string)) *ui.FontButton { newB := ui.NewFontButton() @@ -271,3 +294,7 @@ func SocketError() { "There was a socket error", "More detailed information can be shown here.") } + +func ErrorWindow(msg1 string, msg2 string) { + ui.MsgBoxError(Data.cloudWindow, msg1, msg2) +} |
