Add depth clear/check to fixed layer pictures

This commit is contained in:
2024-11-17 20:01:17 +00:00
parent d5be125a3b
commit afddcae6d1
7 changed files with 185 additions and 207 deletions
+1 -19
View File
@@ -37,14 +37,13 @@ doInputScreenInput s u =
| ispressed ScancodeEscape = uvScreenLayers %~ tail
| otherwise = id
-- note mouse over handled by updateMouseContext
optionScreenUpdate :: Universe -> Universe
optionScreenUpdate u =
(uvScreenLayers . ix 0 . scDisplayTime +~ 1)
. refreshOptionsSelectionList
-- . mouseOverSelectionList
. optionScreenDefaultEffect
. mouseClickOptionsList
-- . menuWheelEvents
. over (uvScreenLayers . _head) (setSelectionListRestriction (u ^. uvConfig))
$ u
@@ -71,23 +70,6 @@ mouseClickOptionsList u = fromMaybe u $ do
return $ f u
_ -> u
--mouseOverSelectionList :: Universe -> Universe
--mouseOverSelectionList u = fromMaybe u $ do
-- screen <- u ^? uvScreenLayers . ix 0
-- ldps <- screen ^? scListDisplayParams
-- let ymax = maybe 0 length $ screen ^? scSelectionList . slItems
-- yi <- ldpVerticalSelection (u ^. uvConfig) ldps (u ^. uvWorld . input . mousePos)
-- guard $ mmoving || (_scDisplayTime screen <= 1)
-- let myi = do
-- guard (yi >= 0 && yi < ymax && isselectable yi)
-- return yi
-- return $ u & uvScreenLayers . _head . scSelectionList . slSelPos .~ myi
-- where
-- isselectable yi =
-- fromMaybe False $
-- u ^? uvScreenLayers . _head . scSelectionList . slItems . ix yi . siIsSelectable
-- mmoving = u ^. uvWorld . input . mouseMoving
ldpVerticalSelection :: Configuration -> ListDisplayParams -> Point2 -> Maybe Int
ldpVerticalSelection cfig ldp (V2 _ y)
| yupper == ylower = Just yupper