Scrolling

This commit is contained in:
bloeys
2022-02-27 10:57:01 +04:00
parent f0c4a82b88
commit f562ec674b
3 changed files with 33 additions and 7 deletions

View File

@ -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)