mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
ui: Remove AdjustedCursorPosition
This commit is contained in:
parent
dec6be1a11
commit
0536efd95f
2
input.go
2
input.go
@ -50,7 +50,7 @@ func IsKeyPressed(key Key) bool {
|
||||
//
|
||||
// CursorPosition is concurrent-safe.
|
||||
func CursorPosition() (x, y int) {
|
||||
return ui.AdjustedCursorPosition()
|
||||
return ui.AdjustPosition(input.Get().CursorPosition())
|
||||
}
|
||||
|
||||
// Wheel returns the x and y offset of the mouse wheel or touchpad scroll.
|
||||
|
@ -451,10 +451,6 @@ func ScreenPadding() (x0, y0, x1, y1 float64) {
|
||||
return ox, oy, (mx - sx) - ox, (my - sy) - oy
|
||||
}
|
||||
|
||||
func AdjustedCursorPosition() (x, y int) {
|
||||
return AdjustPosition(input.Get().CursorPosition())
|
||||
}
|
||||
|
||||
func AdjustPosition(x, y int) (int, int) {
|
||||
u := currentUI
|
||||
if !u.isRunning() {
|
||||
|
@ -114,10 +114,6 @@ func AdjustPosition(x, y int) (int, int) {
|
||||
return int(float64(x) / scale), int(float64(y) / scale)
|
||||
}
|
||||
|
||||
func AdjustedCursorPosition() (x, y int) {
|
||||
return AdjustPosition(input.Get().CursorPosition())
|
||||
}
|
||||
|
||||
func IsCursorVisible() bool {
|
||||
// The initial value is an empty string, so don't compare with "auto" here.
|
||||
return canvas.Get("style").Get("cursor").String() != "none"
|
||||
|
@ -351,10 +351,6 @@ func (u *userInterface) screenPaddingImpl() (x0, y0, x1, y1 float64) {
|
||||
return ox, oy, ox, oy
|
||||
}
|
||||
|
||||
func AdjustedCursorPosition() (x, y int) {
|
||||
return AdjustPosition(input.Get().CursorPosition())
|
||||
}
|
||||
|
||||
func AdjustPosition(x, y int) (int, int) {
|
||||
return currentUI.adjustPosition(x, y)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user