module GTKMain (main) where

import Debug
import BattleContext
import GTKInitialization (initUI, buildUI, setupUI, startUI)

import Data.IORef
import Control.Monad.Trans.Reader (runReaderT)


dataDir = "/usr/home/nbrk/projects/haskell/ld/executable"


main :: IO ()
main = do
  putInfo "Starting GTK application"
  putInfo $ "Data dir: " ++ dataDir

  bc <- newFromScenario testScenario

  initUI
  gtkctx <- buildUI bc dataDir
  runReaderT setupUI gtkctx
  runReaderT startUI gtkctx

  putInfo "Exiting GTK application"

