Skip to content

Commit

Permalink
Merge branch 'master' into ui-olympUI
Browse files Browse the repository at this point in the history
  • Loading branch information
Cruor committed Dec 19, 2021
2 parents 8ba0a3b + 5a8c176 commit c38b692
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,15 @@ Lönn supports a couple of keybinds and special mouse functionality, with more t

#### General Controls

- Ctrl + N: New map
- Ctrl + O: Open map
- Drag & drop map file into main window: Open map
- Ctrl + S: Save map
- Ctrl + Shift + S: Save map as...
- Ctrl + T: New room
- Ctrl + Shift + T: Configure current room
- Alt + Arrow keys: Move room (step size 8)
- Ctrl + Alt + Arrow keys: Move room (use 1 as step size instead of 8 for more fine-grained control)
- Alt + Delete: Delete room
- Ctrl + Z: Undo action
- Ctrl + Shift + Z: Redo action
- Scroll wheel: Zoom
Expand Down
4 changes: 2 additions & 2 deletions src/input_devices/room_resizer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ function roomResizer.mousemoved(x, y, dx, dy, istouch)
local newWidth = width + deltaX * 8
local newHeight = height + deltaY * 8

if resizeHorizontal and deltaX ~= 0 and newWidth >= itemStruct.recommendedMinimumWidth then
if resizeHorizontal and deltaX ~= 0 and (newWidth >= itemStruct.recommendedMinimumWidth or deltaX > 0) then
madeChanges = true

itemStruct.directionalResize(item, resizeHorizontal, deltaX)
end

if resizeVertical and deltaY ~= 0 and newHeight >= itemStruct.recommendedMinimumHeight then
if resizeVertical and deltaY ~= 0 and (newHeight >= itemStruct.recommendedMinimumHeight or deltaY > 0) then
madeChanges = true

itemStruct.directionalResize(item, resizeVertical, deltaY)
Expand Down

0 comments on commit c38b692

Please sign in to comment.