diff options
author | emkael <emkael@tlen.pl> | 2019-06-27 20:44:23 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-06-27 20:44:23 +0200 |
commit | 69c0e0733b6c254e798bfd75569d80d220eb4a15 (patch) | |
tree | cb789c8f30d3082c2760b8bba0f5e64b4a2f77a3 /jfr_playoff/gui/frames/team.py | |
parent | 1b33aabd2d5949be3d94b23dfe54f4b28a8959a2 (diff) |
SelectionButton/Frame with custom value mappings
Diffstat (limited to 'jfr_playoff/gui/frames/team.py')
-rw-r--r-- | jfr_playoff/gui/frames/team.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/jfr_playoff/gui/frames/team.py b/jfr_playoff/gui/frames/team.py index 8d789b9..a304040 100644 --- a/jfr_playoff/gui/frames/team.py +++ b/jfr_playoff/gui/frames/team.py @@ -58,11 +58,12 @@ class TeamManualSettingsFrame(GuiFrame): class TeamSelectionFrame(SelectionFrame): def renderOption(self, container, option, idx): - (ttk.Label(container, text='[%d]' % (idx+1))).grid( - row=idx+1, column=0) + (ttk.Label( + container, text='[%d]' % (self._mapValue(idx, option)))).grid( + row=idx+1, column=0) (ttk.Checkbutton( container, text=option[0], - variable=self.values[idx] + variable=self.values[self._mapValue(idx, option)] )).grid(row=idx+1, column=1, sticky=tk.W) class TeamSelectionButton(SelectionButton): |