Improve/add comments
This commit is contained in:
parent
71648dedc1
commit
5ece2b7178
3
grid.go
3
grid.go
@ -16,7 +16,8 @@ type Grid struct {
|
|||||||
Items []*GridItem
|
Items []*GridItem
|
||||||
}
|
}
|
||||||
|
|
||||||
// GridItem represents either a Row or Column in a grid and holds sizing information and other GridItems or widgets
|
// GridItem represents either a Row or Column in a grid.
|
||||||
|
// Holds sizing information and either an []GridItems or a widget.
|
||||||
type GridItem struct {
|
type GridItem struct {
|
||||||
Type gridItemType
|
Type gridItemType
|
||||||
XRatio float64
|
XRatio float64
|
||||||
|
|||||||
12
style.go
12
style.go
@ -1,11 +1,15 @@
|
|||||||
package termui
|
package termui
|
||||||
|
|
||||||
// Color is an integer from -1 to 255
|
// Color is an integer from -1 to 255
|
||||||
|
// -1 = ColorClear
|
||||||
|
// 0-255 = Xterm colors
|
||||||
type Color int
|
type Color int
|
||||||
|
|
||||||
|
// ColorClear clears the Fg or Bg color of a Style
|
||||||
|
const ColorClear Color = -1
|
||||||
|
|
||||||
// Basic terminal colors
|
// Basic terminal colors
|
||||||
const (
|
const (
|
||||||
ColorClear Color = -1
|
|
||||||
ColorBlack Color = 0
|
ColorBlack Color = 0
|
||||||
ColorRed Color = 1
|
ColorRed Color = 1
|
||||||
ColorGreen Color = 2
|
ColorGreen Color = 2
|
||||||