diff --git a/src/Mtlstats/Config.hs b/src/Mtlstats/Config.hs index e02aacc..392c17d 100644 --- a/src/Mtlstats/Config.hs +++ b/src/Mtlstats/Config.hs @@ -24,3 +24,7 @@ module Mtlstats.Config where -- | The name of the team whose stats we're tracking myTeam :: String myTeam = "MONTREAL" + +-- | The maximum number of function keys +maxFunKeys :: Int +maxFunKeys = 9 diff --git a/src/Mtlstats/Prompt.hs b/src/Mtlstats/Prompt.hs index 7e5fcf7..04bb138 100644 --- a/src/Mtlstats/Prompt.hs +++ b/src/Mtlstats/Prompt.hs @@ -50,6 +50,7 @@ import Text.Read (readMaybe) import qualified UI.NCurses as C import Mtlstats.Actions +import Mtlstats.Config import Mtlstats.Format import Mtlstats.Types import Mtlstats.Util @@ -159,7 +160,7 @@ selectPlayerPrompt pStr callback = Prompt C.drawString sStr (row, col) <- C.cursorPosition 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_ (\(n, (_, p)) -> C.drawString $ "F" ++ show n ++ ") " ++ p^.pName ++ " (" ++ show (p^.pNumber) ++ ")\n")