home · contact · privacy
Invert color for examiner cursor.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 10 Apr 2019 00:07:00 +0000 (02:07 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 10 Apr 2019 00:07:00 +0000 (02:07 +0200)
new/example_client.py

index 44b0993dbff05d4705946518dee944025192b318..5fc3063da146b2a4be1a26e47bc7f61169de903d 100755 (executable)
@@ -412,6 +412,8 @@ class MapWidget(Widget):
                     chars_with_attrs += [(c, curses.color_pair(2))]
                 elif c in {'x', 'X', '#'}:
                     chars_with_attrs += [(c, curses.color_pair(3))]
+                elif c == '?':
+                    chars_with_attrs += [(c, curses.color_pair(5))]
                 else:
                     chars_with_attrs += [c]
             return chars_with_attrs
@@ -584,6 +586,7 @@ class TUI:
             curses.init_pair(2, curses.COLOR_BLACK, curses.COLOR_GREEN)
             curses.init_pair(3, curses.COLOR_BLACK, curses.COLOR_BLUE)
             curses.init_pair(4, curses.COLOR_BLACK, curses.COLOR_YELLOW)
+            curses.init_pair(5, curses.COLOR_BLACK, curses.COLOR_WHITE)
 
         # Basic curses initialization work.
         setup_screen(stdscr)