Add support for clamping pictures to be inside screen

This commit is contained in:
2021-09-10 11:38:24 +01:00
parent 70c97f5367
commit 87a9745d37
4 changed files with 55 additions and 9 deletions
+1 -8
View File
@@ -12,7 +12,7 @@ import Preload.Update
import Dodge.Base.Window
import Dodge.SoundLogic
import Picture
import Geometry
--import Geometry
import Control.Lens
import Data.Maybe
@@ -193,10 +193,3 @@ controlsList = pictures $ concat $ zipWith butAndEff
,translate 0 y $ scale 0.15 0.15 $ color white $ text etext
]
screenBox
:: World
-> [Point2]
screenBox w = rectNSEW hh (-hh) hw (-hw)
where
hw = halfWidth w
hh = halfHeight w