-
Notifications
You must be signed in to change notification settings - Fork 0
/
load.go
33 lines (28 loc) · 928 Bytes
/
load.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
package eui
import (
e_image "github.com/ebitenui/ebitenui/image"
"github.com/ebitenui/ebitenui/widget"
w "github.com/kijimaD/ruins/lib/engine/world"
"github.com/kijimaD/ruins/lib/styles"
"golang.org/x/image/font"
)
// TODO: いい感じにしたい
func LoadButtonImage() *widget.ButtonImage {
idle := e_image.NewNineSliceColor(styles.ButtonIdleColor)
hover := e_image.NewNineSliceColor(styles.ButtonHoverColor)
pressed := e_image.NewNineSliceColor(styles.ButtonPressedColor)
pressedHover := e_image.NewNineSliceColor(styles.ButtonPressedColor)
disabled := e_image.NewNineSliceColor(styles.ButtonPressedColor)
return &widget.ButtonImage{
Idle: idle,
Hover: hover,
Pressed: pressed,
PressedHover: pressedHover,
Disabled: disabled,
}
}
// TODO: いい感じにしたい
func LoadFont(world w.World) *font.Face {
face := (*world.Resources.DefaultFaces)["kappa"]
return &face
}