Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Fjen Undso
nchl
Commits
434ac954
Commit
434ac954
authored
Jan 23, 2018
by
Fjen Undso
Browse files
nchl: rearange gui
parent
8065dc0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
nchl.py
View file @
434ac954
...
...
@@ -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
*
1
0
,
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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment