mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18: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
|
// The given function f is guaranteed to be called 60 times a second
|
||||||
// even if a rendering frame is skipped.
|
// even if a rendering frame is skipped.
|
||||||
// f is not called when the screen is not shown.
|
// 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 {
|
func Run(f func(*Image) error, width, height int, scale float64, title string) error {
|
||||||
ch := make(chan error)
|
ch := make(chan error)
|
||||||
go func() {
|
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.
|
// Typically, Ebiten users don't have to call this directly.
|
||||||
// Instead, functions in github.com/hajimehoshi/ebiten/mobile module call this.
|
// 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 {
|
func RunWithoutMainLoop(f func(*Image) error, width, height int, scale float64, title string) <-chan error {
|
||||||
ch := make(chan error)
|
ch := make(chan error)
|
||||||
go func() {
|
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.
|
// SetScreenSize changes the (logical) size of the screen.
|
||||||
// This doesn't affect the current scale of the screen.
|
// This doesn't affect the current scale of the screen.
|
||||||
//
|
//
|
||||||
|
// Unit is device-independent pixel.
|
||||||
|
//
|
||||||
// This function is concurrent-safe.
|
// This function is concurrent-safe.
|
||||||
func SetScreenSize(width, height int) {
|
func SetScreenSize(width, height int) {
|
||||||
if width <= 0 || height <= 0 {
|
if width <= 0 || height <= 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user