mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
ui: Update a comment about units
This commit is contained in:
parent
c7fee53017
commit
83e24f6d48
6
run.go
6
run.go
@ -53,6 +53,8 @@ func IsRunningSlowly() bool {
|
||||
// The given function f is guaranteed to be called 60 times a second
|
||||
// even if a rendering frame is skipped.
|
||||
// f is not called when the screen is not shown.
|
||||
//
|
||||
// The size unit is device-independent pixel.
|
||||
func Run(f func(*Image) error, width, height int, scale float64, title string) error {
|
||||
ch := make(chan error)
|
||||
go func() {
|
||||
@ -68,6 +70,8 @@ func Run(f func(*Image) error, width, height int, scale float64, title string) e
|
||||
//
|
||||
// Typically, Ebiten users don't have to call this directly.
|
||||
// Instead, functions in github.com/hajimehoshi/ebiten/mobile module call this.
|
||||
//
|
||||
// The size unit is device-independent pixel.
|
||||
func RunWithoutMainLoop(f func(*Image) error, width, height int, scale float64, title string) <-chan error {
|
||||
ch := make(chan error)
|
||||
go func() {
|
||||
@ -83,6 +87,8 @@ func RunWithoutMainLoop(f func(*Image) error, width, height int, scale float64,
|
||||
// SetScreenSize changes the (logical) size of the screen.
|
||||
// This doesn't affect the current scale of the screen.
|
||||
//
|
||||
// Unit is device-independent pixel.
|
||||
//
|
||||
// This function is concurrent-safe.
|
||||
func SetScreenSize(width, height int) {
|
||||
if width <= 0 || height <= 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user