New function added to clear fader values (reset).
This commit is contained in:
@@ -13,6 +13,7 @@ type FontBase struct {
|
|||||||
Menu font.Face
|
Menu font.Face
|
||||||
Splash font.Face
|
Splash font.Face
|
||||||
BigTitle font.Face
|
BigTitle font.Face
|
||||||
|
MegaTitle font.Face
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -69,4 +70,13 @@ func init() {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SplashFont.MegaTitle, err = opentype.NewFace(tt, &opentype.FaceOptions{
|
||||||
|
Size: 70,
|
||||||
|
DPI: dpi,
|
||||||
|
Hinting: font.HintingVertical,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,6 +145,8 @@ func (b *Bsoft) Update() error {
|
|||||||
if b.curtain.IsComplete() {
|
if b.curtain.IsComplete() {
|
||||||
if b.events[groovy.COMPLETED] != nil {
|
if b.events[groovy.COMPLETED] != nil {
|
||||||
b.events[groovy.COMPLETED]()
|
b.events[groovy.COMPLETED]()
|
||||||
|
b.curtain.Clear()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
b.curtain.Update()
|
b.curtain.Update()
|
||||||
@@ -152,6 +154,11 @@ func (b *Bsoft) Update() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *Fader) Clear() {
|
||||||
|
f.alpha = 0 //reset fader
|
||||||
|
f.counter = 0
|
||||||
|
}
|
||||||
|
|
||||||
func (b *Bsoft) Draw(screen *ebiten.Image) {
|
func (b *Bsoft) Draw(screen *ebiten.Image) {
|
||||||
b.DrawGlitchLogo(screen)
|
b.DrawGlitchLogo(screen)
|
||||||
b.DrawGlitchLogoText(screen)
|
b.DrawGlitchLogoText(screen)
|
||||||
|
|||||||
Reference in New Issue
Block a user