66pcstr UI_PATH = " ui" ;
77
88CUICursor& GetUICursor () { return UI ().GetUICursor (); };
9- ui_core & UI () { return *GamePersistent ().m_pUI_core ; };
9+ UICore & UI () { return *GamePersistent ().m_pUI_core ; };
1010extern ENGINE_API Fvector2 g_current_font_scale;
1111
1212void S2DVert::rotate_pt (const Fvector2& pivot, const float cosA, const float sinA, const float kx)
@@ -112,46 +112,46 @@ sPoly2D* C2DFrustum::ClipPoly(sPoly2D& S, sPoly2D& D) const
112112 return dest;
113113}
114114
115- void ui_core ::OnDeviceReset ()
115+ void UICore ::OnDeviceReset ()
116116{
117117 m_scale_.set (float (Device.dwWidth ) / UI_BASE_WIDTH, float (Device.dwHeight ) / UI_BASE_HEIGHT);
118118
119119 m_2DFrustum.CreateFromRect (Frect ().set (0 .0f , 0 .0f , float (Device.dwWidth ), float (Device.dwHeight )));
120120}
121121
122- void ui_core ::ClientToScreenScaled (Fvector2& dest, float left, float top) const
122+ void UICore ::ClientToScreenScaled (Fvector2& dest, float left, float top) const
123123{
124124 if (m_currentPointType != IUIRender::pttLIT)
125125 dest.set (ClientToScreenScaledX (left), ClientToScreenScaledY (top));
126126 else
127127 dest.set (left, top);
128128}
129129
130- void ui_core ::ClientToScreenScaled (Fvector2& src_and_dest) const
130+ void UICore ::ClientToScreenScaled (Fvector2& src_and_dest) const
131131{
132132 if (m_currentPointType != IUIRender::pttLIT)
133133 src_and_dest.set (ClientToScreenScaledX (src_and_dest.x ), ClientToScreenScaledY (src_and_dest.y ));
134134}
135135
136- void ui_core ::ClientToScreenScaledWidth (float & src_and_dest) const
136+ void UICore ::ClientToScreenScaledWidth (float & src_and_dest) const
137137{
138138 if (m_currentPointType != IUIRender::pttLIT)
139139 src_and_dest /= m_current_scale->x ;
140140}
141141
142- void ui_core ::ClientToScreenScaledHeight (float & src_and_dest) const
142+ void UICore ::ClientToScreenScaledHeight (float & src_and_dest) const
143143{
144144 if (m_currentPointType != IUIRender::pttLIT)
145145 src_and_dest /= m_current_scale->y ;
146146}
147147
148- void ui_core ::AlignPixel (float & src_and_dest) const
148+ void UICore ::AlignPixel (float & src_and_dest) const
149149{
150150 if (m_currentPointType != IUIRender::pttLIT)
151151 src_and_dest = (float )iFloor (src_and_dest);
152152}
153153
154- void ui_core ::PushScissor (const Frect& r_tgt, bool overlapped)
154+ void UICore ::PushScissor (const Frect& r_tgt, bool overlapped)
155155{
156156 if (UI ().m_currentPointType == IUIRender::pttLIT)
157157 return ;
@@ -186,7 +186,7 @@ void ui_core::PushScissor(const Frect& r_tgt, bool overlapped)
186186 GEnv.UIRender ->SetScissor (&r);
187187}
188188
189- void ui_core ::PopScissor ()
189+ void UICore ::PopScissor ()
190190{
191191 if (UI ().m_currentPointType == IUIRender::pttLIT)
192192 return ;
@@ -209,7 +209,7 @@ void ui_core::PopScissor()
209209 }
210210}
211211
212- ui_core::ui_core ()
212+ UICore::UICore ()
213213{
214214 if (!GEnv.isDedicatedServer )
215215 {
@@ -230,13 +230,13 @@ ui_core::ui_core()
230230 m_currentPointType = IUIRender::pttTL;
231231}
232232
233- ui_core ::~ui_core ()
233+ UICore ::~UICore ()
234234{
235235 xr_delete (m_pFontManager);
236236 xr_delete (m_pUICursor);
237237}
238238
239- void ui_core ::pp_start ()
239+ void UICore ::pp_start ()
240240{
241241 m_bPostprocess = true ;
242242
@@ -251,20 +251,20 @@ void ui_core::pp_start()
251251 float (GEnv.Render ->getTarget ()->get_height ()) / float (Device.dwHeight ));
252252}
253253
254- void ui_core ::pp_stop ()
254+ void UICore ::pp_stop ()
255255{
256256 m_bPostprocess = false ;
257257 m_current_scale = &m_scale_;
258258 g_current_font_scale.set (1 .0f , 1 .0f );
259259}
260260
261- void ui_core ::RenderFont () { Font ().Render (); }
262- bool ui_core ::is_widescreen ()
261+ void UICore ::RenderFont () { Font ().Render (); }
262+ bool UICore ::is_widescreen ()
263263{
264264 return (Device.dwWidth ) / float (Device.dwHeight ) > (UI_BASE_WIDTH / UI_BASE_HEIGHT + 0 .01f );
265265}
266266
267- float ui_core ::get_current_kx ()
267+ float UICore ::get_current_kx ()
268268{
269269 float h = float (Device.dwHeight );
270270 float w = float (Device.dwWidth );
@@ -273,7 +273,7 @@ float ui_core::get_current_kx()
273273 return res;
274274}
275275
276- shared_str ui_core ::get_xml_name (LPCSTR fn)
276+ shared_str UICore ::get_xml_name (LPCSTR fn)
277277{
278278 string_path str;
279279 if (!is_widescreen ())
0 commit comments