mirror of
https://github.com/swarm-game/swarm.git
synced 2024-10-28 03:27:12 +03:00
line-wrap recipes
This is a partial solution to #48, and way better than nothing. However, it's a bit difficult to read the wrapped recipes; ideally the continuation lines would be indented, so it would be easy to tell visually where a new recipe starts. But it doesn't seem possible to do this given the current `brick` API. I've created an upstream issue for it here: https://github.com/jtdaugherty/word-wrap/issues/8
This commit is contained in:
parent
ac16448485
commit
cdaef2decc
@ -246,7 +246,7 @@ explainFocusedItem s = case mItem of
|
|||||||
mItem = mList >>= BL.listSelectedElement >>= (Just . snd)
|
mItem = mList >>= BL.listSelectedElement >>= (Just . snd)
|
||||||
|
|
||||||
explainRecipes :: Entity -> [Widget Name]
|
explainRecipes :: Entity -> [Widget Name]
|
||||||
explainRecipes = map (txt . prettyRecipe) . recipesWith
|
explainRecipes = map (txtWrap . prettyRecipe) . recipesWith
|
||||||
|
|
||||||
recipesWith :: Entity -> [Recipe Entity]
|
recipesWith :: Entity -> [Recipe Entity]
|
||||||
recipesWith e = S.toList . S.fromList $
|
recipesWith e = S.toList . S.fromList $
|
||||||
|
Loading…
Reference in New Issue
Block a user