diff options
| author | Teddy Wing | 2015-10-08 00:55:39 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-10-08 00:55:39 -0400 |
| commit | c9934c4b1192f50ae0d6930381622c58fbe7048a (patch) | |
| tree | 779fc4ddeb0aea1f851e185623ad50b17bb5025a | |
| parent | 6bbc69f42dbb52272b9dd4b75f4573f32e82cab9 (diff) | |
| download | vim-space-vlaze-c9934c4b1192f50ae0d6930381622c58fbe7048a.tar.bz2 | |
Add colours
* Need to hard-code the enemy and player characters in order for the
`syntax match` calls to work
* Enemies are a brownish colour (to remind you of popcorn kernels)
* The player is a pinkish colour because it's vibrant and contrasts with
the brown of the enemies
* Lives have a maroon/burgundy background colour
* Score has a purple background colour that's similar enough in shade to
the lives section to make it part of the same context but different
enough to make it it's own section
* Add a `|` pipe character in front of score in order to be able to
colour it correctly even if the player has 0 lives left.
| -rw-r--r-- | autoload/space_vlaze/colors.vim | 8 | ||||
| -rw-r--r-- | autoload/space_vlaze/life.vim | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/autoload/space_vlaze/colors.vim b/autoload/space_vlaze/colors.vim index f10901b..1d06dc0 100644 --- a/autoload/space_vlaze/colors.vim +++ b/autoload/space_vlaze/colors.vim @@ -1,3 +1,11 @@ function! space_vlaze#colors#Initialize() + syntax match Enemy '♤' + syntax match Player '◆' + syntax match Lives /^|.*/ + syntax match Score /^Score: .\+/ + highlight Enemy ctermfg=136 ctermbg=NONE + highlight Player ctermfg=200 ctermbg=NONE + highlight Lives ctermfg=255 ctermbg=89 + highlight Score ctermfg=255 ctermbg=92 endfunction diff --git a/autoload/space_vlaze/life.vim b/autoload/space_vlaze/life.vim index a66529d..1bb9dac 100644 --- a/autoload/space_vlaze/life.vim +++ b/autoload/space_vlaze/life.vim @@ -19,7 +19,7 @@ endfunction function! space_vlaze#life#RenderLives() let lives_line = space_vlaze#game#BoardHeight() + 1 - let lives_display = '' + let lives_display = '|' let i = 0 while i < s:lives |
