ScrollContainer can step scroll with normal up/down

This commit is contained in:
Sasha Koshka 2024-07-27 00:35:17 -04:00
parent 84ab0895f8
commit 9fa764c7b9

View File

@ -210,6 +210,22 @@ func (this *ScrollContainer) handleKeyDown (key input.Key, numpad bool) bool {
} }
this.scrollBy(vector) this.scrollBy(vector)
return true return true
case input.KeyUp:
if modifiers.Shift {
vector.X -= this.StepSize().X
} else {
vector.Y -= this.StepSize().Y
}
this.scrollBy(vector)
return true
case input.KeyDown:
if modifiers.Shift {
vector.X += this.StepSize().X
} else {
vector.Y += this.StepSize().Y
}
this.scrollBy(vector)
return true
} }
return false return false
} }