mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +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 {
|
func (u *UserInterface) CursorMode() driver.CursorMode {
|
||||||
|
if !canvas.Truthy() {
|
||||||
|
return driver.CursorModeHidden
|
||||||
|
}
|
||||||
|
|
||||||
if jsutil.Equal(canvas.Get("style").Get("cursor"), stringNone) {
|
if jsutil.Equal(canvas.Get("style").Get("cursor"), stringNone) {
|
||||||
return driver.CursorModeVisible
|
return driver.CursorModeVisible
|
||||||
}
|
}
|
||||||
@ -110,6 +114,10 @@ func (u *UserInterface) CursorMode() driver.CursorMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) SetCursorMode(mode driver.CursorMode) {
|
func (u *UserInterface) SetCursorMode(mode driver.CursorMode) {
|
||||||
|
if !canvas.Truthy() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
var visible bool
|
var visible bool
|
||||||
switch mode {
|
switch mode {
|
||||||
case driver.CursorModeVisible:
|
case driver.CursorModeVisible:
|
||||||
|
Loading…
Reference in New Issue
Block a user