MCPcopy Create free account
hub / github.com/Meridian59/Meridian59 / CmSearchNext

Method CmSearchNext

roomedit/source/editcli.cpp:2738–2763  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////// TEditorClient ------------- Hightlight the next object (by number)

Source from the content-addressed store, hash-verified

2736// Hightlight the next object (by number)
2737//
2738void TEditorClient::CmSearchNext ()
2739{
2740 // Ignore if "insert object" mode
2741 if ( InsertingObject )
2742 return;
2743
2744 TMapDC dc (this);
2745
2746 // Unhighlight current object
2747 if (CurObject >= 0 )
2748 HighlightObject (dc, EditMode, CurObject, HL_COLOR);
2749
2750 if (CurObject < GetMaxObjectNum( EditMode))
2751 CurObject++;
2752 else if (GetMaxObjectNum( EditMode) >= 0)
2753 CurObject = 0;
2754 else
2755 CurObject = -1;
2756
2757 // Highlight new current object
2758 if (CurObject >= 0 )
2759 {
2760 HighlightObject (dc, EditMode, CurObject, HL_COLOR);
2761 DisplayObjectInfo (EditMode, CurObject);
2762 }
2763}
2764
2765
2766/////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 2

HighlightObjectFunction · 0.85
GetMaxObjectNumFunction · 0.85

Tested by

no test coverage detected