Commit 3658a8a1 authored by Fjen Undso's avatar Fjen Undso
Browse files

cleanup

parent c3815967
......@@ -3,14 +3,14 @@ from .abstracts.drawable import Drawable
class NumberRange(Drawable):
def __init__(self, *, window, row=0, col=0, value=0, text='',
attr=curses.A_STANDOUT, min_value=0, max_value=255,
prev_key=None, next_key=None):
def __init__(self, *, window, row=0, col=0, value=0, min_value=0,
max_value=255, text='', attr=curses.A_STANDOUT, prev_key=None,
next_key=None):
self.value = value
self.text = text
self.attr = attr
self.min = min_value
self.max = max_value
self.text = text
self.attr = attr
self.prev_key = prev_key
self.next_key = next_key
Drawable.__init__(self, window=window, row=row, col=col)
......
......@@ -3,14 +3,14 @@ from .abstracts.drawable import Drawable
class ProgressBar(Drawable):
def __init__(self, *, window, row=0, col=0, width=0, height=0, text='',
max_value=100, attr=curses.A_STANDOUT):
def __init__(self, *, window, row=0, col=0, width=0, height=0, value=0,
max_value=100, text='', attr=curses.A_STANDOUT):
self.width = width
self.height = height
self.value = value
self.max = max_value
self.value = 0
self.attr = attr
self.text = text
self.attr = attr
Drawable.__init__(self, window=window.subwin(height, width, row, col), row=row, col=col)
def draw(self):
......
......@@ -44,6 +44,7 @@ def main(stdscr):
col=i * 8,
width=5,
height=12,
value=255,
max_value=255,
attr=curses.color_pair(numbers_text[i][1]),
text=numbers_text[i][0]) for i in range(len(numbers_text))]
......@@ -52,7 +53,7 @@ def main(stdscr):
window=stdscr,
col=i * 8,
row=12,
value=i,
value=255,
prev_key='KEY_DOWN',
next_key='KEY_UP') for i in range(len(numbers_text))]
fs_pbn = [
......
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