Quick hack to make window rendering passable

Before windows drew even on black backgrounds
This commit is contained in:
2025-11-23 00:24:14 +00:00
parent 229350120a
commit 74c02291c1
7 changed files with 93 additions and 106 deletions
+5 -8
View File
@@ -387,12 +387,9 @@ getMenuMouseContext :: ScreenLayer -> Universe -> MouseContext
getMenuMouseContext screen u = case screen ^. scOptions of
[] -> NoMouseContext
_ -> fromMaybe MouseMenuCursor $ do
ymax <- length <$> screen ^? scSelectionList
yi <- ldpSelection (u ^. uvConfig) menuLDP (u ^. uvWorld . input . mousePos)
guard (yi >= 0 && yi < ymax)
return $ case screen ^? scSelectionList . ix yi . siIsSelectable of
Just True -> MouseMenuClick yi
_ -> NoMouseContext
t <- screen ^? scSelectionList . ix yi . siIsSelectable
return $ if t then MouseMenuClick yi else NoMouseContext
isOverTerminalScreen :: Config -> Point2 -> Bool
isOverTerminalScreen cfig (V2 x y) =
@@ -410,9 +407,9 @@ isOverTerminalScreen cfig (V2 x y) =
xmax = xmin + 555 -- HACK drawSelectionListBackground
updateWheelEvents :: World -> World
updateWheelEvents w
| 0 <- w ^. input . scrollAmount = w
| yi <- w ^. input . scrollAmount = updateWheelEvent yi w
updateWheelEvents w = case w ^. input . scrollAmount of
0 -> w
yi -> updateWheelEvent yi w
advanceScrollAmount :: Universe -> Universe
advanceScrollAmount =