mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
parent
3c2d562967
commit
ed6756662a
@ -22,11 +22,6 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
/*charModsCallbacks = map[CharModsCallback]func(window *Window, char rune, mods ModifierKey){}
|
||||
framebufferSizeCallbacks = map[FramebufferSizeCallback]func(window *Window, width int, height int){}
|
||||
scrollCallbacks = map[ScrollCallback]func(window *Window, xoff float64, yoff float64){}
|
||||
sizeCallbacks = map[SizeCallback]func(window *Window, width int, height int){}*/
|
||||
|
||||
charModsCallbacks = map[CharModsCallback]glfw.CharModsCallback{}
|
||||
framebufferSizeCallbacks = map[FramebufferSizeCallback]glfw.FramebufferSizeCallback{}
|
||||
scrollCallbacks = map[ScrollCallback]glfw.ScrollCallback{}
|
||||
|
@ -163,7 +163,7 @@ func (w *Window) SetAttrib(attrib Hint, value int) {
|
||||
|
||||
func (w *Window) SetCharModsCallback(cbfun CharModsCallback) (previous CharModsCallback) {
|
||||
w.w.SetCharModsCallback(charModsCallbacks[cbfun])
|
||||
return 0 // TODO
|
||||
return ToCharModsCallback(nil) // TODO
|
||||
}
|
||||
|
||||
func (w *Window) SetCursor(cursor *Cursor) {
|
||||
@ -176,12 +176,12 @@ func (w *Window) SetCursor(cursor *Cursor) {
|
||||
|
||||
func (w *Window) SetFramebufferSizeCallback(cbfun FramebufferSizeCallback) (previous FramebufferSizeCallback) {
|
||||
w.w.SetFramebufferSizeCallback(framebufferSizeCallbacks[cbfun])
|
||||
return 0 // TODO
|
||||
return ToFramebufferSizeCallback(nil) // TODO
|
||||
}
|
||||
|
||||
func (w *Window) SetScrollCallback(cbfun ScrollCallback) (previous ScrollCallback) {
|
||||
w.w.SetScrollCallback(scrollCallbacks[cbfun])
|
||||
return 0 // TODO
|
||||
return ToScrollCallback(nil) // TODO
|
||||
}
|
||||
|
||||
func (w *Window) SetSizeCallback(cbfun SizeCallback) (previous SizeCallback) {
|
||||
|
Loading…
Reference in New Issue
Block a user