mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
ui: Rename functions
This commit is contained in:
parent
e809991c9f
commit
4d0cc623fb
@ -104,7 +104,7 @@ func initialize() error {
|
||||
}
|
||||
// TODO: Fix this hack. currentMonitorImpl now requires u.window on POSIX.
|
||||
currentUI.window = w
|
||||
currentUI.initMonitor = currentUI.currentMonitorImpl()
|
||||
currentUI.initMonitor = currentUI.currentMonitorFromPosition()
|
||||
v := currentUI.initMonitor.GetVideoMode()
|
||||
s := glfwScale()
|
||||
currentUI.initFullscreenWidth = int(float64(v.Width) / s)
|
||||
@ -858,5 +858,5 @@ func (u *userInterface) currentMonitor() *glfw.Monitor {
|
||||
return m
|
||||
}
|
||||
// Get the monitor which the current window belongs to. This requires OS API.
|
||||
return u.currentMonitorImpl()
|
||||
return u.currentMonitorFromPosition()
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ func adjustWindowPosition(x, y int) (int, int) {
|
||||
return x, y
|
||||
}
|
||||
|
||||
func (u *userInterface) currentMonitorImpl() *glfw.Monitor {
|
||||
func (u *userInterface) currentMonitorFromPosition() *glfw.Monitor {
|
||||
x := C.int(0)
|
||||
y := C.int(0)
|
||||
// Note: [NSApp mainWindow] is nil when it doesn't have its border. Use u.window here.
|
||||
|
@ -37,7 +37,7 @@ func adjustWindowPosition(x, y int) (int, int) {
|
||||
return x, y
|
||||
}
|
||||
|
||||
func (u *userInterface) currentMonitorImpl() *glfw.Monitor {
|
||||
func (u *userInterface) currentMonitorFromPosition() *glfw.Monitor {
|
||||
// TODO: Return more appropriate display.
|
||||
if cm, ok := getCachedMonitor(u.window.GetPos()); ok {
|
||||
return cm.m
|
||||
|
@ -121,7 +121,7 @@ func adjustWindowPosition(x, y int) (int, int) {
|
||||
return x, y
|
||||
}
|
||||
|
||||
func (u *userInterface) currentMonitorImpl() *glfw.Monitor {
|
||||
func (u *userInterface) currentMonitorFromPosition() *glfw.Monitor {
|
||||
// TODO: Should we use u.window.GetWin32Window() here?
|
||||
w, err := getActiveWindow()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user