Add cursor at end of input filters
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 12 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
+1
-1
@@ -1 +1 @@
|
|||||||
All good (594 modules, at 02:32:29)
|
All good (594 modules, at 21:55:11)
|
||||||
|
|||||||
@@ -47,8 +47,12 @@ updateCombineSections w cfig =
|
|||||||
(getAvailableListLines secondColumnParams cfig)
|
(getAvailableListLines secondColumnParams cfig)
|
||||||
[(0, sclose), (-1, sfclose)]
|
[(0, sclose), (-1, sfclose)]
|
||||||
where
|
where
|
||||||
|
filtcurs = case w ^? hud . hudElement . subInventory . ciSelection . _Just . _1 of
|
||||||
|
Just (-1) -> [toEnum 219] -- filled rect
|
||||||
|
_ -> [toEnum 128] -- wire rect
|
||||||
(sfclose, sclose) =
|
(sfclose, sclose) =
|
||||||
filterSectionsPair
|
filterSectionsPair
|
||||||
|
filtcurs
|
||||||
(flip . andOrRegex $ regexCombs invitms)
|
(flip . andOrRegex $ regexCombs invitms)
|
||||||
(IM.fromDistinctAscList . zip [0 ..] $ combineList w)
|
(IM.fromDistinctAscList . zip [0 ..] $ combineList w)
|
||||||
"COMBINATIONS"
|
"COMBINATIONS"
|
||||||
@@ -106,12 +110,18 @@ updateDisplaySections w cfig =
|
|||||||
Just (2, _) -> reverse [filtinv, filtclose, closex, invx, youx]
|
Just (2, _) -> reverse [filtinv, filtclose, closex, invx, youx]
|
||||||
Just (3, _) -> reverse [filtinv, filtclose, closex, invx, youx]
|
Just (3, _) -> reverse [filtinv, filtclose, closex, invx, youx]
|
||||||
_ -> reverse [filtinv, filtclose, invx, closex, youx]
|
_ -> reverse [filtinv, filtclose, invx, closex, youx]
|
||||||
|
invfiltcurs = case mselpos ^? _Just . _1 of
|
||||||
|
Just (-1) -> [toEnum 219] -- filled rect
|
||||||
|
_ -> [toEnum 128] -- wire rect
|
||||||
(sfinv, sinv) =
|
(sfinv, sinv) =
|
||||||
filterSectionsPair plainRegex invitems "INVENTORY" $
|
filterSectionsPair invfiltcurs plainRegex invitems "INVENTORY" $
|
||||||
w ^? hud . hudElement . diInvFilter . _Just
|
w ^? hud . hudElement . diInvFilter . _Just
|
||||||
(filtinv, invx) = ((-1, sfinv), (0, sinv))
|
(filtinv, invx) = ((-1, sfinv), (0, sinv))
|
||||||
|
closefiltcurs = case mselpos ^? _Just . _1 of
|
||||||
|
Just (2) -> [toEnum 219] -- filled rect
|
||||||
|
_ -> [toEnum 128] -- wire rect
|
||||||
(sfclose, sclose) =
|
(sfclose, sclose) =
|
||||||
filterSectionsPair plainRegex closeitms "NEARBY" $
|
filterSectionsPair closefiltcurs plainRegex closeitms "NEARBY" $
|
||||||
w ^? hud . hudElement . diCloseFilter . _Just
|
w ^? hud . hudElement . diCloseFilter . _Just
|
||||||
(filtclose, closex) = ((2, sfclose), (3, sclose))
|
(filtclose, closex) = ((2, sfclose), (3, sclose))
|
||||||
youx = (1, youitems)
|
youx = (1, youitems)
|
||||||
@@ -143,12 +153,13 @@ updateDisplaySections w cfig =
|
|||||||
-- numfiltitems = " " ++ show (length itms - length itms') ++ " FILTERED"
|
-- numfiltitems = " " ++ show (length itms - length itms') ++ " FILTERED"
|
||||||
|
|
||||||
filterSectionsPair ::
|
filterSectionsPair ::
|
||||||
|
String -> -- string at the end of the input
|
||||||
(String -> SelectionItem a -> Bool) ->
|
(String -> SelectionItem a -> Bool) ->
|
||||||
IM.IntMap (SelectionItem a) ->
|
IM.IntMap (SelectionItem a) ->
|
||||||
String ->
|
String ->
|
||||||
Maybe String ->
|
Maybe String ->
|
||||||
(IM.IntMap (SelectionItem a), IM.IntMap (SelectionItem a))
|
(IM.IntMap (SelectionItem a), IM.IntMap (SelectionItem a))
|
||||||
filterSectionsPair filtfn itms filtdescription mfilt =
|
filterSectionsPair endstr filtfn itms filtdescription mfilt =
|
||||||
( filtsis
|
( filtsis
|
||||||
, itms'
|
, itms'
|
||||||
)
|
)
|
||||||
@@ -159,7 +170,7 @@ filterSectionsPair filtfn itms filtdescription mfilt =
|
|||||||
IM.singleton
|
IM.singleton
|
||||||
0
|
0
|
||||||
$ SelectionInfo
|
$ SelectionInfo
|
||||||
[filtdescription ++ " FILTER: " ++ str, numfiltitems]
|
[filtdescription ++ " FILTER:" ++ str ++ endstr, numfiltitems]
|
||||||
2
|
2
|
||||||
True
|
True
|
||||||
white
|
white
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ testStringInit :: Universe -> [String]
|
|||||||
testStringInit u = [show $ u ^? uvWorld . hud . hudElement . diSelection . _Just
|
testStringInit u = [show $ u ^? uvWorld . hud . hudElement . diSelection . _Just
|
||||||
, show $ u ^? uvWorld . cWorld . lWorld . creatures . ix 0 . crManipulation . manObject
|
, show $ u ^? uvWorld . cWorld . lWorld . creatures . ix 0 . crManipulation . manObject
|
||||||
]
|
]
|
||||||
|
-- <> [[toEnum (i+j * 32) | i <- [0..31]] | j <- [0..7]]
|
||||||
-- <> map show (IM.elems (L.postscan (L.premap _siHeight L.sum)
|
-- <> map show (IM.elems (L.postscan (L.premap _siHeight L.sum)
|
||||||
-- $ fromMaybe mempty $ u ^? uvWorld . hud . hudElement . diSections . sssSections . ix 0 . ssItems)
|
-- $ fromMaybe mempty $ u ^? uvWorld . hud . hudElement . diSections . sssSections . ix 0 . ssItems)
|
||||||
-- )
|
-- )
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ preloadRender = do
|
|||||||
-- initTexture2DArray 50 "data/texture/charMapVertBig.png" 2 32 64 95 GL_NEAREST_MIPMAP_LINEAR GL_LINEAR
|
-- initTexture2DArray 50 "data/texture/charMapVertBig.png" 2 32 64 95 GL_NEAREST_MIPMAP_LINEAR GL_LINEAR
|
||||||
--initTexture2DArray 50 "data/texture/charMapVert16Block.png" 2 16 32 95 GL_NEAREST GL_NEAREST
|
--initTexture2DArray 50 "data/texture/charMapVert16Block.png" 2 16 32 95 GL_NEAREST GL_NEAREST
|
||||||
--initTexture2DArray 50 "data/charMaps/charMapVert16Tall.png" 2 16 32 95 GL_NEAREST GL_NEAREST
|
--initTexture2DArray 50 "data/charMaps/charMapVert16Tall.png" 2 16 32 95 GL_NEAREST GL_NEAREST
|
||||||
initTexture2DArray 50 "data/charMaps/cMap16x32.CodePage437.png" 2 16 32 255 GL_NEAREST GL_NEAREST
|
initTexture2DArray 50 "data/charMaps/cMap16x32.Custom.png" 2 16 32 256 GL_NEAREST GL_NEAREST
|
||||||
--initTexture2DArray 50 "data/texture/charMapVert8Block.png" 2 8 16 95 GL_NEAREST GL_NEAREST
|
--initTexture2DArray 50 "data/texture/charMapVert8Block.png" 2 8 16 95 GL_NEAREST GL_NEAREST
|
||||||
--initTexture2DArray 50 "data/texture/charMapVertBig.png" 2 32 64 95 GL_LINEAR_MIPMAP_LINEAR GL_LINEAR
|
--initTexture2DArray 50 "data/texture/charMapVertBig.png" 2 32 64 95 GL_LINEAR_MIPMAP_LINEAR GL_LINEAR
|
||||||
--initTexture2DArray 50 "data/texture/charMapVertBig.png" 2 32 64 95 GL_LINEAR_MIPMAP_NEAREST GL_LINEAR
|
--initTexture2DArray 50 "data/texture/charMapVertBig.png" 2 32 64 95 GL_LINEAR_MIPMAP_NEAREST GL_LINEAR
|
||||||
|
|||||||
Reference in New Issue
Block a user