From: Armaan Bhojwani Date: Sun, 31 Jan 2021 04:01:47 +0000 (-0500) Subject: Add more info to header X-Git-Tag: v0.1.0~3 X-Git-Url: https://git.armaanb.net/?p=lightcards.git;a=commitdiff_plain;h=90fb4e0e5bf9ff317484ce1f2a385db19500c368 Add more info to header Shows card position always, and front side when on the back --- diff --git a/lightcards/display.py b/lightcards/display.py index 0e58870..a4d6f2b 100755 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -63,9 +63,14 @@ def disp_card(stdscr, stack, headers, obj): if obj.getIdx() == len(stack): disp_menu(stdscr, stack, headers, obj) else: - side_title = headers[obj.getSide()] - stdscr.addstr(side_title + "\n") - for i in range(len(side_title)): + if obj.getSide() == 0: + top = headers[obj.getSide()] + " " + str(obj.getIdx() + 1) + "\n" + else: + top = headers[obj.getSide()] + " " + str(obj.getIdx() + 1) + \ + "; " + str(stack[obj.getIdx()][0]) + "\n" + + stdscr.addstr(top) + for i in range(len(top)): stdscr.addch("=") stdscr.addstr("\n" + str(stack[obj.getIdx()][obj.getSide()])) disp_bar(stdscr, stack, headers, obj)