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

Method onCursor

gui/button.go:124–134  ·  view source on GitHub ↗

onCursor process subscribed cursor events

(evname string, ev interface{})

Source from the content-addressed store, hash-verified

122
123// onCursor process subscribed cursor events
124func (b *Button) onCursor(evname string, ev interface{}) {
125
126 switch evname {
127 case OnCursorEnter:
128 b.mouseOver = true
129 b.update()
130 case OnCursorLeave:
131 b.mouseOver = false
132 b.update()
133 }
134}
135
136// onMouseEvent process subscribed mouse events
137func (b *Button) onMouse(evname string, ev interface{}) {

Callers

nothing calls this directly

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected