def set_tiers(self, value): value = int(value) if self.int_tiers != value: before = self.int_tiers self.int_tiers = value self.gui.reset_tree('tiers', self.int_tiers) print_change('Tiers', before, self.int_tiers)
def set_textbox(self, value): value = int(value) if self.int_textbox != value: before = self.curr_textbox self.int_textbox = value self.curr_textbox = textbox_font_choices()[self.int_textbox - 1] self.gui.textbox.set_font(self.curr_textbox) print_change('Textbox Font Size', before, self.curr_textbox)
def set_windows(self, value): value = int(value) if self.int_windows != value: before = self.curr_windows self.int_windows = value self.curr_windows = windows_font_choices()[self.int_windows - 1] self.gui.window_manager_frame.set_font(self.curr_windows) print_change('Windows Font Size', before, self.curr_windows)
def set_toolbar(self, value): value = int(value) if self.int_toolbar != value: before = self.curr_toolbar self.int_toolbar = value self.curr_toolbar = toolbar_font_choices()[self.int_toolbar - 1] self.gui.toolbar_frame.set_font(self.curr_toolbar) print_change('Toolbar Font Size', before, self.curr_toolbar)
def set_density(self, value): value = int(value) if self.int_density != value: before = self.curr_density self.int_density = value self.curr_density = density_choices()[self.int_density - 1] self.gui.reset_tree('density', self.curr_density) print_change('Density', before, self.curr_density)
def set_speed(self, value): value = int(value) if self.int_speed != value: before = self.curr_speed self.int_speed = value self.curr_speed = speed_choices()[self.int_speed - 1] self.gui.reset_tree('speed', self.curr_speed) print_change('Speed', before, self.curr_speed)
def set_ornaments(self, arg_bool): """Does not update if the currently-activated button is clicked again""" if arg_bool is not self.ornaments_bool: before = self.ornaments_bool self.ornaments_bool = arg_bool button_on = (FLAT, RIDGE)[self.ornaments_bool] self.opt_ornaments_on.configure(relief=button_on) button_off = (RIDGE, FLAT)[self.ornaments_bool] self.opt_ornaments_off.configure(relief=button_off) self.gui.reset_tree('ornaments', arg_bool) print_change('Ornaments', before, self.ornaments_bool)
def window_change(self, event=None): if self.winfo_width() is not 1: before_w = self.get_arg('w_dim') before_h = self.get_arg('h_dim') before_x = self.get_arg('x_dim') before_y = self.get_arg('y_dim') if not self.offsets_are_set: self.offsets_are_set = True self._create_default_file() if event.widget.winfo_id() == self.textbox.winfo_id(): self.textbox_change() elif event.widget.winfo_id() == self.window_manager_frame.winfo_id(): self.wmf_maximize_button_change() elif event.widget.winfo_id() == self.root.winfo_id(): self.root_change() if self.get_arg('verbose'): print_change('\t gui width', before_w, self.get_arg('w_dim')) print_change('\t gui height', before_h, self.get_arg('h_dim')) print_change('\tgui x offset', before_x, self.get_arg('x_dim')) print_change('\tgui y offset', before_y, self.get_arg('y_dim'))
def set_screen_width(self): before = self.tree.screen_width self.reset_tree('width', self.convert_w_dim()) print_change('Window Width', before, self.tree.screen_width)