mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
ui: Refactoring
This commit is contained in:
parent
443e3ae3a4
commit
7e29a81177
@ -229,9 +229,8 @@ func (u *userInterface) update(g GraphicsContext) error {
|
|||||||
|
|
||||||
func (u *userInterface) loop(g GraphicsContext) error {
|
func (u *userInterface) loop(g GraphicsContext) error {
|
||||||
ch := make(chan error)
|
ch := make(chan error)
|
||||||
var f func([]js.Value)
|
|
||||||
var cf js.Callback
|
var cf js.Callback
|
||||||
f = func([]js.Value) {
|
f := func([]js.Value) {
|
||||||
if err := u.update(g); err != nil {
|
if err := u.update(g); err != nil {
|
||||||
ch <- err
|
ch <- err
|
||||||
close(ch)
|
close(ch)
|
||||||
|
Loading…
Reference in New Issue
Block a user