From 7b82b09e87d1475acf5040c67323421699a3ad06 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Tue, 2 Jul 2024 17:20:34 +0200 Subject: Hidding help by default. --- src/argaze/__main__.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/argaze/__main__.py b/src/argaze/__main__.py index 77875a8..76e9664 100644 --- a/src/argaze/__main__.py +++ b/src/argaze/__main__.py @@ -60,9 +60,10 @@ def load_context(args): if draw_help: cv2.rectangle(image, (int(width/4), int(height/3)), (int(width*3/4), int(height*2/3)), (127, 127, 127), -1) + cv2.rectangle(image, (int(width/4), int(height/3)), (int(width*3/4), int(height*2/3)), (255, 255, 255), 1) info_stack = 1 - cv2.putText(image, f'HELP', (int(width/4)+20, int(height/3)+(info_stack*40)), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 1, cv2.LINE_AA) + cv2.putText(image, f'(H)elp', (int(width/4)+20, int(height/3)+(info_stack*40)), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 1, cv2.LINE_AA) # Blanck line info_stack += 1 @@ -82,13 +83,14 @@ def load_context(args): info_stack += 1 cv2.putText(image, f'Press f to pause/resume visualisation', (int(width/4)+20, int(height/3)+(info_stack*40)), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 1, cv2.LINE_AA) - - info_stack += 1 - cv2.putText(image, f'Press h to hide/show this help panel', (int(width/4)+20, int(height/3)+(info_stack*40)), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 1, cv2.LINE_AA) info_stack += 1 cv2.putText(image, f'Press Escape to quit', (int(width/4)+20, int(height/3)+(info_stack*40)), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 1, cv2.LINE_AA) + else: + + cv2.putText(image, f'(H)elp', (width-105, height - 15), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 1, cv2.LINE_AA) + if args.display is not None: display_size = tuple(args.display) @@ -127,7 +129,7 @@ def load_context(args): # Draw parameters draw_pipeline = True - draw_help = True + draw_help = False # Waiting for 'ctrl+C' interruption with contextlib.suppress(KeyboardInterrupt), os.fdopen(pipe_file) if args.pipe_path is not None else contextlib.nullcontext() as pipe: -- cgit v1.1