Quick hack to make window rendering passable
Before windows drew even on black backgrounds
This commit is contained in:
+5
-8
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user