Fix object code

This commit is contained in:
2024-09-12 02:34:28 -04:00
parent dca3880a87
commit c2245ec304
7 changed files with 31 additions and 26 deletions

View File

@@ -205,7 +205,7 @@ func (this *TextInput) handleKeyDown (key input.Key, numpad bool) bool {
dot := this.Dot()
txt := this.text
modifiers := this.box.Window().Modifiers()
word := modifiers.Control
word := modifiers.Control()
changed := false
defer func () {
@@ -225,7 +225,7 @@ func (this *TextInput) handleKeyDown (key input.Key, numpad bool) bool {
changed = true
}
if this.multiline && !modifiers.Control {
if this.multiline && !modifiers.Control() {
switch {
case key == '\n', key == '\t':
typeRune()
@@ -245,17 +245,17 @@ func (this *TextInput) handleKeyDown (key input.Key, numpad bool) bool {
txt, dot = text.Delete(txt, dot, word)
changed = true
return true
case key.Printable() && !modifiers.Control:
case key.Printable() && !modifiers.Control():
typeRune()
return true
case key == 'z' || key == 'Z' && modifiers.Control:
if modifiers.Shift {
case key == 'z' || key == 'Z' && modifiers.Control():
if modifiers.Shift() {
this.Redo()
} else {
this.Undo()
}
return true
case key == 'y' && modifiers.Control:
case key == 'y' && modifiers.Control():
this.Redo()
return true
default:
@@ -266,7 +266,7 @@ func (this *TextInput) handleKeyDown (key input.Key, numpad bool) bool {
func (this *TextInput) handleKeyUp (key input.Key, numpad bool) bool {
modifiers := this.box.Window().Modifiers()
if this.multiline && !modifiers.Control {
if this.multiline && !modifiers.Control() {
switch {
case key == '\n', key == '\t':
return true
@@ -280,11 +280,11 @@ func (this *TextInput) handleKeyUp (key input.Key, numpad bool) bool {
return true
case key == input.KeyDelete:
return true
case key.Printable() && !modifiers.Control:
case key.Printable() && !modifiers.Control():
return true
case key == 'z' && modifiers.Control:
case key == 'z' && modifiers.Control():
return true
case key == 'y' && modifiers.Control:
case key == 'y' && modifiers.Control():
return true
default:
return false