{-# LANGUAGE DeriveGeneric #-}
module Game.LambdaHack.Common.ClientOptions
( FullscreenMode(..), ClientOptions(..), defClientOptions
) where
import Prelude ()
import Game.LambdaHack.Core.Prelude
import Control.DeepSeq
import Data.Binary
import GHC.Generics (Generic)
import Game.LambdaHack.Common.Misc
data FullscreenMode =
NotFullscreen
| BigBorderlessWindow
| ModeChange
deriving (Int -> FullscreenMode -> ShowS
[FullscreenMode] -> ShowS
FullscreenMode -> String
(Int -> FullscreenMode -> ShowS)
-> (FullscreenMode -> String)
-> ([FullscreenMode] -> ShowS)
-> Show FullscreenMode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FullscreenMode] -> ShowS
$cshowList :: [FullscreenMode] -> ShowS
show :: FullscreenMode -> String
$cshow :: FullscreenMode -> String
showsPrec :: Int -> FullscreenMode -> ShowS
$cshowsPrec :: Int -> FullscreenMode -> ShowS
Show, ReadPrec [FullscreenMode]
ReadPrec FullscreenMode
Int -> ReadS FullscreenMode
ReadS [FullscreenMode]
(Int -> ReadS FullscreenMode)
-> ReadS [FullscreenMode]
-> ReadPrec FullscreenMode
-> ReadPrec [FullscreenMode]
-> Read FullscreenMode
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FullscreenMode]
$creadListPrec :: ReadPrec [FullscreenMode]
readPrec :: ReadPrec FullscreenMode
$creadPrec :: ReadPrec FullscreenMode
readList :: ReadS [FullscreenMode]
$creadList :: ReadS [FullscreenMode]
readsPrec :: Int -> ReadS FullscreenMode
$creadsPrec :: Int -> ReadS FullscreenMode
Read, FullscreenMode -> FullscreenMode -> Bool
(FullscreenMode -> FullscreenMode -> Bool)
-> (FullscreenMode -> FullscreenMode -> Bool) -> Eq FullscreenMode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FullscreenMode -> FullscreenMode -> Bool
$c/= :: FullscreenMode -> FullscreenMode -> Bool
== :: FullscreenMode -> FullscreenMode -> Bool
$c== :: FullscreenMode -> FullscreenMode -> Bool
Eq, (forall x. FullscreenMode -> Rep FullscreenMode x)
-> (forall x. Rep FullscreenMode x -> FullscreenMode)
-> Generic FullscreenMode
forall x. Rep FullscreenMode x -> FullscreenMode
forall x. FullscreenMode -> Rep FullscreenMode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FullscreenMode x -> FullscreenMode
$cfrom :: forall x. FullscreenMode -> Rep FullscreenMode x
Generic)
instance NFData FullscreenMode
instance Binary FullscreenMode
data ClientOptions = ClientOptions
{ ClientOptions -> Maybe Text
schosenFontset :: Maybe Text
, ClientOptions -> Maybe Double
sallFontsScale :: Maybe Double
, ClientOptions -> [(Text, FontDefinition)]
sfonts :: [(Text, FontDefinition)]
, ClientOptions -> [(Text, FontSet)]
sfontsets :: [(Text, FontSet)]
, ClientOptions -> Maybe FullscreenMode
sfullscreenMode :: Maybe FullscreenMode
, ClientOptions -> Maybe Int
slogPriority :: Maybe Int
, ClientOptions -> Maybe Double
smaxFps :: Maybe Double
, ClientOptions -> Bool
sdisableAutoYes :: Bool
, ClientOptions -> Maybe Bool
snoAnim :: Maybe Bool
, ClientOptions -> Bool
snewGameCli :: Bool
, ClientOptions -> Bool
sbenchmark :: Bool
, ClientOptions -> Maybe String
stitle :: Maybe String
, ClientOptions -> String
ssavePrefixCli :: String
, ClientOptions -> Bool
sfrontendTeletype :: Bool
, ClientOptions -> Bool
sfrontendNull :: Bool
, ClientOptions -> Bool
sfrontendLazy :: Bool
, ClientOptions -> Bool
sdbgMsgCli :: Bool
, ClientOptions -> Maybe Int
sstopAfterSeconds :: Maybe Int
, ClientOptions -> Maybe Int
sstopAfterFrames :: Maybe Int
, ClientOptions -> Bool
sprintEachScreen :: Bool
, ClientOptions -> Bool
sexposePlaces :: Bool
, ClientOptions -> Bool
sexposeItems :: Bool
, ClientOptions -> Bool
sexposeActors :: Bool
}
deriving (Int -> ClientOptions -> ShowS
[ClientOptions] -> ShowS
ClientOptions -> String
(Int -> ClientOptions -> ShowS)
-> (ClientOptions -> String)
-> ([ClientOptions] -> ShowS)
-> Show ClientOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClientOptions] -> ShowS
$cshowList :: [ClientOptions] -> ShowS
show :: ClientOptions -> String
$cshow :: ClientOptions -> String
showsPrec :: Int -> ClientOptions -> ShowS
$cshowsPrec :: Int -> ClientOptions -> ShowS
Show, ClientOptions -> ClientOptions -> Bool
(ClientOptions -> ClientOptions -> Bool)
-> (ClientOptions -> ClientOptions -> Bool) -> Eq ClientOptions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClientOptions -> ClientOptions -> Bool
$c/= :: ClientOptions -> ClientOptions -> Bool
== :: ClientOptions -> ClientOptions -> Bool
$c== :: ClientOptions -> ClientOptions -> Bool
Eq, (forall x. ClientOptions -> Rep ClientOptions x)
-> (forall x. Rep ClientOptions x -> ClientOptions)
-> Generic ClientOptions
forall x. Rep ClientOptions x -> ClientOptions
forall x. ClientOptions -> Rep ClientOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ClientOptions x -> ClientOptions
$cfrom :: forall x. ClientOptions -> Rep ClientOptions x
Generic)
instance Binary ClientOptions
defClientOptions :: ClientOptions
defClientOptions :: ClientOptions
defClientOptions = $WClientOptions :: Maybe Text
-> Maybe Double
-> [(Text, FontDefinition)]
-> [(Text, FontSet)]
-> Maybe FullscreenMode
-> Maybe Int
-> Maybe Double
-> Bool
-> Maybe Bool
-> Bool
-> Bool
-> Maybe String
-> String
-> Bool
-> Bool
-> Bool
-> Bool
-> Maybe Int
-> Maybe Int
-> Bool
-> Bool
-> Bool
-> Bool
-> ClientOptions
ClientOptions
{ schosenFontset :: Maybe Text
schosenFontset = Maybe Text
forall a. Maybe a
Nothing
, sallFontsScale :: Maybe Double
sallFontsScale = Maybe Double
forall a. Maybe a
Nothing
, sfonts :: [(Text, FontDefinition)]
sfonts = []
, sfontsets :: [(Text, FontSet)]
sfontsets = []
, sfullscreenMode :: Maybe FullscreenMode
sfullscreenMode = Maybe FullscreenMode
forall a. Maybe a
Nothing
, slogPriority :: Maybe Int
slogPriority = Maybe Int
forall a. Maybe a
Nothing
, smaxFps :: Maybe Double
smaxFps = Maybe Double
forall a. Maybe a
Nothing
, sdisableAutoYes :: Bool
sdisableAutoYes = Bool
False
, snoAnim :: Maybe Bool
snoAnim = Maybe Bool
forall a. Maybe a
Nothing
, snewGameCli :: Bool
snewGameCli = Bool
False
, sbenchmark :: Bool
sbenchmark = Bool
False
, stitle :: Maybe String
stitle = Maybe String
forall a. Maybe a
Nothing
, ssavePrefixCli :: String
ssavePrefixCli = ""
, sfrontendTeletype :: Bool
sfrontendTeletype = Bool
False
, sfrontendNull :: Bool
sfrontendNull = Bool
False
, sfrontendLazy :: Bool
sfrontendLazy = Bool
False
, sdbgMsgCli :: Bool
sdbgMsgCli = Bool
False
, sstopAfterSeconds :: Maybe Int
sstopAfterSeconds = Maybe Int
forall a. Maybe a
Nothing
, sstopAfterFrames :: Maybe Int
sstopAfterFrames = Maybe Int
forall a. Maybe a
Nothing
, sprintEachScreen :: Bool
sprintEachScreen = Bool
False
, sexposePlaces :: Bool
sexposePlaces = Bool
False
, sexposeItems :: Bool
sexposeItems = Bool
False
, sexposeActors :: Bool
sexposeActors = Bool
False
}