MCPcopy Create free account
hub / github.com/ddnet/ddnet / PopupSelectAutoMapReferenceInvoke

Method PopupSelectAutoMapReferenceInvoke

src/game/editor/popups.cpp:2524–2532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2522}
2523
2524void CEditor::PopupSelectAutoMapReferenceInvoke(int Current, float x, float y)
2525{
2526 static SPopupMenuId s_PopupSelectAutoMapReferenceId;
2527 s_AutoMapReferenceSelected = -100;
2528 s_AutoMapReferenceCurrent = Current;
2529 std::shared_ptr<CLayerTiles> pLayer = std::static_pointer_cast<CLayerTiles>(Map()->SelectedLayer(0));
2530 // Width for buttons is 120, 15 is the scrollbar width, 2 is the margin between both.
2531 Ui()->DoPopupMenu(&s_PopupSelectAutoMapReferenceId, x, y, 120.0f + 15.0f + 2.0f, 26.0f + 14.0f * std::size(AUTOMAP_REFERENCE_NAMES) + 1, this, PopupSelectAutoMapReference);
2532}
2533
2534int CEditor::PopupSelectAutoMapReferenceResult()
2535{

Callers

nothing calls this directly

Calls 4

MapFunction · 0.85
UiFunction · 0.85
SelectedLayerMethod · 0.80
DoPopupMenuMethod · 0.80

Tested by

no test coverage detected