MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / SendMessage

Method SendMessage

ogsr_engine/xrGame/ui/UIMapWnd.cpp:505–529  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503}
504
505void CUIMapWnd::SendMessage(CUIWindow* pWnd, s16 msg, void* pData)
506{
507 CUIWndCallback::OnEvent(pWnd, msg, pData);
508
509 if (pWnd == m_UIPropertiesBox && msg == PROPERTY_CLICKED)
510 {
511 CUIListBoxItem* item = (CUIListBoxItem*)pData;
512 switch (item->GetTAG())
513 {
514 // Click on the button 'change spot name'
515 case MAP_CHANGE_SPOT_HINT_ACT: {
516 ShowSettingsWindow(m_cur_location->ObjectID(), m_cur_location->GetLastPosition(), m_cur_location->LevelName());
517 m_cur_location = nullptr;
518 break;
519 }
520 // Click on the button 'remove spot'
521 case MAP_REMOVE_SPOT_ACT: {
522 HideHint((CUIWindow*)item->GetData());
523 Level().MapManager().RemoveMapLocation(m_cur_location);
524 m_cur_location = nullptr;
525 break;
526 }
527 }
528 }
529}
530
531CUICustomMap* CUIMapWnd::GetMapByIdx(u16 idx)
532{

Callers

nothing calls this directly

Calls 7

OnEventFunction · 0.85
GetTAGMethod · 0.80
ObjectIDMethod · 0.80
GetLastPositionMethod · 0.80
LevelNameMethod · 0.80
RemoveMapLocationMethod · 0.80
GetDataMethod · 0.45

Tested by

no test coverage detected