From 06d6494ca79c4eebf2e0da1e5a575637c6be6ee4 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 1 Jul 2017 13:07:44 +0900 Subject: [PATCH] ui: Add comments --- run.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/run.go b/run.go index 60ad4251b..7387901bc 100644 --- a/run.go +++ b/run.go @@ -70,6 +70,8 @@ var theGraphicsContext atomic.Value // even if a rendering frame is skipped. // f is not called when the screen is not shown. // +// The given scale is ignored on fullscreen mode. +// // Run returns error when 1) OpenGL error happens, or 2) f returns error. // In the case of 2), Run returns the same error. // @@ -150,10 +152,23 @@ func SetCursorVisibility(visible bool) { ui.SetCursorVisibility(visible) } +// IsScreen returns a boolean value indicating whether +// the current mode is fullscreen or not. +// +// This function is concurrent-safe. func IsFullscreen() bool { return ui.IsFullscreen() } +// SetFullscreen changes the current mode to fullscreen or not. +// +// On fullscreen mode, the game screen is automatically enlarged +// to fit with the monitor. The current scale value is ignored. +// +// Ebiten uses 'windowed' fullscreen mode, which doesn't change +// your monitor's resolution. +// +// This function is concurrent-safe. func SetFullscreen(fullscreen bool) { ui.SetFullscreen(fullscreen) }