From 90fb4e0e5bf9ff317484ce1f2a385db19500c368 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Sat, 30 Jan 2021 23:01:47 -0500 Subject: [PATCH] Add more info to header Shows card position always, and front side when on the back --- lightcards/display.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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) -- 2.39.2