File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Tests/VisualTests/Context/src Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ namespace OgreBites
116
116
117
117
bool frameRenderingQueued (const Ogre::FrameEvent& evt) override
118
118
{
119
- if (mTrayMgr ->isDialogVisible ())
119
+ if (mTrayMgr && mTrayMgr ->isDialogVisible ())
120
120
return true ;
121
121
122
122
mInputListenerChain .frameRendered (evt);
@@ -185,6 +185,13 @@ namespace OgreBites
185
185
mContext ->addInputListener (&mInputListenerChain );
186
186
}
187
187
188
+ void _removeTrays ()
189
+ {
190
+ mControls .reset ();
191
+ mTrayMgr .reset ();
192
+ mInputListenerChain = TouchAgnosticInputListenerChain (mWindow , {});
193
+ }
194
+
188
195
void _shutdown () override
189
196
{
190
197
if (mContext )
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ THE SOFTWARE.
33
33
#include " OgreConfigFile.h"
34
34
#include " OgrePlatform.h"
35
35
#include " OgreBitesConfigDialog.h"
36
+ #include < SdkSample.h>
36
37
37
38
#include < iostream>
38
39
@@ -317,6 +318,11 @@ void TestContext::runSample(OgreBites::Sample* sampleToRun)
317
318
if (sampleToRun)
318
319
LogManager::getSingleton ().logMessage (" ----- Running Visual Test " + sampleToRun->getInfo ()[" Title" ] + " -----" );
319
320
SampleContext::runSample (sampleToRun);
321
+
322
+ if (auto sdkSample = dynamic_cast <OgreBites::SdkSample*>(sampleToRun))
323
+ {
324
+ sdkSample->_removeTrays ();
325
+ }
320
326
}
321
327
// -----------------------------------------------------------------------
322
328
You can’t perform that action at this time.
0 commit comments