Files
ordoor/internal/wh40k/wh40k.go
Nick Thomas bfe9fbdf7d Start work on menu interactivity.
With this commit, we get a ui.Interface and ui.Widget type. The
interface monitors hover and mouse click state and tells the widgets
about them; the widgets execute code specified by the application when
events occur.

Next step: have wh40k load the main menu and play sound, etc.
2020-03-22 02:58:52 +00:00

34 lines
557 B
Go

// package wh40k implements the full WH40K.EXE functionality, and is used from
// cmd/wh40k/main.go
//
// Entrypoint is Run()
package wh40k
import (
"fmt"
"code.ur.gs/lupine/ordoor/internal/config"
)
type WH40K struct {
Config *config.Config
}
func Run(configFile string) error {
cfg, err := config.Load(configFile)
if err != nil {
return fmt.Errorf("Couldn't load config file: %v", err)
}
wh40k := &WH40K{
Config: cfg,
}
wh40k.PlaySkippableVideo("LOGOS")
wh40k.PlaySkippableVideo("movie1")
// TODO: load main interface
return nil
}