-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
39 lines (36 loc) · 1001 Bytes
/
main.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
package main
import (
"github.com/Cumcord/impregnate/middle"
"github.com/Cumcord/impregnate/src"
"github.com/lexisother/frenyard"
"github.com/lexisother/frenyard/design"
"github.com/lexisother/frenyard/framework"
)
func main() {
frenyard.TargetFrameTime = 0.016
slideContainer := framework.NewUISlideTransitionContainerPtr(nil)
slideContainer.FyEResize(design.SizeWindowInit)
wnd, err := framework.CreateBoundWindow("Impregnate", true, design.ThemeBackground, slideContainer)
if err != nil {
panic(err)
}
design.Setup(frenyard.InferScale(wnd))
wnd.SetSize(design.SizeWindow)
// Ok, now get it ready.
app := (&src.UpApplication{
Config: middle.ReadConfig(),
MainContainer: slideContainer,
Window: wnd,
UpQueued: make(chan func(), 16),
TeleportSettings: framework.SlideTransition{},
})
app.ShowPreface()
// Started!
frenyard.GlobalBackend.Run(func(frameTime float64) {
select {
case fn := <-app.UpQueued:
fn()
default:
}
})
}