forked from g3n/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.go
57 lines (52 loc) · 1.33 KB
/
style.go
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Copyright 2016 The G3N Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package gui
import (
"github.com/Cyberselves/engine/math32"
"github.com/Cyberselves/engine/text"
)
// Style contains the styles for all GUI elements
type Style struct {
Color ColorStyle
Font *text.Font
FontIcon *text.Font
Label LabelStyle
Button ButtonStyles
CheckRadio CheckRadioStyles
Edit EditStyles
ScrollBar ScrollBarStyles
Slider SliderStyles
Splitter SplitterStyles
Window WindowStyles
ItemScroller ItemScrollerStyles
Scroller ScrollerStyle
List ListStyles
DropDown DropDownStyles
Folder FolderStyles
Tree TreeStyles
ControlFolder ControlFolderStyles
Menu MenuStyles
Table TableStyles
ImageButton ImageButtonStyles
TabBar TabBarStyles
}
// ColorStyle defines the main colors used.
type ColorStyle struct {
BgDark math32.Color4
BgMed math32.Color4
BgNormal math32.Color4
BgOver math32.Color4
Highlight math32.Color4
Select math32.Color4
Text math32.Color4
TextDis math32.Color4
}
// States that a GUI element can be in
const (
StyleOver = iota + 1
StyleFocus
StyleDisabled
StyleNormal
StyleDef
)