ebiten: Remove unnecessary casts

This commit is contained in:
Hajime Hoshi 2021-07-23 00:57:17 +09:00
parent 2503323557
commit 52567c459f
2 changed files with 6 additions and 6 deletions

View File

@ -17,7 +17,7 @@ package ebiten
import "github.com/hajimehoshi/ebiten/v2/internal/driver"
// CursorModeType represents a render and coordinate mode of a mouse cursor.
type CursorModeType int
type CursorModeType = driver.CursorMode
// CursorModeTypes
const (
@ -27,7 +27,7 @@ const (
)
// CursorShapeType represents a shape of a mouse cursor.
type CursorShapeType int
type CursorShapeType = driver.CursorShape
// CursorShapeTypes
const (

8
run.go
View File

@ -207,7 +207,7 @@ func ScreenSizeInFullscreen() (int, int) {
//
// CursorMode is concurrent-safe.
func CursorMode() CursorModeType {
return CursorModeType(uiDriver().CursorMode())
return uiDriver().CursorMode()
}
// SetCursorMode sets the render and capture mode of the mouse cursor.
@ -223,7 +223,7 @@ func CursorMode() CursorModeType {
//
// SetCursorMode is concurrent-safe.
func SetCursorMode(mode CursorModeType) {
uiDriver().SetCursorMode(driver.CursorMode(mode))
uiDriver().SetCursorMode(mode)
}
// CursorShape returns the current cursor shape.
@ -232,14 +232,14 @@ func SetCursorMode(mode CursorModeType) {
//
// CursorShape is concurrent-safe.
func CursorShape() CursorShapeType {
return CursorShapeType(uiDriver().CursorShape())
return uiDriver().CursorShape()
}
// SetCursorShape sets the cursor shape.
//
// SetCursorShape is concurrent-safe.
func SetCursorShape(shape CursorShapeType) {
uiDriver().SetCursorShape(driver.CursorShape(shape))
uiDriver().SetCursorShape(shape)
}
// IsFullscreen reports whether the current mode is fullscreen or not.