1 package etk
2
3 import (
4 "image/color"
5
6 "golang.org/x/image/font/sfnt"
7 )
8
9 var transparent = color.RGBA{0, 0, 0, 0}
10
11
12 type Attributes struct {
13 TextFont *sfnt.Font
14 TextSize int
15
16 TextColorLight color.RGBA
17 TextColorDark color.RGBA
18
19 TextBgColor color.RGBA
20
21 ButtonBorderSize int
22 ButtonBorderTop color.RGBA
23 ButtonBorderRight color.RGBA
24 ButtonBorderBottom color.RGBA
25 ButtonBorderLeft color.RGBA
26
27 InputBorderSize int
28 InputBorderFocused color.RGBA
29 InputBorderUnfocused color.RGBA
30
31 ScrollAreaColor color.RGBA
32 ScrollHandleColor color.RGBA
33
34 ScrollBorderSize int
35 ScrollBorderTop color.RGBA
36 ScrollBorderRight color.RGBA
37 ScrollBorderBottom color.RGBA
38 ScrollBorderLeft color.RGBA
39
40 InputBgColor color.RGBA
41
42 ButtonTextColor color.RGBA
43 ButtonBgColor color.RGBA
44 ButtonBgColorDisabled color.RGBA
45 }
46
47
48 var Style = &Attributes{
49 TextSize: 32,
50
51 TextColorLight: color.RGBA{255, 255, 255, 255},
52 TextColorDark: color.RGBA{0, 0, 0, 255},
53
54 TextBgColor: transparent,
55
56 ButtonBorderSize: 4,
57 ButtonBorderTop: color.RGBA{220, 220, 220, 255},
58 ButtonBorderRight: color.RGBA{0, 0, 0, 255},
59 ButtonBorderBottom: color.RGBA{0, 0, 0, 255},
60 ButtonBorderLeft: color.RGBA{220, 220, 220, 255},
61
62 InputBorderSize: 2,
63 InputBorderFocused: color.RGBA{220, 220, 220, 255},
64 InputBorderUnfocused: color.RGBA{0, 0, 0, 255},
65
66 ScrollAreaColor: color.RGBA{200, 200, 200, 255},
67 ScrollHandleColor: color.RGBA{108, 108, 108, 255},
68
69 ScrollBorderSize: 2,
70 ScrollBorderTop: color.RGBA{240, 240, 240, 255},
71 ScrollBorderRight: color.RGBA{0, 0, 0, 255},
72 ScrollBorderBottom: color.RGBA{0, 0, 0, 255},
73 ScrollBorderLeft: color.RGBA{240, 240, 240, 255},
74
75 InputBgColor: color.RGBA{0, 64, 0, 255},
76
77 ButtonBgColor: color.RGBA{255, 255, 255, 255},
78 ButtonBgColorDisabled: color.RGBA{110, 110, 110, 255},
79 }
80
View as plain text