--------------------------------------------------------------------------------
-- |
-- Module      :  Keyboard
-- Copyright   :  (c) Vladimir Lopatin 2022
-- License     :  BSD-3-Clause
--
-- Maintainer  :  Vladimir Lopatin <madjestic13@gmail.com>
-- Stability   :  provisional
-- Portability :  portable
--
-- A basic keyboard control structure.
--
--------------------------------------------------------------------------------

module Graphics.RedViz.Input.Keyboard
  ( Keyboard (..)
  , Keys (..)
  ) where

import Linear.V3

data Keyboard
  =  Keyboard
  { -- | Keyboard State
    Keyboard -> Keys
keys    :: Keys
  , Keyboard -> [V3 Double]
keyVecs :: [V3 Double]
  } deriving Int -> Keyboard -> ShowS
[Keyboard] -> ShowS
Keyboard -> String
(Int -> Keyboard -> ShowS)
-> (Keyboard -> String) -> ([Keyboard] -> ShowS) -> Show Keyboard
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Keyboard] -> ShowS
$cshowList :: [Keyboard] -> ShowS
show :: Keyboard -> String
$cshow :: Keyboard -> String
showsPrec :: Int -> Keyboard -> ShowS
$cshowsPrec :: Int -> Keyboard -> ShowS
Show

data Keys =
     Keys
     { Keys -> Bool
keyW      :: Bool
     , Keys -> Bool
keyS      :: Bool
     , Keys -> Bool
keyA      :: Bool
     , Keys -> Bool
keyD      :: Bool
     , Keys -> Bool
keyQ      :: Bool
     , Keys -> Bool
keyE      :: Bool
     , Keys -> Bool
keyZ      :: Bool
     , Keys -> Bool
keyC      :: Bool
     , Keys -> Bool
keyUp     :: Bool
     , Keys -> Bool
keyDown   :: Bool
     , Keys -> Bool
keyLeft   :: Bool
     , Keys -> Bool
keyRight  :: Bool
     , Keys -> Bool
keyPageUp :: Bool
     , Keys -> Bool
keyPageDown :: Bool
     , Keys -> Bool
keyLShift :: Bool
     , Keys -> Bool
keyLCtrl  :: Bool
     , Keys -> Bool
keyLAlt   :: Bool
     } deriving Int -> Keys -> ShowS
[Keys] -> ShowS
Keys -> String
(Int -> Keys -> ShowS)
-> (Keys -> String) -> ([Keys] -> ShowS) -> Show Keys
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Keys] -> ShowS
$cshowList :: [Keys] -> ShowS
show :: Keys -> String
$cshow :: Keys -> String
showsPrec :: Int -> Keys -> ShowS
$cshowsPrec :: Int -> Keys -> ShowS
Show