mirror of
https://github.com/bloeys/gopad.git
synced 2025-12-29 15:08:21 +00:00
Scrolling
This commit is contained in:
4
main.go
4
main.go
@ -171,6 +171,10 @@ func (g *Gopad) Update() {
|
||||
g.getActiveEditor().SetCursorPos(int(x), int(y))
|
||||
}
|
||||
|
||||
if yMove := input.GetMouseWheelYNorm(); yMove != 0 {
|
||||
g.getActiveEditor().SetStartPos(yMove)
|
||||
}
|
||||
|
||||
//Close editor if needed
|
||||
if input.KeyDown(sdl.K_LCTRL) && input.KeyClicked(sdl.K_w) {
|
||||
g.closeEditor(g.activeEditor)
|
||||
|
||||
Reference in New Issue
Block a user