def change_dirname(self, path): self.dirname = path self.renamer = warzonerep.WarzoneReanamer(self.dirname) config.set_param('wzfolder', self.dirname) if self.dirname != '' and not self.onGo: self.onGo = True self.on_timer()
def __init__(self, frame): self.frame = frame self.dirname = config.SETTINGS['wzfolder'] self.status = None self.renamer = warzonerep.WarzoneReanamer(self.dirname) super().__init__() self.set_icon(TRAY_ICON) self.Bind(wx.adv.EVT_TASKBAR_LEFT_DOWN, self.on_config) self.onGo = False self.warzoneState = None if warzonerep.WarzoneReanamer.check_dir(self.dirname): wx.CallLater(1000, self.start_switch, 0) else: self.dirname = '' config.set_param('wzfolder', '') config.save()
def silence_switch(self, e): config.set_param('silence', not config.SETTINGS["silence"])
def OnApply(self, e): config.set_param('autorun_hk', self.bindAutorun.GetValue()) config.set_param('dwarfglitch_hk', self.bindDwarfglitch.GetValue()) config.set_param('autorun_state', self.checkAutorun.GetValue()) config.set_param('dwarfglitch_state', self.checkDwarfglitch.GetValue()) self.Destroy()