SpiecsEngine
 
Loading...
Searching...
No Matches

◆ OnUpdate()

void Spices::ImguiInfoBar::OnUpdate ( TimeStep & ts)
overridevirtual

This interface is called On SlateSystem Update.

Parameters
[in]tsTimeStep.

Clear slected infobar.

Erase completed InfoBar.

Clear slected infobar.

Erase completed InfoBar.

Implements Spices::ImguiSlate.

Definition at line 14 of file ImguiInfoBar.cpp.

15 {
17
22 {
23 if (m_SelectedInfoBar->IsDestroy())
24 {
25 m_SelectedInfoBar = nullptr;
26 }
27 }
28
29 std::vector<std::string> eraseList;
30
31 m_InfoBars.for_each([&](auto& k, auto& v) {
32
33 if (v->IsDestroy())
34 {
35 eraseList.push_back(v->GetInfo());
36 }
37
38 return false;
39 });
40
44 for (auto& item : eraseList)
45 {
46 m_InfoBars.erase(item);
47 }
48 }
#define SPICES_PROFILE_ZONE
scl::linked_unordered_map< std::string, std::shared_ptr< SlateInfoBar > > m_InfoBars
InfoBar instances.
std::shared_ptr< SlateInfoBar > m_SelectedInfoBar
Selected InfoBar.