mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
parent
9b6ba5ed2c
commit
99b2b5c1ee
@ -253,6 +253,11 @@ func (w *Window) SetSizeCallback(cbfun SizeCallback) (previous SizeCallback) {
|
|||||||
return prev
|
return prev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (w *Window) SetSizeLimits(minw, minh, maxw, maxh int) {
|
||||||
|
glfwDLL.call("glfwSetWindowSizeLimits", w.w, uintptr(minw), uintptr(minh), uintptr(maxw), uintptr(maxh))
|
||||||
|
panicError()
|
||||||
|
}
|
||||||
|
|
||||||
func (w *Window) SetIcon(images []image.Image) {
|
func (w *Window) SetIcon(images []image.Image) {
|
||||||
gimgs := make([]glfwImage, len(images))
|
gimgs := make([]glfwImage, len(images))
|
||||||
defer runtime.KeepAlive(gimgs)
|
defer runtime.KeepAlive(gimgs)
|
||||||
|
@ -649,7 +649,11 @@ func (u *UserInterface) deviceScaleFactor() float64 {
|
|||||||
return devicescale.GetAt(cm.x, cm.y)
|
return devicescale.GetAt(cm.x, cm.y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return devicescale.GetAt(currentMonitor(u.window).GetPos())
|
m := u.initMonitor
|
||||||
|
if u.window != nil {
|
||||||
|
m = currentMonitor(u.window)
|
||||||
|
}
|
||||||
|
return devicescale.GetAt(m.GetPos())
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
Loading…
Reference in New Issue
Block a user