Skip to content

Commit

Permalink
Add hud to main screen
Browse files Browse the repository at this point in the history
  • Loading branch information
itsTheFae committed Dec 23, 2024
1 parent 405dd96 commit 53b1ab7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def main_screen(self) -> None:
selected = False

while True:
_max_y, max_x = self.scr.getmaxyx()
max_y, max_x = self.scr.getmaxyx()
self.scr.clear()
self.scr.addstr(0, 0, "Select configuration to edit:", curses.A_BOLD)

Expand Down Expand Up @@ -485,6 +485,14 @@ def main_screen(self) -> None:
self.scr.hline(2, 0, curses.ACS_HLINE, max_x)
self.scr.addstr(3, 2, config_files[config_types[config_sel]])

# Show HUD
hud = " [ESC] Quit [ENTER] Confirm [ARROW KEYS] Navigate"
pad = max_x - len(hud) - 1
hud += " " * pad
self.scr.addstr(
max_y - 1, 0, hud[: max_x - 1], curses.color_pair(1) | curses.A_BOLD
)

# Get user input
key = self.scr.getch()
if key in KEYS_NAV_PREV:
Expand Down

0 comments on commit 53b1ab7

Please sign in to comment.