mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 10:42:42 +01:00
mobile: Move Render to a global func
This commit is contained in:
parent
f41455c2cf
commit
59a21620dc
@ -20,8 +20,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type EventDispatcher interface {
|
type EventDispatcher interface {
|
||||||
Render() error
|
|
||||||
|
|
||||||
// UpdateTouchesOnAndroid updates the touch state on Android.
|
// UpdateTouchesOnAndroid updates the touch state on Android.
|
||||||
//
|
//
|
||||||
// This should be called with onTouchEvent of GLSurfaceView like this:
|
// This should be called with onTouchEvent of GLSurfaceView like this:
|
||||||
@ -47,6 +45,10 @@ func Start(f func(*ebiten.Image) error, width, height int, scale float64, title
|
|||||||
return start(f, width, height, scale, title)
|
return start(f, width, height, scale, title)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Render() error {
|
||||||
|
return render()
|
||||||
|
}
|
||||||
|
|
||||||
type position struct {
|
type position struct {
|
||||||
x int
|
x int
|
||||||
y int
|
y int
|
||||||
@ -56,10 +58,6 @@ type eventDispatcher struct {
|
|||||||
touches map[int]position
|
touches map[int]position
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *eventDispatcher) Render() error {
|
|
||||||
return render()
|
|
||||||
}
|
|
||||||
|
|
||||||
// touch implements ui.Touch.
|
// touch implements ui.Touch.
|
||||||
type touch struct {
|
type touch struct {
|
||||||
id int
|
id int
|
||||||
|
Loading…
Reference in New Issue
Block a user