예제 #1
0
    def __init__(self, dmg_object, *args, **kwargs):
        """
        Timer to record the time it took for the locked target to die.
        """
        conf, alpha = getconfig("Timer", kwargs)

        FloatingWindow.__init__(self, *args, bg=kwargs.get('bg'))
        self._timer_name = tk.Label(self,
                                    text='Timer:',
                                    **dict_removed_key(conf, 'width'))
        self._timer_name.grid(row=0, column=0)

        conf['width'] = 12
        self.label = tk.Label(self,
                              text='Lock Target',
                              anchor=tk.CENTER,
                              **conf)
        self.label.grid(row=0, column=1)

        self._dmg = dmg_object
        self._target_lock = False
        self.bind('<Double-Button-1>', self.transition)

        self._target = (None, None, -1)
        self._time, self._ptime = 0, 0
        self._stop = False
        self._cstate = 0

        self.attributes('-alpha', alpha)
예제 #2
0
    def __init__(self, *args, **kwargs):
        conf, alpha = getconfig('Health Bar', kwargs)

        FloatingWindow.__init__(self, *args, **kwargs)

        self._target_health = tk.Label(self,
                                       text='%s' % (0),
                                       anchor=tk.E,
                                       **conf)

        self._other = tk.Label(self,
                               text='/',
                               anchor=tk.CENTER,
                               **dict_removed_key(conf, 'width'))

        self._other.grid(row=0, column=1)

        self._target_max_health = tk.Label(self,
                                           text='%s' % (0),
                                           anchor=tk.W,
                                           **conf)

        self._target_max_health.grid(row=0, column=2)
        self._target_health.grid(row=0, column=0)

        self._percent_health = tk.Label(self,
                                        text='%s' % (0),
                                        anchor=tk.CENTER,
                                        **conf)

        self._percent_view = False
        self.attributes('-alpha', alpha)
        self.bind('<Double-Button-1>', self.change_view)
예제 #3
0
파일: elements.py 프로젝트: spoty/gw2dps
    def __init__(self, *args, **kwargs):
        FloatingWindow.__init__(self, *args, **kwargs)
        self._target_health =  tk.Label(self, text='%s'%(0),
                                       font=("Times", 16, 'bold'), fg='#A4F3A7',
                                       anchor=tk.E, width=10,
                                       bg=kwargs.get('bg'))

        self._other = tk.Label(self, text='/',
                   font=("Times", 16, 'bold'), fg='#A4F3A7',
                   anchor=tk.CENTER,
                   bg=kwargs.get('bg'))
        self._other.grid(row=0, column=1)

        self._target_max_health = tk.Label(self, text='%s'%(0),
                                       font=("Times", 16, 'bold'), fg='#A4F3A7',
                                       anchor=tk.W, width=10,
                                       bg=kwargs.get('bg'))


        self._target_max_health.grid(row=0, column=2)
        self._target_health.grid(row=0, column=0)
        self._percent_health = tk.Label(self, text='%s'%(0),
                                       font=("Times", 16, 'bold'), fg='#A4F3A7',
                                       anchor=tk.CENTER, width=21,
                                       bg=kwargs.get('bg'))

        self._percent_view = False
        self.bind('<Double-Button-1>', self.change_view)
예제 #4
0
파일: elements.py 프로젝트: JPatison/gw2dps
    def __init__(self, *args, **kwargs):
        additional = {'max_color': 'red',
                      'avg_color': 'orange',
                      'norm_color':'white'}
        conf, alpha = getconfig('DPS', kwargs, additional)

        sumconf, sumalpha = getconfig("DPS Summary", kwargs)
        sumconf['bg'] = conf['bg']
        sumconf.update(dict_removed_key(additional, 'norm_color'))

        FloatingWindow.__init__(self,  *args, bg=conf.get('bg'))

        self._ms = kwargs.get('ms', 250)

        # lists for storing the dmg samples
        self._sustained_dps = []
        self._instant_dps = []
        self._sum = False
        # isntant dps display
        instant, sustained = "Instant:", "Sustained:"

        self.instant = DamageDisplay(self, instant, self._ms, additional, **conf)
        self.instant.grid(row=2, column=1)
        self._pop_up_frame1 = SummaryTab(self, text=instant, **sumconf)

        # sustainted dps
        self.sustained = DamageDisplay(self, sustained, self._ms, additional, **conf)
        self._pop_up_frame2 = SummaryTab(self, text=sustained, **sumconf)
        self.sustained.grid(row=3, column=1)

        self.attributes('-alpha', alpha)
        self.bind('<Double-Button-1>', self.toggle_summary)
예제 #5
0
파일: elements.py 프로젝트: JPatison/gw2dps
    def __init__(self, *args, **kwargs):
        conf, alpha = getconfig('Health Bar', kwargs)

        FloatingWindow.__init__(self, *args, **kwargs)

        self._target_health =  tk.Label(self, text='%s'%(0),
                               anchor=tk.E, **conf)

        self._other = tk.Label(self, text='/',
                               anchor=tk.CENTER,
                               **dict_removed_key(conf, 'width'))

        self._other.grid(row=0, column=1)

        self._target_max_health = tk.Label(self, text='%s'%(0),
                                           anchor=tk.W, **conf)


        self._target_max_health.grid(row=0, column=2)
        self._target_health.grid(row=0, column=0)

        self._percent_health = tk.Label(self, text='%s'%(0),
                                       anchor=tk.CENTER, **conf)

        self._percent_view = False
        self.attributes('-alpha', alpha)
        self.bind('<Double-Button-1>', self.change_view)
예제 #6
0
파일: elements.py 프로젝트: JPatison/gw2dps
    def __init__(self, dmg_object, *args, **kwargs):
        """
        Timer to record the time it took for the locked target to die.
        """
        conf, alpha = getconfig("Timer", kwargs)

        FloatingWindow.__init__(self, *args, bg=kwargs.get('bg'))
        self._timer_name = tk.Label(self, text='Timer:',
                                    **dict_removed_key(conf, 'width'))
        self._timer_name.grid(row=0,column=0)

        conf['width'] = 12
        self.label = tk.Label(self, text='Lock Target',
                              anchor=tk.CENTER, **conf)
        self.label.grid(row=0, column=1)

        self._dmg = dmg_object
        self._target_lock = False
        self.bind('<Double-Button-1>', self.transition)

        self._target = (None, None, -1)
        self._time, self._ptime = 0, 0
        self._stop = False
        self._cstate = 0

        self.attributes('-alpha', alpha)
예제 #7
0
파일: elements.py 프로젝트: Nunoma/gw2dps
    def __init__(self, *args, **kwargs):
        FloatingWindow.__init__(self, *args, **kwargs)
        self._target_health = tk.Label(
            self, text="%s" % (0), font=("Times", 16, "bold"), fg="#A4F3A7", anchor=tk.E, width=10, bg=kwargs.get("bg")
        )

        tk.Label(self, text="/", font=("Times", 16, "bold"), fg="#A4F3A7", anchor=tk.CENTER, bg=kwargs.get("bg")).grid(
            row=0, column=1
        )

        self._target_max_health = tk.Label(
            self, text="%s" % (0), font=("Times", 16, "bold"), fg="#A4F3A7", anchor=tk.W, width=10, bg=kwargs.get("bg")
        )

        self._target_max_health.grid(row=0, column=2)
        self._target_health.grid(row=0, column=0)
예제 #8
0
파일: elements.py 프로젝트: spoty/gw2dps
    def __init__(self, dmg_object, *args, **kwargs):
        """
        Timer to record the time it took for the locked target to die.
        """
        FloatingWindow.__init__(self, *args, **kwargs)
        self._timer_name = tk.Label(self, text='Timer:', fg='white',
                 font=(None, 12, 'bold'), **kwargs)
        self._timer_name.grid(row=0,column=0)

        self.label = tk.Label(self, text='Lock Target',
                              font=(None, 12, 'bold'), anchor=tk.CENTER,
                              fg='white', width=12, **kwargs)
        self.label.grid(row=0, column=1)

        self._dmg = dmg_object
        self._target_lock = False
        self.bind('<Double-Button-1>', self.transition)

        self._target = (None, None, -1)
        self._time, self._ptime = 0, 0
        self._stop = False
        self._cstate = 0
예제 #9
0
    def __init__(self, *args, **kwargs):
        additional = {
            'max_color': 'red',
            'avg_color': 'orange',
            'norm_color': 'white'
        }
        conf, alpha = getconfig('DPS', kwargs, additional)

        sumconf, sumalpha = getconfig("DPS Summary", kwargs)
        sumconf['bg'] = conf['bg']
        sumconf.update(dict_removed_key(additional, 'norm_color'))

        FloatingWindow.__init__(self, *args, bg=conf.get('bg'))

        self._ms = kwargs.get('ms', 250)

        # lists for storing the dmg samples
        self._sustained_dps = []
        self._instant_dps = []
        self._sum = False
        # isntant dps display
        instant, sustained = "Instant:", "Sustained:"

        self.instant = DamageDisplay(self, instant, self._ms, additional,
                                     **conf)
        self.instant.grid(row=2, column=1)
        self._pop_up_frame1 = SummaryTab(self, text=instant, **sumconf)

        # sustainted dps
        self.sustained = DamageDisplay(self, sustained, self._ms, additional,
                                       **conf)
        self._pop_up_frame2 = SummaryTab(self, text=sustained, **sumconf)
        self.sustained.grid(row=3, column=1)

        self.attributes('-alpha', alpha)
        self.bind('<Double-Button-1>', self.toggle_summary)
예제 #10
0
파일: elements.py 프로젝트: spoty/gw2dps
    def __init__(self, *args, **kwargs):
        FloatingWindow.__init__(self,  *args, **kwargs)

        self._ms = kwargs.get('ms', 250)

        # lists for storing the dmg samples
        self._sustained_dps = []
        self._instant_dps = []

        bg = kwargs.get('bg')
        # isntant dps display
        instant, sustained = "Instant:", "Sustained:"
        self.instant = DamageDisplay(self, instant, self._ms, bg=bg)
        self.instant.grid(row=2, column=1)
        self._pop_up_frame1 = SummaryTab(self, text=instant, bg=bg)

        # sustainted dps
        self.sustained = DamageDisplay(self, sustained, self._ms, bg=bg)
        self._pop_up_frame2 = SummaryTab(self, text=sustained, bg=bg)
        self.sustained.grid(row=3, column=1)

        for binder in [self.sustained, self.instant]:
            binder.bind("<Enter>", self.display_on_mouse_over)
            binder.bind("<Leave>", self.display_on_mouse_over)