@@ -24,7 +24,7 @@ struct predicate_find_stat
2424{
2525 const char * id;
2626 predicate_find_stat (const char * id) { this ->id = id; }
27- bool operator ()(SDrawStaticStruct * s)
27+ bool operator ()(StaticDrawableWrapper * s)
2828 {
2929 return s->m_name == id;
3030 }
@@ -55,7 +55,7 @@ void CUIGameCustom::OnFrame()
5555 CDialogHolder::OnFrame ();
5656 for (auto item : CustomStatics)
5757 item->Update ();
58- auto comparer = [](const SDrawStaticStruct * s1, const SDrawStaticStruct * s2)
58+ auto comparer = [](const StaticDrawableWrapper * s1, const StaticDrawableWrapper * s2)
5959 {
6060 return s1->IsActual () > s2->IsActual ();
6161 };
@@ -79,7 +79,7 @@ void CUIGameCustom::OnFrame()
7979
8080void CUIGameCustom::Render ()
8181{
82- for (SDrawStaticStruct * item : CustomStatics)
82+ for (StaticDrawableWrapper * item : CustomStatics)
8383 item->Draw ();
8484 Window->Draw ();
8585 CEntity* pEntity = smart_cast<CEntity*>(Level ().CurrentEntity ());
@@ -105,7 +105,7 @@ void CUIGameCustom::Render()
105105 DoRenderDialogs ();
106106}
107107
108- SDrawStaticStruct * CUIGameCustom::AddCustomStatic (const char * id, bool singleInstance)
108+ StaticDrawableWrapper * CUIGameCustom::AddCustomStatic (const char * id, bool singleInstance)
109109{
110110 if (singleInstance)
111111 {
@@ -114,8 +114,8 @@ SDrawStaticStruct* CUIGameCustom::AddCustomStatic(const char* id, bool singleIns
114114 return *it;
115115 }
116116 CUIXmlInit xmlInit;
117- CustomStatics.push_back (xr_new<SDrawStaticStruct >());
118- SDrawStaticStruct * sss = CustomStatics.back ();
117+ CustomStatics.push_back (xr_new<StaticDrawableWrapper >());
118+ StaticDrawableWrapper * sss = CustomStatics.back ();
119119 sss->m_static = xr_new<CUIStatic>();
120120 sss->m_name = id;
121121 xmlInit.InitStatic (*MsgConfig, id, 0 , sss->m_static );
@@ -125,7 +125,7 @@ SDrawStaticStruct* CUIGameCustom::AddCustomStatic(const char* id, bool singleIns
125125 return sss;
126126}
127127
128- SDrawStaticStruct * CUIGameCustom::GetCustomStatic (const char * id)
128+ StaticDrawableWrapper * CUIGameCustom::GetCustomStatic (const char * id)
129129{
130130 auto it = std::find_if (CustomStatics.begin (), CustomStatics.end (), predicate_find_stat (id));
131131 if (it != CustomStatics.end ())
@@ -270,25 +270,25 @@ void CUIGameCustom::enable_fake_indicators(bool enable)
270270 UIMainIngameWnd->get_hud_states ()->EnableFakeIndicators (enable);
271271}
272272
273- SDrawStaticStruct::SDrawStaticStruct ()
273+ StaticDrawableWrapper::StaticDrawableWrapper ()
274274{
275275 m_static = nullptr ;
276276 m_endTime = -1 .0f ;
277277}
278278
279- void SDrawStaticStruct ::destroy ()
279+ void StaticDrawableWrapper ::destroy ()
280280{
281281 delete_data (m_static);
282282}
283283
284- bool SDrawStaticStruct ::IsActual () const
284+ bool StaticDrawableWrapper ::IsActual () const
285285{
286286 if (m_endTime < 0 )
287287 return true ;
288288 return Device.fTimeGlobal < m_endTime;
289289}
290290
291- void SDrawStaticStruct ::SetText (const char * text)
291+ void StaticDrawableWrapper ::SetText (const char * text)
292292{
293293 m_static->Show (text != nullptr );
294294 if (text)
@@ -298,13 +298,13 @@ void SDrawStaticStruct::SetText(const char* text)
298298 }
299299}
300300
301- void SDrawStaticStruct ::Draw ()
301+ void StaticDrawableWrapper ::Draw ()
302302{
303303 if (m_static->IsShown ())
304304 m_static->Draw ();
305305}
306306
307- void SDrawStaticStruct ::Update ()
307+ void StaticDrawableWrapper ::Update ()
308308{
309309 if (IsActual () && m_static->IsShown ())
310310 m_static->Update ();
0 commit comments