Skip to content

Commit

Permalink
Misc comments and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
imayhaveborkedit committed Sep 8, 2017
1 parent 2a1ff65 commit 286f142
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def __init__(self, hook):
def info_wb(self):
return self.info_window, self.buffers['INFO_BUFFER']


# TODO: optimize
def _increment_repeated_msg(self, first=False):
if first:
return lambda line: line.rstrip(' ') + ' (2x)'
Expand Down Expand Up @@ -180,6 +180,7 @@ def print(self, *args, **kwargs):


# TODO
# Select the default buffer, set some text and request an input?
def prompt(self, message, end='>'):
...

Expand Down Expand Up @@ -522,11 +523,7 @@ def _add_events(self):
report_dimensions_callback (cli, list)
"""

def vertical_cursor_move(cli):
pass


pass


def _finalize_build(self):
Expand Down Expand Up @@ -587,8 +584,7 @@ def redraw(self):
def run_in_executor(self, func, *args, **kwargs):
self.cli.eventloop.call_from_executor(lambda: func(*args, **kwargs))

def reroll(self, **kw):
# noinspection PyArgumentList
def reroll(self):
new_stats = self.hook.reroll()

self.set_stats(**self.hook.zip(new_stats))
Expand All @@ -602,6 +598,7 @@ def set_stat(self, stat, value):
buffer = self.buffers[statinfo.Stats.get(stat).buffername]
cursor = buffer.cursor_position

# If cursor position is being funky I can just set the position on the doc
buffer.reset(make_stat_doc(stat, value))
buffer.cursor_position = cursor

Expand Down

0 comments on commit 286f142

Please sign in to comment.