grey rather than harsh white background

This commit is contained in:
Kartik K. Agaram 2021-12-04 20:54:01 -08:00
parent 0429cfca74
commit 8807168729
2 changed files with 7 additions and 6 deletions

View File

@ -45,17 +45,17 @@ function render_tower(window, line, col, tower_index, tower)
window:attron(curses.A_BOLD)
window:mvaddch(line+2, col, string.char(96+tower_index))
window:attroff(curses.A_BOLD)
window:attron(curses.color_pair(7))
window:attron(curses.color_pair(15))
window:mvaddstr(line+1, col-6, " ")
window:attroff(curses.color_pair(7))
window:attroff(curses.color_pair(15))
for i, n in ipairs(tower) do
render_disk(window, line, col, n)
line = line - 1
end
for i=1,5-len(tower)+1 do
window:attron(curses.color_pair(7))
window:attron(curses.color_pair(15))
window:mvaddstr(line, col, " ")
window:attroff(curses.color_pair(7))
window:attroff(curses.color_pair(15))
line = line - 1
end
end]==],
@ -88,6 +88,7 @@ function main()
for i=1,7 do
curses.init_pair(i, 0, i)
end
curses.init_pair(15, 0, 15)
curses.init_pair(255, 15, 1) -- reserved for Teliva error messages
while true do

View File

@ -929,7 +929,7 @@ extern void cleanup_curses (void);
void developer_mode (lua_State *L) {
/* clobber the app's ncurses colors; we'll restart the app when we rerun it. */
for (int i = 0; i < 8; ++i)
init_pair(i, i, 15);
init_pair(i, i, 7);
for (int i = 0; i < 8; ++i)
init_pair(i+8, 0, i);
init_pair(255, /*white fg*/ 15, /*red bg*/ 1); /* for teliva error messages */
@ -1034,7 +1034,7 @@ int main (int argc, char **argv) {
initscr();
keypad(stdscr, 1);
start_color();
assume_default_colors(0, 15);
assume_default_colors(0, 7);
draw_menu(L);
echo();
s.argc = argc;