MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / Render

Method Render

gui/builtinShipBrowser/sfBrowserItem.py:209–239  ·  view source on GitHub ↗
(self, pdc)

Source from the content-addressed store, hash-verified

207 return False
208
209 def Render(self, pdc):
210 bx = self.toolbarX
211 for button in self.buttons:
212 if not button.IsVisible():
213 continue
214
215 by = self.toolbarY
216 tbx = bx
217
218 btnState = button.GetState()
219
220 bmp = button.GetDisabledBitmap()
221 dropShadowBmp = button.GetDropShadowBitmap()
222
223 if btnState & BTN_NORMAL:
224 bmp = button.GetBitmap()
225
226 if btnState & BTN_HOVER:
227 bmp = button.GetHoverBitmap()
228
229 if btnState & BTN_PRESSED:
230 bmp = button.GetBitmap()
231 by += self.padding / 2
232 tbx += self.padding / 2
233
234 bmpWidth = bmp.GetWidth()
235
236 pdc.DrawBitmap(dropShadowBmp, round(bx + self.padding / 2), round(self.toolbarY + self.padding / 2))
237 pdc.DrawBitmap(bmp, round(tbx), round(by))
238
239 bx += bmpWidth + self.padding
240
241
242class SFBrowserItem(wx.Window):

Callers 1

OnPaintMethod · 0.45

Calls 7

IsVisibleMethod · 0.80
GetDisabledBitmapMethod · 0.80
GetDropShadowBitmapMethod · 0.80
GetBitmapMethod · 0.80
GetHoverBitmapMethod · 0.80
GetStateMethod · 0.45
GetWidthMethod · 0.45

Tested by

no test coverage detected