This commit is contained in:
2022-12-28 01:12:10 +00:00
parent c71af99ff7
commit 2d4a55dee0
8 changed files with 35 additions and 21 deletions
+5 -2
View File
@@ -103,7 +103,9 @@ mouseClickOptionsList screen u = fromMaybe u $ do
mouseOverSelectionList :: ListDisplayParams -> SelectionList (Universe -> Universe) -> Universe -> Universe
mouseOverSelectionList ldps sl u
| x > xl && x < xr && ylower == yupper && mmoving
| x > xl && x < xr
&& ylower == yupper
&& mmoving
&& ylower >= 0
&& ylower < ymax
&& isselectable =
@@ -118,7 +120,8 @@ mouseOverSelectionList ldps sl u
ylower = ceiling $ (hh - (75 + y + _ldpPosY ldps)) / 50
yupper = floor $ (hh - (15 + y + _ldpPosY ldps)) / 50
xl = _ldpPosX ldps - hw
xr = xl + _ldpScale ldps * 15 * 9
--xr = xl + _ldpScale ldps * 15 * 9
xr = xl + _ldpScale ldps * 26 * 9
V2 x y = u ^. uvWorld . input . mousePos
cfig = u ^. uvConfig
hh = halfHeight cfig