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 Jul 20, 2024
2 parents f652c28 + 44437bb commit fbfbbba
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Hold right click to move around the map. Left click is your main way of placing

In any menu, you can hover over the name of an option or field for a detailed tooltip explaining its meaning and usage.

Lönn supports a couple of keybinds and special mouse functionality, with more to come. The following list might not be comprehensive. Note that you can change all keybinds in the configuration file.
Lönn supports a couple of keybinds and special mouse functionality, with more to come. The following list might not be comprehensive. Note that you can change all keybinds in the settings window or the configuration file.

---

Expand Down Expand Up @@ -87,9 +87,12 @@ Lönn supports a couple of keybinds and special mouse functionality, with more t

- Left click: Select object
- Left click existing selection: Cycle through objects under cursor (smallest to largest)
- Double Left click: Select all similar objects
- Ctrl + Double Left click: Select all similar objects but more strict
- Left click & drag: Select multiple objects
- Shift + Left click & drag: Add to current selection
- Ctrl + A: Select all objects
- Ctrl + Shift + A: Clear current selection
- Right click selection: Open properties of selected object(s)
- Holding Left mouse button over selection: Drag selected objects
- Shift + Holding Left mouse button over selection: Axis-bound object dragging
Expand Down
2 changes: 1 addition & 1 deletion src/lang/en_gb.lang
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,7 @@ settings.hotkeys.description.itemsCopy=Copy the selected objects to the clipboar
settings.hotkeys.description.itemsCut=Cut the selected objects to the clipboard.
settings.hotkeys.description.itemsPaste=Paste a selection from the clipboard if possible.
settings.hotkeys.description.itemsSelectAll=Select all objects.
settings.hotkeys.description.itemsDeselect=Cancels the current selection.
settings.hotkeys.description.itemsDeselect=Clears the current selection.
settings.editor.description.selectionAddModifier=While held, add to the current selection rather than replacing it.
settings.editor.description.itemAddNode=Add a node to the selected object if possible.
settings.editor.description.objectCloneButton=Mouse button to use for cloning hovered objects.
Expand Down
14 changes: 8 additions & 6 deletions src/tools/selection.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1448,17 +1448,19 @@ function tool.mouseclicked(x, y, button, istouch, presses)
local cursorX, cursorY = toolUtils.getCursorPositionInRoom(x, y)

if cursorX and cursorY then
if presses == 1 then
local addSelections = keyboardHelper.modifierHeld(configs.editor.selectionAddModifier)

if addSelections and presses % 2 == 0 then
local strict = keyboardHelper.modifierHeld(configs.editor.precisionModifier)

selectSimilar(strict)

else
selectionChanged(cursorX - 1, cursorY - 1, 3, 3, true)

selectionFinished(cursorX, cursorY, true)
resizeFinished(cursorX, cursorY)
movementFinished(cursorX, cursorY)

else
local strict = keyboardHelper.modifierHeld(configs.editor.precisionModifier)

selectSimilar(strict)
end
end

Expand Down

0 comments on commit fbfbbba

Please sign in to comment.