MCPcopy Create free account
hub / github.com/Nelarius/imnodes / MiniMap

Function MiniMap

imnodes.cpp:2345–2371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2343}
2344
2345void MiniMap(
2346 const float minimap_size_fraction,
2347 const ImNodesMiniMapLocation location,
2348 const ImNodesMiniMapNodeHoveringCallback node_hovering_callback,
2349 const ImNodesMiniMapNodeHoveringCallbackUserData node_hovering_callback_data)
2350{
2351 // Check that editor size fraction is sane; must be in the range (0, 1]
2352 assert(minimap_size_fraction > 0.f && minimap_size_fraction <= 1.f);
2353
2354 // Remember to call before EndNodeEditor
2355 assert(GImNodes->CurrentScope == ImNodesScope_Editor);
2356
2357 ImNodesEditorContext& editor = EditorContextGet();
2358
2359 editor.MiniMapEnabled = true;
2360 editor.MiniMapSizeFraction = minimap_size_fraction;
2361 editor.MiniMapLocation = location;
2362
2363 // Set node hovering callback information
2364 editor.MiniMapNodeHoveringCallback = node_hovering_callback;
2365 editor.MiniMapNodeHoveringCallbackUserData = node_hovering_callback_data;
2366
2367 // Actual drawing/updating of the MiniMap is done in EndNodeEditor so that
2368 // mini map is draw over everything and all pin/link positions are updated
2369 // correctly relative to their respective nodes. Hence, we must store some of
2370 // of the state for the mini map in GImNodes for the actual drawing/updating
2371}
2372
2373void BeginNode(const int node_id)
2374{

Callers 1

showMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected