Start to generalise text input to "terminal signal" input
This commit is contained in:
@@ -26,7 +26,7 @@ targetDistanceDraw :: Creature -> Configuration -> World -> Picture
|
||||
targetDistanceDraw cr _ w = fromMaybe mempty $ do
|
||||
p <- cr ^? crTargeting . ctPos . _Just
|
||||
let p1 = worldPosToScreen cam p
|
||||
mwp = mouseWorldPos (w ^. input) (w ^. cWorld . cwCamPos)
|
||||
mwp = mouseWorldPos (w ^. input) (w ^. cWorld . cwCam)
|
||||
p2 = worldPosToScreen cam mwp
|
||||
thecol = if dist p mwp > 100 then red else white
|
||||
return .
|
||||
@@ -35,7 +35,7 @@ targetDistanceDraw cr _ w = fromMaybe mempty $ do
|
||||
line [p1, p2]
|
||||
<> transMidLine p1 p2 (scale 0.1 0.1 . text . shortShow $ dist p mwp)
|
||||
where
|
||||
cam = w ^. cWorld . cwCamPos
|
||||
cam = w ^. cWorld . cwCam
|
||||
|
||||
targetDraw :: Picture -> Creature -> Configuration -> World -> Picture
|
||||
targetDraw f cr _ _ = fromMaybe mempty $ do
|
||||
|
||||
Reference in New Issue
Block a user