Partial inventory display update
This commit is contained in:
@@ -6,6 +6,7 @@ Description : Simulation update
|
||||
-}
|
||||
module Dodge.Update (updateUniverse) where
|
||||
|
||||
import Dodge.DisplayInventory
|
||||
import Dodge.ScrollValue
|
||||
import Color
|
||||
import Control.Applicative
|
||||
@@ -72,6 +73,7 @@ updateUniverse u =
|
||||
. over (uvWorld . input . textInput) (const mempty)
|
||||
. updateUniverseMid
|
||||
. updateUseInput
|
||||
. updateInventoryDisplay
|
||||
. over uvWorld (updateCamera cfig)
|
||||
. over (uvWorld . input) updateScrollTestValue
|
||||
. over (uvWorld . cWorld . cClock) (+ 1)
|
||||
@@ -79,6 +81,11 @@ updateUniverse u =
|
||||
where
|
||||
cfig = u ^. uvConfig
|
||||
|
||||
updateInventoryDisplay :: Universe -> Universe
|
||||
updateInventoryDisplay u = u & uvWorld . hud . hudElement . diSections %~ const di
|
||||
where
|
||||
di = makeDisplayInventory (_uvWorld u) (_uvConfig u)
|
||||
|
||||
maybeOpenTerminal :: Universe -> Universe
|
||||
maybeOpenTerminal u = case u ^. uvWorld . input . pressedKeys . at ScancodeSemicolon of
|
||||
Just InitialPress -> gotoTerminal u
|
||||
|
||||
Reference in New Issue
Block a user