MCPcopy
hub / github.com/g3n/engine / onCursor

Method onCursor

gui/image_button.go:169–180  ·  view source on GitHub ↗

onCursor process subscribed cursor events

(evname string, ev interface{})

Source from the content-addressed store, hash-verified

167
168// onCursor process subscribed cursor events
169func (b *ImageButton) onCursor(evname string, ev interface{}) {
170
171 switch evname {
172 case OnCursorEnter:
173 b.mouseOver = true
174 b.update()
175 case OnCursorLeave:
176 b.pressed = false
177 b.mouseOver = false
178 b.update()
179 }
180}
181
182// onMouseEvent process subscribed mouse events
183func (b *ImageButton) onMouse(evname string, ev interface{}) {

Callers

nothing calls this directly

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected