MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / DoOnMouseHover

Method DoOnMouseHover

Source/GraphEditorComponentImpl.cpp:217–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void CGraphBase::DoOnMouseHover(CPoint point) {
218 const int ItemIndex = GetItemIndex(point);
219 const int ItemValue = GetItemValue(point);
220 const int LastItem = m_iHighlightedItem;
221 const int LastValue = m_iHighlightedValue;
222
223 if (ItemIndex < 0 || ItemIndex >= parent_.GetItemCount() || ItemValue < GetMinItemValue() || ItemValue > GetMaxItemValue()) {
224 m_iHighlightedItem = -1;
225 m_iHighlightedValue = 0;
226 }
227 else {
228 m_iHighlightedItem = ItemIndex;
229 m_iHighlightedValue = ItemValue;
230 }
231
232 if (m_iHighlightedItem != LastItem || m_iHighlightedValue != LastValue)
233 parent_.RedrawWindow();
234
235 CursorChanged(ItemIndex);
236}
237
238void CGraphBase::DoOnLButtonDown(CPoint point) {
239 m_iEditing = edit_t::Point;

Callers

nothing calls this directly

Calls 2

GetItemGridIndexMethod · 0.80
GetItemCountMethod · 0.45

Tested by

no test coverage detected