app,io/pointer: [API] remove CursorNameOp and rename CursorName -> Cursor

It's now possible to directly user pointer.Cursor to add to the ops.

   pointer.CursorText.Add(gtx.Ops)

This is an API change. Use pointer.Cursor directly instead of CursorNameOp.

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
Egon Elbre
2022-02-26 12:54:42 +02:00
committed by Elias Naur
parent 4172566aad
commit cdb288d1f9
18 changed files with 57 additions and 68 deletions
+3 -3
View File
@@ -205,7 +205,7 @@ type window struct {
w *callbacks
stage system.Stage
displayLink *displayLink
cursor pointer.CursorName
cursor pointer.Cursor
scale float32
config Config
@@ -368,8 +368,8 @@ func (w *window) setTitle(prev, cnf Config) {
func (w *window) Perform(system.Action) {}
func (w *window) SetCursor(name pointer.CursorName) {
w.cursor = windowSetCursor(w.cursor, name)
func (w *window) SetCursor(cursor pointer.Cursor) {
w.cursor = windowSetCursor(w.cursor, cursor)
}
func (w *window) EditorStateChanged(old, new editorState) {