Cleanup, fix bug in floating camera zoom
This commit is contained in:
@@ -115,13 +115,12 @@ itemToFunction itm = case itm ^. itType of
|
||||
_ -> UncomposableIsolateSF
|
||||
|
||||
basePCI :: Item -> ComposedItem
|
||||
basePCI itm = case _itType itm of
|
||||
_ -> (itm, itemToFunction itm, itemBaseConnections itm)
|
||||
basePCI itm = (itm, itemToFunction itm, itemBaseConnections itm)
|
||||
|
||||
itemBaseConnections :: Item -> LinkTest
|
||||
itemBaseConnections itm = case _itType itm of
|
||||
HELD LASER -> laserLinkTest itm
|
||||
CRAFT SPRING -> springLinkTest itm
|
||||
CRAFT SPRING -> springLinkTest
|
||||
_ -> uncurry useBreakL $ itemToBreakLists itm (itemToFunction itm)
|
||||
|
||||
laserLinkTest :: Item -> LinkTest
|
||||
@@ -145,8 +144,8 @@ toLasgunUpdate itm =
|
||||
(\(par, _, _) -> (par, HeldPlatformSF, uncurry useBreakL $ itemToBreakLists itm HeldPlatformSF))
|
||||
(\(chi, _, up) -> (chi, FunctionChangeSF, up))
|
||||
|
||||
springLinkTest :: Item -> LinkTest
|
||||
springLinkTest itm = LTest (const Nothing) $
|
||||
springLinkTest :: LinkTest
|
||||
springLinkTest = LTest (const Nothing) $
|
||||
\ci -> case ci ^. _1 . itType of
|
||||
CRAFT HARDWARE ->
|
||||
Just
|
||||
|
||||
@@ -64,7 +64,7 @@ translateFloatingCameraKeys theinput = (camCenter -~ thetran) . (camViewFrom -~
|
||||
zoomFloatingCamera :: Input -> Camera -> Camera
|
||||
zoomFloatingCamera theinput
|
||||
| ButtonRight `M.member` (theinput ^. mouseButtons) =
|
||||
camZoom *~ (39/40 ^^ negate (getSmoothScrollValue theinput))
|
||||
camZoom *~ ((39/40) ^^ negate (getSmoothScrollValue theinput))
|
||||
| otherwise = id
|
||||
-- the 39/40 is taken from zoomSpeed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user