Beispiel #1
0
func Make(dispatcher gin.EventDispatcher, dims Dims, font_path string) (*Gui, error) {
	// err := LoadFontAs(font_path, "standard")
	// if err != nil {
	// 	return nil, err
	// }
	var g Gui
	g.root.EmbeddedWidget = &BasicWidget{CoreWidget: &g.root}
	g.root.Request_dims = dims
	g.root.Render_region.Dims = dims
	dispatcher.RegisterEventListener(&g)
	return &g, nil
}
Beispiel #2
0
func Unmake(dispatcher gin.EventDispatcher, g *Gui) {
	dispatcher.UnregisterEventListener(g)
}