summaryrefslogtreecommitdiff
path: root/jfr_playoff
diff options
context:
space:
mode:
Diffstat (limited to 'jfr_playoff')
-rw-r--r--jfr_playoff/gui/frames/team.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/jfr_playoff/gui/frames/team.py b/jfr_playoff/gui/frames/team.py
index b7ecf0a..4418bb2 100644
--- a/jfr_playoff/gui/frames/team.py
+++ b/jfr_playoff/gui/frames/team.py
@@ -228,6 +228,11 @@ class TeamAliasRow(RepeatableFrame):
self.names = WidgetRepeater(self, RepeatableEntry)
self.names.grid(row=0, column=1, sticky=tk.W+tk.E)
+ def getValue(self):
+ return (
+ self.teamName.get().strip(),
+ [val.strip() for val in self.names.getValue()])
+
class TeamAliasFrame(tk.Frame):
def __init__(self, *args, **kwags):
tk.Frame.__init__(self, *args, **kwags)
@@ -240,6 +245,9 @@ class TeamAliasFrame(tk.Frame):
self.repeater = WidgetRepeater(self, TeamAliasRow)
self.repeater.grid(row=1, column=0, sticky=tk.W+tk.E)
+ def getConfig(self):
+ return {val[0]: val[1] for val in self.repeater.getValue() if val[0]}
+
class TeamPreviewFrame(tk.Frame):
def __init__(self, *args, **kwags):
tk.Frame.__init__(self, *args, **kwags)
@@ -293,4 +301,10 @@ class TeamPreviewFrame(tk.Frame):
self.setTeams([])
+ def getTieConfig(self):
+ ties = [getIntVal(val, 0) for val in self.tieValues]
+ if len(ties) and max(ties) == 0:
+ return None
+ return ties
+
__all__ = ['TeamSettingsFrame', 'TeamAliasFrame', 'TeamPreviewFrame']