Documentation ¶
Index ¶
- Variables
- func ConvertColorCodes(inputString string) chat.Message
- func DefaultLatencyColoring(ping int) color.Color
- func DefaultPlayerSorter(k []uuid.UUID, p map[uuid.UUID]TabPlayer, i int, j int) bool
- func DrawTab(players map[uuid.UUID]TabPlayer, tabtop, tabbottom *chat.Message, ...) image.Image
- type LatencyStyling
- type TabParameters
- type TabPlayer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultDiscordBackgroundColor = color.RGBA{R: 0x36, G: 0x39, B: 0x3f, A: 0xff} DefaultPlayerBackgroundColor = color.RGBA{0, 0, 0, 150} )
View Source
var DefaultChatColorCodes = map[string]color.RGBA{
"black": {0, 0, 0, 255},
"dark_blue": {0, 0, 170, 255},
"dark_green": {0, 170, 0, 255},
"dark_aqua": {0, 170, 170, 255},
"dark_red": {170, 0, 0, 255},
"dark_purple": {170, 0, 170, 255},
"gold": {255, 170, 0, 255},
"gray": {170, 170, 170, 255},
"dark_gray": {85, 85, 85, 255},
"blue": {85, 85, 255, 255},
"green": {85, 255, 85, 255},
"aqua": {85, 255, 255, 255},
"red": {255, 85, 85, 255},
"light_purple": {255, 85, 255, 255},
"yellow": {255, 255, 85, 255},
"white": {255, 255, 255, 255},
}
Functions ¶
func ConvertColorCodes ¶
func DefaultLatencyColoring ¶
func DefaultPlayerSorter ¶
Types ¶
type LatencyStyling ¶
type LatencyStyling int
const ( LatencyNumberMs LatencyStyling = iota LatencyNumber )
type TabParameters ¶
type TabParameters struct { // LatencyColoring func that returns color of latency text that you desire // if nil DefaultLatencyColoring is used LatencyColoring func(int) color.Color // LatencyStyle do you want "ms" at the end? LatencyStyle LatencyStyling // ChatColorCodes Issues with color contrast? You can change it here // if nil DefaultChatColorCodes is used ChatColorCodes map[string]color.RGBA // BackgroundColor if nil DefaultDiscordBackgroundColor BackgroundColor color.Color // BackgroundColor if nil DefaultPlayerBackgroundColor PlayerBackgroundColor color.Color // RowSpacing distance between rows RowSpacing float64 // RowAdditionalHeight adds space above and below text in rows (measures to keep weird symbols inside their rows) RowAdditionalHeight float64 // ColumnSpacing distance between columns ColumnSpacing float64 // MaxRows how many rows will be in one column at max MaxRows int FontColor color.Color Font font.Face // OverridePlayerName if not nil can override rendering of particular uuid (must not be multiline), can return nil OverridePlayerName func(uuid.UUID) *chat.Message // SortFunction used to sort player names if nil DefaultPlayerSorter is used (sorts by name) SortFunction func(a []uuid.UUID, p map[uuid.UUID]TabPlayer, i int, j int) bool // LineSpacing spacing between lines in tab text (top and bottom) LineSpacing float64 DebugTopBottom bool DebugHeight bool }
Click to show internal directories.
Click to hide internal directories.