@@ -201,7 +201,8 @@ struct MouseWallConfig
201201 ((int32_t ), y1, 0 ),
202202 ((int32_t ), x2, 5760 ),
203203 ((int32_t ), y2, 2062 ),
204- ((float ), borderBreakSeconds, 0 .5f )
204+ ((float ), borderBreakSeconds, 0 .5f ),
205+ ((bool ), deactivateOnGame, false )
205206 )
206207
207208 bool isMouseInArea (int32_t mouseX, int32_t mouseY) const
@@ -581,7 +582,6 @@ class MyGame : public bbe::Game
581582 if (!seenServerTaskIds.getList ().contains ({ id }))
582583 {
583584 bbe::String task = line.substring (separator + 1 , -1 );
584- BBELOGLN (task);
585585 tasks.addServerTask (id, task);
586586 seenServerTaskIds.add ({ id });
587587 }
@@ -599,7 +599,7 @@ class MyGame : public bbe::Game
599599 }
600600
601601 beginMeasure (" Mouse Wall" );
602- if (mouseWallConfig->active )
602+ if (mouseWallConfig->active && (!processes. isGameOn () || !mouseWallConfig-> deactivateOnGame ) )
603603 {
604604 bbe::Vector2 globalMouse = getMouseGlobal ();
605605 if (mouseWallConfig->mouseTrapped )
@@ -1122,7 +1122,7 @@ class MyGame : public bbe::Game
11221122 }
11231123 errorString = " " ;
11241124 }
1125- catch (const nlohmann::json::parse_error& e )
1125+ catch (const nlohmann::json::parse_error&)
11261126 {
11271127 errorString = bbe::String (" Failed to interpret json: " ) + contents.dataContainer .getRaw ();
11281128 }
@@ -1376,6 +1376,8 @@ class MyGame : public bbe::Game
13761376 bool requiresWrite = false ;
13771377
13781378 requiresWrite |= ImGui::Checkbox (" Active" , &mouseWallConfig->active );
1379+ ImGui::Text ((processes.isGameOn () && mouseWallConfig->deactivateOnGame ) ? " Deactivated because of game!" : " " );
1380+ requiresWrite |= ImGui::Checkbox (" Deactives on game" , &mouseWallConfig->deactivateOnGame );
13791381 requiresWrite |= ImGui::InputInt (" X1" , &mouseWallConfig->x1 );
13801382 requiresWrite |= ImGui::InputInt (" Y1" , &mouseWallConfig->y1 );
13811383 requiresWrite |= ImGui::InputInt (" X2" , &mouseWallConfig->x2 );
0 commit comments