Skip to content

Commit

Permalink
Assign toggle in __init__
Browse files Browse the repository at this point in the history
  • Loading branch information
Vhou-Atroph committed May 10, 2024
1 parent 29bbb1f commit ff2c5fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/tt_damage_calculator/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ def use_groupless(name:str, damage:int):
window.bind('<' + settings.keybinds.pin + '>', lambda par: [window.pinned.set(tt_damage_calculator.toggleswap(window.pinned.get())), window.pin()])

# Organic gag toggle
window.toggles.organic.configure(command=window.toggle_organic)
window.bind('<' + settings.keybinds.organic + '>', lambda par: [window.toggle_organic()])

# Clear inputs function
Expand Down
4 changes: 2 additions & 2 deletions src/tt_damage_calculator/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ToggleButtons(Frame):
def __init__(self, window:Tk, parent:Frame):
Frame.__init__(self, parent)
self.window = window
self.organic = Button(self, text="Toggle Organic", font=('Arial', 11, 'normal'))
self.organic = Button(self, text="Toggle Organic", font=('Arial', 11, 'normal'), command=self.window.toggle_organic)
self.lure = Checkbutton(self, text='Cog lured', variable=self.window.lure, onvalue=1, offvalue=0, font=('Arial', 11, 'normal'), command=print("unimplemented!"))
self.clear = Button(self, text='Reset damage', font=('Arial', 11, 'normal'))

Expand Down Expand Up @@ -77,7 +77,7 @@ def __init__(self, parent:Frame):
self.label = Label(self, text="History")
self.box = HistoryBox(self)
self.clear_button = Button(self, text="Clear History", command=self.box.clear)
self.sos_button = Button(self, text="Show health and\nSOS cards")
self.sos_button = Button(self, text="Show health and\nSOS cards", command=print("unimplemented!"))

self.label.grid(column=0, row=0)
self.box.grid(column=0, row=1)
Expand Down

0 comments on commit ff2c5fc

Please sign in to comment.