about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Xanthous/Entities/Character.hs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Xanthous/Entities/Character.hs b/src/Xanthous/Entities/Character.hs
index e2ca874dddbc..246e55071cb8 100644
--- a/src/Xanthous/Entities/Character.hs
+++ b/src/Xanthous/Entities/Character.hs
@@ -5,6 +5,7 @@ module Xanthous.Entities.Character
 --------------------------------------------------------------------------------
 import Xanthous.Prelude
 import Test.QuickCheck
+import Brick
 --------------------------------------------------------------------------------
 import Xanthous.Entities
 --------------------------------------------------------------------------------
@@ -12,7 +13,16 @@ import Xanthous.Entities
 data Character = Character
   deriving stock (Show, Eq, Ord, Generic)
   deriving anyclass (CoArbitrary, Function)
-  deriving Draw via (DrawCharacter "@" Character)
+
+scrollOffset :: Int
+scrollOffset = 5
+
+-- deriving Draw via (DrawCharacter "@" Character)
+instance Draw Character where
+  draw _ = visibleRegion rloc rreg $ str "@"
+    where
+      rloc = Location (negate scrollOffset, negate scrollOffset)
+      rreg = (2 * scrollOffset, 2 * scrollOffset)
 
 instance Entity Character where
   blocksVision _ = False