Work on mouse wheel scrolling

This commit is contained in:
2022-10-25 22:59:01 +01:00
parent 86a9ab7582
commit 4ffd361f11
15 changed files with 143 additions and 57 deletions
-1
View File
@@ -99,7 +99,6 @@ import Dodge.GameRoom
import Geometry.ConvexPoly
import Geometry.Data
import qualified IntMapHelp as IM
import MaybeHelp
import Picture.Data
data CWCam = CWCam
+2 -2
View File
@@ -13,14 +13,14 @@ data ItEffect = ItEffect
{ _ieInv :: ItInvEffect --Item -> Creature -> World -> World
, _ieOnInsert :: ItInvEffect
, _ieOnDrop :: ItInvEffect --Item -> Creature -> World -> World
, _ieOnHeld :: ItInvEffect
, _ieOnStash :: ItInvEffect
, _ieWhileAiming :: ItInvEffect
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data ItInvEffect
= NoInvEffect
| RewindEffect
| TimeScrollEffect
| EffectIfHeld ItInvEffect ItInvEffect
| CreateHeldLight
| CreateShieldWall
+2
View File
@@ -26,6 +26,8 @@ data HeldConsumption
, _laCycle :: [LoadAction]
, _laProgress :: Maybe [LoadAction]
}
| ChargingAmmo { _caCharge :: Int
, _caMax :: Int }
| NoConsumption
deriving (Eq, Show, Read) --Generic, Flat)
+6 -1
View File
@@ -34,6 +34,8 @@ data World = World
, _mousePos :: Point2
, _keys :: S.Set Scancode
, _mouseButtons :: M.Map MouseButton Bool
, _scrollAmount :: Int
, _previousScrollAmount :: Int
, _hammers :: M.Map WorldHammer HammerPosition
, _testFloat :: Float
, _lLine :: (Point2, Point2)
@@ -53,6 +55,7 @@ data TimeFlowStatus
| RewindingLastFrame
| NormalTimeFlow
| ScrollTimeFlow
{ _scrollSmoothing :: Int }
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data WorldHammer
@@ -62,7 +65,8 @@ data WorldHammer
data CWTime = CWTime
{ _maybeWorld :: Maybe' CWorld
, _rewindWorlds :: [CWorld]
, _pastWorlds :: [CWorld]
, _pastWorldsNum :: Int
, _futureWorlds :: [CWorld]
, _worldClock :: Int
, _deathDelay :: Maybe Int
@@ -70,3 +74,4 @@ data CWTime = CWTime
makeLenses ''World
makeLenses ''CWTime
makeLenses ''TimeFlowStatus