1module UI.Attributes where 2import Brick 3import Brick.Forms 4import Graphics.Vty 5 6titleAttr :: AttrName 7titleAttr = attrName "title" 8 9selectedAttr :: AttrName 10selectedAttr = attrName "selected" 11 12textboxAttr :: AttrName 13textboxAttr = attrName "textbox" 14 15highlightedChoiceAttr :: AttrName 16highlightedChoiceAttr = attrName "highlighted choice" 17 18incorrectChoiceAttr :: AttrName 19incorrectChoiceAttr = attrName "incorrect choice" 20 21correctChoiceAttr :: AttrName 22correctChoiceAttr = attrName "correct choice" 23 24highlightedOptAttr :: AttrName 25highlightedOptAttr = attrName "highlighted option" 26 27selectedOptAttr :: AttrName 28selectedOptAttr = attrName "selected option" 29 30correctOptAttr :: AttrName 31correctOptAttr = attrName "correct option" 32 33incorrectOptAttr :: AttrName 34incorrectOptAttr = attrName "incorrect option" 35 36gapAttr :: AttrName 37gapAttr = attrName "gap" 38 39incorrectGapAttr :: AttrName 40incorrectGapAttr = attrName "incorrect gap" 41 42correctGapAttr :: AttrName 43correctGapAttr = attrName "correct gap" 44 45highlightedElementAttr :: AttrName 46highlightedElementAttr = attrName "highlighted element" 47 48grabbedElementAttr :: AttrName 49grabbedElementAttr = attrName "grabbed element" 50 51correctElementAttr :: AttrName 52correctElementAttr = attrName "correct element" 53 54incorrectElementAttr :: AttrName 55incorrectElementAttr = attrName "incorrect element" 56 57exceptionAttr :: AttrName 58exceptionAttr = attrName "exception" 59 60shuffledAttr :: AttrName 61shuffledAttr = attrName "shuffled indicator" 62 63yesButtonAttr :: AttrName 64yesButtonAttr = attrName "yes button" 65 66noButtonAttr :: AttrName 67noButtonAttr = attrName "no button" 68 69selectedYesButtonAttr :: AttrName 70selectedYesButtonAttr = attrName "selected yes button" 71 72selectedNoButtonAttr :: AttrName 73selectedNoButtonAttr = attrName "selected no button" 74 75correctAttr :: AttrName 76correctAttr = attrName "correct" 77 78wrongAttr :: AttrName 79wrongAttr = attrName "incorrect" 80 81theMap :: AttrMap 82theMap = attrMap defAttr 83 [ (titleAttr, fg yellow) 84 , (textboxAttr, defAttr) 85 , (highlightedChoiceAttr, fg yellow) 86 , (incorrectChoiceAttr, fg red) 87 , (correctChoiceAttr, fg green) 88 , (incorrectGapAttr, fg red `withStyle` underline) 89 , (correctGapAttr, fg green `withStyle` underline) 90 , (highlightedOptAttr, fg yellow) 91 , (selectedOptAttr, fg blue) 92 , (incorrectOptAttr, fg red) 93 , (correctOptAttr, fg green) 94 , (highlightedElementAttr, fg yellow) 95 , (grabbedElementAttr, fg blue) 96 , (correctElementAttr, fg green) 97 , (incorrectElementAttr, fg red) 98 , (gapAttr, defAttr `withStyle` underline) 99 , (selectedAttr, defAttr `withStyle` underline) 100 , (exceptionAttr, fg red) 101 , (focusedFormInputAttr, defAttr `withStyle` underline) 102 , (shuffledAttr, fg red) 103 , (correctAttr, fg green) 104 , (wrongAttr, fg red) 105 , (yesButtonAttr, fg green) 106 , (noButtonAttr, fg red) 107 , (selectedYesButtonAttr, fg green `withStyle` underline) 108 , (selectedNoButtonAttr, fg red `withStyle` underline) 109 ]