@@ -203,6 +203,7 @@ class ENGINE_API CRenderDevice : public CRenderDeviceBase
203203
204204 MessageRegistry<pureFrame> seqFrameMT;
205205 MessageRegistry<pureDeviceReset> seqDeviceReset;
206+ MessageRegistry<pureUIReset> seqUIReset;
206207 xr_vector<fastdelegate::FastDelegate0<>> seqParallel;
207208 CSecondVPParams m_SecondViewport; // --#SM+#-- +SecondVP+
208209
@@ -347,4 +348,39 @@ class ENGINE_API CLoadScreenRenderer : public pureRender
347348};
348349extern ENGINE_API CLoadScreenRenderer load_screen_renderer;
349350
351+ class CDeviceResetNotifier : public pureDeviceReset
352+ {
353+ public:
354+ CDeviceResetNotifier () { Device.seqDeviceReset .Add (this , REG_PRIORITY_NORMAL); }
355+ virtual ~CDeviceResetNotifier () { Device.seqDeviceReset .Remove (this ); }
356+ void OnDeviceReset () override {}
357+ };
358+
359+ class CUIResetNotifier : public pureUIReset
360+ {
361+ public:
362+ CUIResetNotifier () { Device.seqUIReset .Add (this , REG_PRIORITY_NORMAL); }
363+ virtual ~CUIResetNotifier () { Device.seqUIReset .Remove (this ); }
364+ void OnUIReset () override {}
365+ };
366+
367+ class CUIResetAndResolutionNotifier : public pureUIReset , pureScreenResolutionChanged
368+ {
369+ public:
370+ CUIResetAndResolutionNotifier ()
371+ {
372+ Device.seqUIReset .Add (this , REG_PRIORITY_NORMAL);
373+ Device.seqResolutionChanged .Add (this , REG_PRIORITY_NORMAL);
374+ }
375+
376+ virtual ~CUIResetAndResolutionNotifier ()
377+ {
378+ Device.seqUIReset .Remove (this );
379+ Device.seqResolutionChanged .Remove (this );
380+ }
381+
382+ void OnUIReset () override {}
383+ void OnScreenResolutionChanged () override { OnUIReset (); }
384+ };
385+
350386#endif
0 commit comments