From 7a58d222ad9b0f4f077c61988a6443704b2f585a Mon Sep 17 00:00:00 2001 From: nek0 Date: Wed, 1 May 2024 23:53:12 +0200 Subject: [PATCH] starting to make grahics --- src-client/Main.hs | 9 +++++---- src-server/Server/Communication.hs | 2 +- wizard-wipeout.cabal | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src-client/Main.hs b/src-client/Main.hs index b349c09..3a25eb2 100644 --- a/src-client/Main.hs +++ b/src-client/Main.hs @@ -13,6 +13,7 @@ import Data.IORef import qualified Data.Matrix as M import Graphics.Vty +import Graphics.Vty.CrossPlatform import Options.Applicative @@ -58,9 +59,8 @@ main = do playerWizard <- head <$> STM.atomically (STM.flushTQueue queue) putStrLn $ "received wizard: " <> show (initWizard playerWizard) - -- cfg <- standardIOConfig - -- vty <- mkVty cfg - -- hideCursor (outputIface vty) + vty <- mkVty defaultConfig + hideCursor (outputIface vty) -- shut down graphical interface for now -- shutdown vty @@ -79,7 +79,8 @@ main = do ) initRead initState - -- shutdown vty + showCursor (outputIface vty) + shutdown vty putStrLn "Shutting down client…" -- threadDelay 100 -- close sock diff --git a/src-server/Server/Communication.hs b/src-server/Server/Communication.hs index 79e6a86..9879ae3 100644 --- a/src-server/Server/Communication.hs +++ b/src-server/Server/Communication.hs @@ -8,7 +8,7 @@ import Control.Concurrent import qualified Control.Concurrent.STM as STM -import Control.Exception.Base +import Control.Exception import Control.Monad diff --git a/wizard-wipeout.cabal b/wizard-wipeout.cabal index 7267314..29c1def 100644 --- a/wizard-wipeout.cabal +++ b/wizard-wipeout.cabal @@ -55,6 +55,7 @@ executable wizard-wipeout-client , uuid , vector , vty + , vty-crossplatform , wizard-wipeout hs-source-dirs: src-client default-language: GHC2021