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

@@ -202,7 +202,7 @@ func (this *ScrollContainer) handleKeyDown (key input.Key, numpad bool) bool {
vector := image.Point { }
switch key {
case input.KeyPageUp:
if modifiers.Shift {
if modifiers.Shift() {
vector.X -= this.PageSize().X
} else {
vector.Y -= this.PageSize().Y
@@ -210,7 +210,7 @@ func (this *ScrollContainer) handleKeyDown (key input.Key, numpad bool) bool {
this.scrollBy(vector)
return true
case input.KeyPageDown:
if modifiers.Shift {
if modifiers.Shift() {
vector.X += this.PageSize().X
} else {
vector.Y += this.PageSize().Y
@@ -218,7 +218,7 @@ func (this *ScrollContainer) handleKeyDown (key input.Key, numpad bool) bool {
this.scrollBy(vector)
return true
case input.KeyUp:
if modifiers.Shift {
if modifiers.Shift() {
vector.X -= this.StepSize().X
} else {
vector.Y -= this.StepSize().Y
@@ -226,7 +226,7 @@ func (this *ScrollContainer) handleKeyDown (key input.Key, numpad bool) bool {
this.scrollBy(vector)
return true
case input.KeyDown:
if modifiers.Shift {
if modifiers.Shift() {
vector.X += this.StepSize().X
} else {
vector.Y += this.StepSize().Y
@@ -241,6 +241,8 @@ func (this *ScrollContainer) handleKeyUp (key input.Key, numpad bool) bool {
switch key {
case input.KeyPageUp: return true
case input.KeyPageDown: return true
case input.KeyUp: return true
case input.KeyDown: return true
}
return false
}