MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / __init__

Method __init__

gui/utils/anim.py:7–27  ·  view source on GitHub ↗
(self, parent, id=wx.ID_ANY, label="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=0)

Source from the content-addressed store, hash-verified

5
6class LoadAnimation(wx.Window):
7 def __init__(self, parent, id=wx.ID_ANY, label="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=0):
8 wx.Window.__init__(self, parent, id, pos=pos, size=size, style=style)
9
10 self.label = label
11
12 self.animTimerId = wx.NewId()
13 self.animTimer = wx.Timer(self, self.animTimerId)
14 self.animTimerPeriod = 50
15
16 self.animCount = 0
17 self.animDir = 1
18 self.bars = 10
19 self.padding = 2
20
21 self.Bind(wx.EVT_ERASE_BACKGROUND, self.OnEraseBackground)
22 self.Bind(wx.EVT_TIMER, self.OnTimer)
23 self.Bind(wx.EVT_PAINT, self.OnPaint)
24
25 self.animTimer.Start(self.animTimerPeriod)
26
27 self.SetBackgroundStyle(wx.BG_STYLE_PAINT)
28
29 def Play(self):
30 if self.animTimer.IsRunning():

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected