def __init__(self, root, text, refresh_ms, optiondct, *args, **kwargs): bg = kwargs.get('bg') Display.__init__(self, root, text, refresh_ms, { 'color': optiondct.get('norm_color', 'white'), 'font': kwargs['font'] }, *args, bg=bg) self._name_label = tk.Label(self, text=text, anchor=tk.E, **kwargs) self._name_label.grid(row=0) kwargs['width'] = 6 self._label = tk.Label(self, font=(None, 15), width=6, bg=bg) self._label.grid(row=0, column=1) self._ms = refresh_ms self._max_display_ticks = 0 self._max_colour = optiondct.get('max_color', 'red') self._incombat_samples = [] self.prev_incombat_avg = 0 self._avg_colour = optiondct.get('avg_color', 'orange') self.max = 0
def __init__(self, root, text, refresh_ms, *args, **kwargs): Display.__init__(self, root, text, refresh_ms, *args, **kwargs) bg = kwargs.get("bg") tk.Label( self, font=("times", 15, "bold"), borderwidth=0, text=text, bg=bg, fg="white", anchor=tk.E, width=8 ).grid(row=0) self._label = tk.Label(self, font=(None, 15), width=6, bg=bg) self._label.grid(row=0, column=1) self._ms = refresh_ms self._max_display_ticks = 0 self._incombat_samples = [] self.prev_incombat_avg = 0 self.max = 0 # dict to store the info about the display self._display_info = {"value": 0, "font": ("times", 15, "bold"), "colour": "white"}
def __init__(self, root, text, refresh_ms, optiondct, *args, **kwargs): bg = kwargs.get('bg') Display.__init__(self, root, text, refresh_ms, {'color': optiondct.get('norm_color', 'white'), 'font' : kwargs['font']}, *args, bg=bg) self._name_label = tk.Label(self, text=text, anchor=tk.E, **kwargs) self._name_label.grid(row=0) kwargs['width'] = 6 self._label = tk.Label(self, font=(None, 15), width=6, bg=bg) self._label.grid(row=0, column=1) self._ms = refresh_ms self._max_display_ticks = 0 self._max_colour = optiondct.get('max_color', 'red') self._incombat_samples = [] self.prev_incombat_avg = 0 self._avg_colour = optiondct.get('avg_color', 'orange') self.max = 0
def __init__(self, root, text, refresh_ms, *args, **kwargs): Display.__init__(self, root, text, refresh_ms, *args, **kwargs) bg = kwargs.get('bg') self._name_label = tk.Label(self, font=('times', 15, 'bold'), borderwidth=0, text=text, bg=bg, fg='white', anchor=tk.E, width=8) self._name_label.grid(row=0) self._label = tk.Label(self, font=(None, 15), width=6, bg=bg) self._label.grid(row=0, column=1) self._ms = refresh_ms self._max_display_ticks = 0 self._incombat_samples = [] self.prev_incombat_avg = 0 self.max = 0 # dict to store the info about the display self._display_info = {'value': 0, 'font': ('times',15, 'bold'), 'colour': 'white'}