Versions in this module Expand all Collapse all v3 v3.4.0 Mar 12, 2022 Changes in this version type Config + UnlimitedDrawFrameRate bool v3.3.0 Feb 8, 2022 v3.2.2 Jan 8, 2022 v3.2.1 Dec 20, 2021 v3.2.0 Dec 11, 2021 Changes in this version type Config + Driver Driver type Window + LastRelativeMouseEvent mouse.Event v3.1.0 Oct 30, 2021 v3.0.1 Oct 9, 2021 v3.0.0 Sep 18, 2021 Changes in this version + func AddScene(name string, sc scene.Scene) error + func GetBackgroundImage() image.Image + func GetCursorPosition() (x, y float64, err error) + func Height() int + func HideCursor() error + func Init(scene string, configOptions ...ConfigOption) error + func IsDown(key string) bool + func IsHeld(key string) (bool, time.Duration) + func MoveWindow(x, y, w, h int) error + func ScreenShot() *image.RGBA + func SetBackground(b Background) + func SetBorderless(bs bool) error + func SetColorBackground(img image.Image) + func SetDown(key string) + func SetFS(filesystem fs.FS) + func SetFullScreen(fs bool) error + func SetLoadingRenderable(r render.Renderable) + func SetScreen(x, y int) + func SetTitle(title string) error + func SetTopMost(on bool) error + func SetTrayIcon(icon string) error + func SetUp(key string) + func SetViewportBounds(rect intgeom.Rect2) + func ShiftScreen(x, y int) + func ShowNotification(title, msg string, icon bool) error + func UpdateViewSize(w, h int) error + func Width() int + type Assets struct + AudioPath string + ImagePath string + type Background interface + GetRGBA func() *image.RGBA + type BatchLoadOptions struct + BlankOutAudio bool + MaxImageFileSize int64 + type Config struct + Assets Assets + BatchLoad bool + BatchLoadOptions BatchLoadOptions + Borderless bool + Debug Debug + DrawFrameRate int + EnableDebugConsole bool + EventRefreshRate Duration + FrameRate int + Fullscreen bool + GestureSupport bool + IdleDrawFrameRate int + Language string + LoadBuiltinCommands bool + Screen Screen + SkipRNGSeed bool + Title string + TopMost bool + TrackInputChanges bool + func NewConfig(opts ...ConfigOption) (Config, error) + type ConfigOption func(Config) (Config, error) + func FileConfig(filePath string) ConfigOption + func ReaderConfig(r io.Reader) ConfigOption + type Debug struct + Filter string + Level string + type Driver func(f func(screen.Screen)) + type Duration time.Duration + func (d *Duration) UnmarshalJSON(b []byte) error + func (d Duration) MarshalJSON() ([]byte, error) + type InputType = int32 + const InputJoystick + const InputKeyboardMouse + type Screen struct + Height int + Scale float64 + TargetHeight int + TargetWidth int + Width int + X int + Y int + type Window struct + CallerMap *event.CallerMap + CollisionTree *collision.Tree + ControllerID int32 + DrawFrameRate int + DrawStack *render.DrawStack + DrawTicker *time.Ticker + Driver Driver + ErrorScene string + FirstSceneInput interface{} + FrameRate int + IdleDrawFrameRate int + LastMouseEvent mouse.Event + LastMousePress mouse.Event + LoadingR render.Renderable + MouseTree *collision.Tree + ParentContext context.Context + SceneMap *scene.Map + ScreenHeight int + ScreenWidth int + TrackMouseClicks bool + UseAspectRatio bool + func NewWindow() *Window + func (w *Window) AddScene(name string, s scene.Scene) error + func (w *Window) ChangeWindow(width, height int) error + func (w *Window) ClearScreenFilter() + func (w *Window) CollisionTrees() (mouseTree, collisionTree *collision.Tree) + func (w *Window) DoBetweenDraws(f func()) + func (w *Window) EventHandler() event.Handler + func (w *Window) GetBackgroundImage() image.Image + func (w *Window) GetCursorPosition() (x, y float64, err error) + func (w *Window) GetViewportBounds() (rect intgeom.Rect2, ok bool) + func (w *Window) GoToScene(nextScene string) + func (w *Window) Height() int + func (w *Window) HideCursor() error + func (w *Window) InFocus() bool + func (w *Window) Init(firstScene string, configOptions ...ConfigOption) error + func (w *Window) MostRecentInput() InputType + func (w *Window) MoveWindow(x, y, wd, h int) error + func (w *Window) NextScene() + func (w *Window) Propagate(eventName string, me mouse.Event) + func (w *Window) Quit() + func (w *Window) RecordGIF(hundredths int) (stop func() *gif.GIF) + func (w *Window) RemoveViewportBounds() + func (w *Window) ScreenShot() *image.RGBA + func (w *Window) SetAspectRatio(xToY float64) + func (w *Window) SetBackground(b Background) + func (w *Window) SetBorderless(on bool) error + func (w *Window) SetColorBackground(img image.Image) + func (w *Window) SetFullScreen(on bool) error + func (w *Window) SetLoadingRenderable(r render.Renderable) + func (w *Window) SetLogicHandler(h event.Handler) + func (w *Window) SetPalette(palette color.Palette) + func (w *Window) SetScreen(x, y int) + func (w *Window) SetScreenFilter(screenFilter mod.Filter) + func (w *Window) SetTitle(title string) error + func (w *Window) SetTopMost(on bool) error + func (w *Window) SetTrayIcon(icon string) error + func (w *Window) SetViewportBounds(rect intgeom.Rect2) + func (w *Window) ShiftScreen(x, y int) + func (w *Window) ShowNotification(title, msg string, icon bool) error + func (w *Window) TriggerKeyDown(e okey.Event) + func (w *Window) TriggerKeyHeld(e okey.Event) + func (w *Window) TriggerKeyUp(e okey.Event) + func (w *Window) TriggerMouseEvent(mevent omouse.Event) + func (w *Window) UpdateViewSize(width, height int) error + func (w *Window) Viewport() intgeom.Point2 + func (w *Window) ViewportBounds() intgeom.Rect2 + func (w *Window) Width() int v3.0.0-cursorPosition Jun 9, 2021 v3.0.0-beta.1 Jul 6, 2021 v3.0.0-alpha.1 May 23, 2021 Other modules containing this package github.com/oakmound/oak github.com/oakmound/oak/v2 github.com/oakmound/oak/v4