added additional function to rotate card+preview

This commit is contained in:
Chr1Z93 2023-04-27 11:15:26 +02:00
parent 0117cd9920
commit d0a8117cfd

View File

@ -1,10 +1,14 @@
-- context menu to manually fix rotation
function onLoad()
self.addContextMenuItem("rotate alt preview", reverse)
self.addContextMenuItem("rotate preview", rotatePreview)
self.addContextMenuItem("rotate card+preview", function()
self.setRotationSmooth(self.getRotation() + Vector(0, 180, 0))
rotatePreview()
end)
end
-- rotates the alt_view_angle
function reverse()
function rotatePreview()
local angle = self.alt_view_angle
if angle.y == 0 then
angle.y = 180