Refactor updates
This commit is contained in:
@@ -4,7 +4,7 @@ import Data.Foldable
|
||||
import Data.Maybe
|
||||
import Dodge.Base.WinScale
|
||||
import Dodge.Base.Window
|
||||
import Dodge.Data.Universe
|
||||
import Dodge.Data.Config
|
||||
import Geometry
|
||||
import Picture
|
||||
|
||||
@@ -19,7 +19,8 @@ listPicturesAtOff tx ty cfig i = mconcat . zipWith (listTextPictureAt tx ty cfig
|
||||
-- displays a cursor that should match up to list text pictures
|
||||
-- the width of a character appears to be 9(?!)
|
||||
-- this is probably because it is 8 pixels plus one for the border
|
||||
listCursorChooseBorder :: [Bool] -> Float -> Float -> Configuration -> Int -> Color -> Int -> Int -> Picture
|
||||
listCursorChooseBorder ::
|
||||
[Bool] -> Float -> Float -> Configuration -> Int -> Color -> Int -> Int -> Picture
|
||||
listCursorChooseBorder borders xoff yoff cfig yint col cursxsize cursysize =
|
||||
winScale cfig
|
||||
. translate
|
||||
@@ -66,12 +67,11 @@ fillScreenText cfig str =
|
||||
. centerText
|
||||
$ str
|
||||
where
|
||||
wscale = hw*0.02/fromIntegral (length str)
|
||||
hscale = hh*0.01
|
||||
wscale = hw * 0.02 / fromIntegral (length str)
|
||||
hscale = hh * 0.01
|
||||
hw = halfWidth cfig
|
||||
hh = halfHeight cfig
|
||||
|
||||
|
||||
fillWidthText :: Configuration -> String -> Picture
|
||||
fillWidthText cfig str =
|
||||
winScale cfig
|
||||
@@ -79,7 +79,7 @@ fillWidthText cfig str =
|
||||
. centerText
|
||||
$ str
|
||||
where
|
||||
thescale = hw*0.02/fromIntegral (length str)
|
||||
thescale = hw * 0.02 / fromIntegral (length str)
|
||||
hw = halfWidth cfig
|
||||
|
||||
listTextPictureAt :: Float -> Float -> Configuration -> Int -> Picture -> Picture
|
||||
|
||||
Reference in New Issue
Block a user