mirror of https://github.com/teverse/teverse
added lower bound to scale tool
This commit is contained in:
parent
f3d9a971c4
commit
8d414408ad
create
|
@ -89,6 +89,11 @@ engine.input:mouseLeftReleased(function(inp)
|
|||
if not inp.systemHandled and selectionController.selectable then
|
||||
local mouseHit = engine.physics:rayTestScreen( engine.input.mousePosition )
|
||||
if not mouseHit or mouseHit.object.workshopLocked then
|
||||
|
||||
if mouseHit then
|
||||
print(mouseHit.object, mouseHit.object.workshopLocked, mouseHit.object.name)
|
||||
end
|
||||
|
||||
if mouseHit and mouseHit.object.name == "_CreateMode_" then return end -- dont deselect
|
||||
-- User clicked empty space, deselect everything??#
|
||||
for _,v in pairs(selectionController.selection) do
|
||||
|
|
|
@ -6,7 +6,7 @@ local controller = {}
|
|||
local uiController = require("tevgit:create/controllers/ui.lua")
|
||||
local themeController = require("tevgit:create/controllers/theme.lua")
|
||||
|
||||
controller.gridStep = 1
|
||||
controller.gridStep = 0.2
|
||||
controller.rotateStep = 45
|
||||
controller.axis = {{"x", true},{"y", true},{"z", true}} -- should grid step be on .. axis
|
||||
|
||||
|
|
|
@ -135,9 +135,9 @@ local function onToolActivated(toolId)
|
|||
|
||||
local size = totalSize:clone()
|
||||
if gridStep > 0 and toolSettings.axis[componentIndex][2] then
|
||||
size[component] = helpers.roundToMultiple(newSize[component], gridStep)
|
||||
size[component] = math.max(0.05, helpers.roundToMultiple(newSize[component], gridStep))
|
||||
else
|
||||
size[component] = newSize[component]
|
||||
size[component] = math.max(0.05, newSize[component])
|
||||
end
|
||||
|
||||
local newPos = totalposition:clone()
|
||||
|
|
Loading…
Reference in New Issue