mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
ebiten: Remove unnecessary casts
This commit is contained in:
parent
2503323557
commit
52567c459f
@ -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
8
run.go
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user