Fix bug concerning effects when dropping items

This commit is contained in:
2023-05-03 22:12:19 +01:00
parent d99d612e68
commit 487280a475
5 changed files with 72 additions and 114 deletions
+4 -5
View File
@@ -83,7 +83,8 @@ optionsToSelections maxlines u allops pmo = case pmo of
| maxlines >= length allops = allops
| otherwise = take (maxlines - 2) (drop offset allops ++ repeat dummyMenuOption) ++ [cycleOptionsOption]
maxOptionLength = 3 + maximum (0 : map (optionValueOffset u) ops)
cycleOptionsOption = Toggle cycleOptions (const (MODString ("MORE OPTIONS " ++ show n ++ "/" ++ show m)))
cycleOptionsOption = Toggle cycleOptions
(const (MODString ("MORE OPTIONS " ++ show n ++ "/" ++ show m)))
l = length allops
m = div (l - 1) (max 1 (maxlines - 2)) + 1
n = div (offset + 1) (max 1 (maxlines - 2)) + 1
@@ -108,8 +109,7 @@ colStrToSelItem (col, str) =
{ _siPictures = [str]
, _siHeight = 1
, _siIsSelectable = True
, --, _siWidth = length str
_siColor = col
, _siColor = col
, _siOffX = 0
, _siPayload = id
}
@@ -129,8 +129,7 @@ menuOptionToSelectionItem w padAmount mo =
{ _siPictures = [optionText]
, _siHeight = 1
, _siIsSelectable = isselectable
, --, _siWidth = length optionText
_siColor = thecol
, _siColor = thecol
, _siOffX = 0
, _siPayload = (f, g)
}