X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=client%2Fwindow_management.py;h=4d6a403281bbd9bb1a412a222d1060c94de64440;hb=refs%2Ftags%2FTCE_proper;hp=9a50b296d22c7165ee9d757008801462e9d64090;hpb=0a56367e8396b2ece4c1bce8a25e93ceabd901c1;p=plomrogue diff --git a/client/window_management.py b/client/window_management.py index 9a50b29..4d6a403 100644 --- a/client/window_management.py +++ b/client/window_management.py @@ -18,10 +18,11 @@ screen_size = [0,0] class Window: - def __init__(self, title, draw_function, size): + def __init__(self, title, draw_function, size, draw_scroll_hints): self.title = title self.draw = types.MethodType(draw_function, self) self.size = size + self.draw_scroll_hints = draw_scroll_hints def set_windows(): @@ -95,9 +96,12 @@ def set_windows(): curses.endwin() stdscr = curses.initscr() screen_size = stdscr.getmaxyx() + global windows + windows = [] for config in windows_config: size = size_window(config["config"]) - window = Window(config["title"], config["func"], size) + window = Window(config["title"], config["func"], size, + config["scroll_hints"]) windows.append(window) place_window(window) redraw_windows = True @@ -209,7 +213,8 @@ def draw_screen(): for win in windows: offset, winmap_size, winmap = win.draw() draw_winmap() - draw_scroll_hints() + if win.draw_scroll_hints: + draw_scroll_hints() stdscr.erase() draw_window_border_lines()