| 2463 | } |
| 2464 | |
| 2465 | void CEditor::PopupSelectConfigAutoMapInvoke(int Current, float x, float y) |
| 2466 | { |
| 2467 | static SPopupMenuId s_PopupSelectConfigAutoMapId; |
| 2468 | s_AutoMapConfigSelected = -100; |
| 2469 | s_AutoMapConfigCurrent = Current; |
| 2470 | std::shared_ptr<CLayerTiles> pLayer = std::static_pointer_cast<CLayerTiles>(Map()->SelectedLayer(0)); |
| 2471 | const int ItemCount = minimum(Map()->m_vpImages[pLayer->m_Image]->m_AutoMapper.ConfigNamesNum() + 1, 10); // +1 for None-entry |
| 2472 | // Width for buttons is 120, 15 is the scrollbar width, 2 is the margin between both. |
| 2473 | Ui()->DoPopupMenu(&s_PopupSelectConfigAutoMapId, x, y, 120.0f + 15.0f + 2.0f, 10.0f + 12.0f * ItemCount + 2.0f * (ItemCount - 1) + CScrollRegion::HEIGHT_MAGIC_FIX, this, PopupSelectConfigAutoMap); |
| 2474 | } |
| 2475 | |
| 2476 | int CEditor::PopupSelectConfigAutoMapResult() |
| 2477 | { |
nothing calls this directly
no test coverage detected