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"
|
import "github.com/hajimehoshi/ebiten/v2/internal/driver"
|
||||||
|
|
||||||
// CursorModeType represents a render and coordinate mode of a mouse cursor.
|
// CursorModeType represents a render and coordinate mode of a mouse cursor.
|
||||||
type CursorModeType int
|
type CursorModeType = driver.CursorMode
|
||||||
|
|
||||||
// CursorModeTypes
|
// CursorModeTypes
|
||||||
const (
|
const (
|
||||||
@ -27,7 +27,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// CursorShapeType represents a shape of a mouse cursor.
|
// CursorShapeType represents a shape of a mouse cursor.
|
||||||
type CursorShapeType int
|
type CursorShapeType = driver.CursorShape
|
||||||
|
|
||||||
// CursorShapeTypes
|
// CursorShapeTypes
|
||||||
const (
|
const (
|
||||||
|
8
run.go
8
run.go
@ -207,7 +207,7 @@ func ScreenSizeInFullscreen() (int, int) {
|
|||||||
//
|
//
|
||||||
// CursorMode is concurrent-safe.
|
// CursorMode is concurrent-safe.
|
||||||
func CursorMode() CursorModeType {
|
func CursorMode() CursorModeType {
|
||||||
return CursorModeType(uiDriver().CursorMode())
|
return uiDriver().CursorMode()
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetCursorMode sets the render and capture mode of the mouse cursor.
|
// SetCursorMode sets the render and capture mode of the mouse cursor.
|
||||||
@ -223,7 +223,7 @@ func CursorMode() CursorModeType {
|
|||||||
//
|
//
|
||||||
// SetCursorMode is concurrent-safe.
|
// SetCursorMode is concurrent-safe.
|
||||||
func SetCursorMode(mode CursorModeType) {
|
func SetCursorMode(mode CursorModeType) {
|
||||||
uiDriver().SetCursorMode(driver.CursorMode(mode))
|
uiDriver().SetCursorMode(mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
// CursorShape returns the current cursor shape.
|
// CursorShape returns the current cursor shape.
|
||||||
@ -232,14 +232,14 @@ func SetCursorMode(mode CursorModeType) {
|
|||||||
//
|
//
|
||||||
// CursorShape is concurrent-safe.
|
// CursorShape is concurrent-safe.
|
||||||
func CursorShape() CursorShapeType {
|
func CursorShape() CursorShapeType {
|
||||||
return CursorShapeType(uiDriver().CursorShape())
|
return uiDriver().CursorShape()
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetCursorShape sets the cursor shape.
|
// SetCursorShape sets the cursor shape.
|
||||||
//
|
//
|
||||||
// SetCursorShape is concurrent-safe.
|
// SetCursorShape is concurrent-safe.
|
||||||
func SetCursorShape(shape CursorShapeType) {
|
func SetCursorShape(shape CursorShapeType) {
|
||||||
uiDriver().SetCursorShape(driver.CursorShape(shape))
|
uiDriver().SetCursorShape(shape)
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsFullscreen reports whether the current mode is fullscreen or not.
|
// IsFullscreen reports whether the current mode is fullscreen or not.
|
||||||
|
Loading…
Reference in New Issue
Block a user