Tweak scrolling, particularly zooming
This commit is contained in:
+12
-1
@@ -1,5 +1,6 @@
|
||||
module Dodge.TestString where
|
||||
|
||||
import Dodge.Base.You
|
||||
import Control.Lens
|
||||
import Dodge.Data.Universe
|
||||
--import Data.Maybe
|
||||
@@ -8,8 +9,18 @@ import Dodge.Data.Universe
|
||||
--import qualified IntMapHelp as IM
|
||||
testStringInit :: Universe -> [String]
|
||||
testStringInit u =
|
||||
[ showTimeFlow $ u ^. uvWorld . cWorld . timeFlow
|
||||
[ show $ u ^. uvWorld . input . scrollAmount
|
||||
, maybe mempty show mit
|
||||
, maybe mempty (show . f) mit
|
||||
, maybe mempty show mit'
|
||||
, maybe mempty show mit''
|
||||
]
|
||||
where
|
||||
f x = 1/ (x *2) ** (40/39)
|
||||
ycr = you (u ^. uvWorld)
|
||||
mit = ycr ^? crInv . ix (crSel ycr) . itScope . scopeZoom
|
||||
mit' = ycr ^? crInv . ix (crSel ycr) . itScope . scopePos
|
||||
mit'' = ycr ^? crInv . ix (crSel ycr) . itScope . scopeZoomChange
|
||||
|
||||
showTimeFlow :: TimeFlowStatus -> String
|
||||
showTimeFlow tfs = case tfs of
|
||||
|
||||
Reference in New Issue
Block a user