ScrollContainer can step scroll with normal up/down
This commit is contained in:
parent
84ab0895f8
commit
9fa764c7b9
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user