Move configuration from world to universe
This commit is contained in:
@@ -30,9 +30,10 @@ fixedSizePicClamp
|
||||
-> Int -- ^ vertical border
|
||||
-> Picture
|
||||
-> Point2
|
||||
-> Configuration
|
||||
-> World
|
||||
-> Picture
|
||||
fixedSizePicClamp xbord ybord pic p w
|
||||
fixedSizePicClamp xbord ybord pic p cfig w
|
||||
= setLayer 4
|
||||
-- . setDepth 50
|
||||
. translate x y
|
||||
@@ -46,23 +47,24 @@ fixedSizePicClamp xbord ybord pic p w
|
||||
theScale = 1 / _cameraZoom w
|
||||
(V2 x y) = campos +.+ rotateV (negate r) (V2 xr' yr')
|
||||
(V2 xr yr) = rotateV r v
|
||||
xr' = absClamp ((halfWidth w - fromIntegral xbord) / z) xr
|
||||
yr' = absClamp ((halfHeight w - fromIntegral ybord) / z) yr
|
||||
xr' = absClamp ((halfWidth cfig - fromIntegral xbord) / z) xr
|
||||
yr' = absClamp ((halfHeight cfig - fromIntegral ybord) / z) yr
|
||||
|
||||
fixedSizePicClampArrow
|
||||
:: Float -- ^ horizontal border
|
||||
-> Float -- ^ vertical border
|
||||
-> Picture
|
||||
-> Point2
|
||||
-> Configuration
|
||||
-> World
|
||||
-> Picture
|
||||
fixedSizePicClampArrow xbord ybord pic p w = pictures
|
||||
fixedSizePicClampArrow xbord ybord pic p cfig w = pictures
|
||||
[ setLayer 4 . translate x y . scale theScale theScale $ pic
|
||||
, setLayer 4 . color white . setDepth 20 $ arrowPic
|
||||
]
|
||||
where
|
||||
winps = screenPolygon w
|
||||
bords = screenPolygonBord xbord ybord w
|
||||
winps = screenPolygon cfig w
|
||||
bords = screenPolygonBord xbord ybord cfig w
|
||||
borderPoint = intersectSegPolyFirst campos p bords
|
||||
windowPoint = intersectSegPolyFirst campos p winps
|
||||
arrowPic = case borderPoint of
|
||||
|
||||
Reference in New Issue
Block a user