Improve/add comments

This commit is contained in:
Caleb Bassi 2019-02-01 22:16:02 -08:00
parent 71648dedc1
commit 5ece2b7178
4 changed files with 18 additions and 5 deletions

View File

@ -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

View File

@ -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