Commit before making hotkeys attach to item ids, not inv ids
This commit is contained in:
@@ -15,7 +15,7 @@ import Dodge.Creature.Test
|
||||
import Dodge.Data.Config
|
||||
import Dodge.Data.World
|
||||
--import Dodge.Equipment
|
||||
import Dodge.InputFocus
|
||||
--import Dodge.InputFocus
|
||||
import Dodge.SmoothScroll
|
||||
import Dodge.Viewpoints
|
||||
import Dodge.WASD
|
||||
@@ -24,7 +24,7 @@ import Geometry
|
||||
--import qualified IntMapHelp as IM
|
||||
import LensHelp
|
||||
import SDL (MouseButton (..))
|
||||
import qualified SDL
|
||||
--import qualified SDL
|
||||
|
||||
{- Update the screen camera rotation and position, including any in rold scope/remote camera modifiers;
|
||||
update where your avatar's view is from. -}
|
||||
@@ -157,17 +157,17 @@ doWallRotate wl w = rotateUsing $ (argV . uncurry (-.-) $ _wlLine wl) - (w ^. wC
|
||||
b = a * (4 / pi)
|
||||
b' = fromIntegral (round b :: Int)
|
||||
|
||||
rotateCameraBy :: Float -> World -> World
|
||||
rotateCameraBy x = wCam . camRot +~ x
|
||||
--rotateCameraBy :: Float -> World -> World
|
||||
--rotateCameraBy x = wCam . camRot +~ x
|
||||
|
||||
rotateCamera :: Configuration -> World -> World
|
||||
rotateCamera cfig w
|
||||
| keydown SDL.ScancodeQ && keydown SDL.ScancodeE = w
|
||||
| keydown SDL.ScancodeQ = rotateCameraBy 0.025 w
|
||||
| keydown SDL.ScancodeE = rotateCameraBy (-0.025) w
|
||||
-- | keydown SDL.ScancodeQ && keydown SDL.ScancodeE = w
|
||||
-- | keydown SDL.ScancodeQ = rotateCameraBy 0.025 w
|
||||
-- | keydown SDL.ScancodeE = rotateCameraBy (-0.025) w
|
||||
| otherwise = ifConfigWallRotate cfig (w ^. input . mouseButtons) w
|
||||
where
|
||||
keydown scode = scode `M.member` _pressedKeys (_input w) && not (inTextInputFocus w)
|
||||
-- where
|
||||
-- keydown scode = scode `M.member` _pressedKeys (_input w) && not (inTextInputFocus w)
|
||||
|
||||
zoomFromItem :: ItZoom -> Float
|
||||
zoomFromItem ItZoom{_izMax = zMax, _izMin = zMin, _izFac = zFac} =
|
||||
|
||||
Reference in New Issue
Block a user