limit number of player shortcuts displayed
This commit is contained in:
parent
f7e6ac9437
commit
e3388c45c7
|
@ -24,3 +24,7 @@ module Mtlstats.Config where
|
||||||
-- | The name of the team whose stats we're tracking
|
-- | The name of the team whose stats we're tracking
|
||||||
myTeam :: String
|
myTeam :: String
|
||||||
myTeam = "MONTREAL"
|
myTeam = "MONTREAL"
|
||||||
|
|
||||||
|
-- | The maximum number of function keys
|
||||||
|
maxFunKeys :: Int
|
||||||
|
maxFunKeys = 9
|
||||||
|
|
|
@ -50,6 +50,7 @@ import Text.Read (readMaybe)
|
||||||
import qualified UI.NCurses as C
|
import qualified UI.NCurses as C
|
||||||
|
|
||||||
import Mtlstats.Actions
|
import Mtlstats.Actions
|
||||||
|
import Mtlstats.Config
|
||||||
import Mtlstats.Format
|
import Mtlstats.Format
|
||||||
import Mtlstats.Types
|
import Mtlstats.Types
|
||||||
import Mtlstats.Util
|
import Mtlstats.Util
|
||||||
|
@ -159,7 +160,7 @@ selectPlayerPrompt pStr callback = Prompt
|
||||||
C.drawString sStr
|
C.drawString sStr
|
||||||
(row, col) <- C.cursorPosition
|
(row, col) <- C.cursorPosition
|
||||||
C.drawString "\n\nPlayer select:\n"
|
C.drawString "\n\nPlayer select:\n"
|
||||||
let sel = zip [1..] $ playerSearch sStr $ s^.database.dbPlayers
|
let sel = zip [1..maxFunKeys] $ playerSearch sStr $ s^.database.dbPlayers
|
||||||
mapM_
|
mapM_
|
||||||
(\(n, (_, p)) -> C.drawString $
|
(\(n, (_, p)) -> C.drawString $
|
||||||
"F" ++ show n ++ ") " ++ p^.pName ++ " (" ++ show (p^.pNumber) ++ ")\n")
|
"F" ++ show n ++ ") " ++ p^.pName ++ " (" ++ show (p^.pNumber) ++ ")\n")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user