mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/uidriver/js: Bug fix: CursorMode didn't work on go2cpp
This commit is contained in:
parent
41f060b1d2
commit
402e1a251a
@ -103,6 +103,10 @@ func (u *UserInterface) IsVsyncEnabled() bool {
|
||||
}
|
||||
|
||||
func (u *UserInterface) CursorMode() driver.CursorMode {
|
||||
if !canvas.Truthy() {
|
||||
return driver.CursorModeHidden
|
||||
}
|
||||
|
||||
if jsutil.Equal(canvas.Get("style").Get("cursor"), stringNone) {
|
||||
return driver.CursorModeVisible
|
||||
}
|
||||
@ -110,6 +114,10 @@ func (u *UserInterface) CursorMode() driver.CursorMode {
|
||||
}
|
||||
|
||||
func (u *UserInterface) SetCursorMode(mode driver.CursorMode) {
|
||||
if !canvas.Truthy() {
|
||||
return
|
||||
}
|
||||
|
||||
var visible bool
|
||||
switch mode {
|
||||
case driver.CursorModeVisible:
|
||||
|
Loading…
Reference in New Issue
Block a user