blob: 2bc252a1ad03a24b7cd0e6798a1d8c4b3e9fa560 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
package logsettings
import (
"go.wit.com/log"
"go.wit.com/gui/gui"
)
// This initializes the main object
// You can only have one of these
func New(p *gui.Node) *LogSettings {
if myLogGui != nil {return myLogGui}
myLogGui = new(LogSettings)
myLogGui.parent = p
myLogGui.groups = make(map[string]*flagGroup)
myLogGui.ready = true
myLogGui.hidden = true
return myLogGui
}
// Returns true if the status is valid
func (d *LogSettings) Ready() bool {
if d == nil {return false}
if ! d.parent.Ready() {return false}
if (d.win == nil) {
d.draw()
}
return d.ready
}
func (d *LogSettings) Update() bool {
if ! d.Ready() {return false}
return true
}
func (d *LogSettings) ShowFlags() {
log.ShowFlags()
return
}
func (d *LogSettings) SetAll(b bool) {
log.SetAll(b)
return
}
|