Added functions for adding spin inputs to popup. Added support for default non-number values to them(they return None in that case). Added proper scrolling to InputPopup. Tweaked visual style

This commit is contained in:
Asmageddon 2012-03-11 22:59:56 +01:00
parent a28e40ea35
commit 05758245a1
1 changed files with 11 additions and 0 deletions

View File

@ -807,6 +807,17 @@ class InputPopup(Popup):
self.parent.add_string(row, string, scr, col, pad, trim)
return True
def getmaxyx(self):
return self.screen.getmaxyx()
def add_string(self, row, string, scr=None, col = 0, pad=True, trim=True):
if row <= 0:
return False
elif row >= self.height -1:
return False
self.parent.add_string(row, string, scr, col, pad, trim)
return True
def add_spaces(self, num):
for i in range(num):
self.lines.append((len(self.inputs), ""))