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

Method CheckAddHighlighted

gui/chrome_tabs.py:1159–1178  ·  view source on GitHub ↗

Checks to see if x, y are in add button region, and sets the highlight flag

(self, x, y)

Source from the content-addressed store, hash-verified

1157 pass
1158
1159 def CheckAddHighlighted(self, x, y):
1160 """
1161 Checks to see if x, y are in add button region, and sets the highlight
1162 flag
1163 """
1164 if not self.show_add_button:
1165 return
1166
1167 region = self.add_button.GetRegion()
1168 ax, ay = self.add_button.GetPosition()
1169 region.Offset(round(ax), round(ay))
1170
1171 if region.Contains(x, y):
1172 if not self.add_button.IsHighlighted():
1173 self.add_button.Highlight(True)
1174 self.Refresh()
1175 else:
1176 if self.add_button.IsHighlighted():
1177 self.add_button.Highlight(False)
1178 self.Refresh()
1179
1180 def OnPaint(self, event):
1181 mdc = wx.AutoBufferedPaintDC(self)

Callers 1

OnMotionMethod · 0.95

Calls 5

GetRegionMethod · 0.80
IsHighlightedMethod · 0.80
HighlightMethod · 0.80
GetPositionMethod · 0.45
RefreshMethod · 0.45

Tested by

no test coverage detected