Add text messages on loading screens

This commit is contained in:
2025-12-05 10:29:16 +00:00
parent 14d50c4242
commit 0a34db312f
20 changed files with 409 additions and 318 deletions
-1
View File
@@ -33,7 +33,6 @@ data PSType
| PutMachine
{ _putMachinePoly :: [Point2]
, _putMachineMachine :: Machine
-- , _putMachineWall :: Wall
, _putMachineMaybeItem :: Maybe Item
}
| PutLS LightSource
+27 -14
View File
@@ -11,20 +11,21 @@ module Dodge.Data.Universe (
module Loop.Data,
) where
import qualified Data.IntMap.Strict as IM
import Geometry.Data
import Sound.Data
import qualified Data.Map.Strict as M
import GHC.Word (Word32)
import Dodge.Data.SelectionList
import Control.Lens
import qualified Data.IntMap.Strict as IM
import qualified Data.Map.Strict as M
--import qualified Data.Map.Strict as M
import Data.Preload
import Data.Sequence (Seq (..))
import Dodge.Data.Config
import Dodge.Data.SelectionList
import Dodge.Data.World
import GHC.Word (Word32)
import Geometry.Data
import Loop.Data
import Picture.Data
import Sound.Data
--import SDL (Scancode)
data Universe = Universe
@@ -48,13 +49,13 @@ data Universe = Universe
, _uvDebugPut :: IM.IntMap String
, _uvDebugPathShowType :: PathShowType
, _uvDebugMessageOffset :: Int
, _uvSoundQueue :: [SoundID] -- sounds without a position, to be played once
, _uvSoundQueue :: [SoundID] -- sounds without a position, to be played once
}
data PathShowType
= PathBetweenLeftRightClick
| PathBetweenDebugV2s
deriving (Show,Eq,Ord,Enum,Bounded)
deriving (Show, Eq, Ord, Enum, Bounded)
data DebugItem = DebugItem
{ _debugMessage :: String
@@ -69,13 +70,15 @@ data SideEffect
| RunningSideEffect {_ceString :: String}
| HardQuit
data OptionScreenFlag = NormalOptions | GameOverOptions | SplashOptions
| LoadingScreen
data OptionScreenFlag
= NormalOptions
| GameOverOptions
| SplashOptions
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data ExtraMenuOption
= BottomMenuOption { _emoMenuOption :: MenuOption }
| TopMenuOption { _emoMenuOption :: MenuOption }
= BottomMenuOption {_emoMenuOption :: MenuOption}
| TopMenuOption {_emoMenuOption :: MenuOption}
| NoExtraMenuOption
data ScreenLayer
@@ -85,11 +88,21 @@ data ScreenLayer
, _scOffset :: Int
, _scPositionedMenuOption :: ExtraMenuOption
, _scOptionFlag :: OptionScreenFlag
, _scSelectionList :: [SelectionItem (Universe -> Universe,Universe->Universe)]
, _scSelectionList :: [SelectionItem (Universe -> Universe, Universe -> Universe)]
, _scAvailableLines :: Int
, _scDisplayTime :: Int
}
| InputScreen { _scInput :: String }
| InputScreen {_scInput :: String}
| LoadingScreen
{ _scPara :: [String]
, _scBlockStatus :: BlockStatus
}
data BlockStatus
= LoadWaitingClicked
| LoadWaiting
| LoadReady
deriving (Show)
data MenuOptionDisplay
= MODString {_modString :: String}
+5
View File
@@ -10,6 +10,7 @@ module Dodge.Data.World (
module Dodge.Data.Input,
) where
import Color.Data
import qualified Data.IntMap.Strict as IM
import NewInt
import Control.Lens
@@ -81,6 +82,10 @@ data TimeFlowStatus
{ _timeFlowCharge :: Int
, _scrollItemID :: NewInt ItmInt
}
| PauseTimeMessage
{ _pauseTimeMesage :: String
, _pauseTimeMesageColor :: Color
}
makeLenses ''TimeFlowStatus
makeLenses ''World