Commit 434ac954 authored by Fjen Undso's avatar Fjen Undso
Browse files

nchl: rearange gui

parent 8065dc0d
......@@ -41,7 +41,7 @@ def main(stdscr):
ProgressBar(
window=stdscr,
row=0,
col=i * 8,
col=4 + i * 8,
width=5,
height=12,
value=255,
......@@ -51,7 +51,7 @@ def main(stdscr):
numbers = [
NumberRange(
window=stdscr,
col=i * 8,
col=4+ i * 8,
row=12,
value=255,
prev_key='KEY_DOWN',
......@@ -64,18 +64,27 @@ def main(stdscr):
prev_key='KEY_LEFT',
next_key='KEY_RIGHT')
checkboxes = [
checkboxes_top = [
CheckBox(
window=stdscr,
col=0,
row=i + 13,
col=i // 2 * 10,
row=14,
toggle_key=' ',
text='ESP' +
str(i)) for i in range(1, 9)]
toggle_key_unfocused=str(i),
text='ESP' + str(i)) for i in [1, 3, 5, 7]]
checkboxes_bottom = [
CheckBox(
window=stdscr,
col=(i - 1) // 2 * 10,
row=15,
toggle_key=' ',
toggle_key_unfocused=str(i),
text='ESP' + str(i)) for i in [2, 4, 6, 8]]
fs_cb = FocusSwitcher(
elements=checkboxes,
prev_key='KEY_UP',
next_key='KEY_DOWN')
elements=checkboxes_top + checkboxes_bottom,
prev_key='KEY_LEFT',
next_key='KEY_RIGHT')
fs_main = FocusSwitcher(elements=[fs_n, fs_cb], prev_key='\t')
fs_main.toggle_focus()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment