From 02ff34a6ef1b5363f8ddb82f0a94f9f4edd1b044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20?= =?UTF-8?q?=D0=A1=D1=83=D1=85=D0=BE=D0=B2?= <22411953+Vladislav4KZ@users.noreply.github.com> Date: Thu, 20 Apr 2023 11:20:03 +0000 Subject: [PATCH] control: added some missing notifications displayed on hud when using features from graph editor menu --- src/control.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/control.cpp b/src/control.cpp index 08f9cbb..168510f 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -1316,20 +1316,31 @@ int BotControl::menuGraphPage2 (int item) { case 4: if (graph.checkNodes (true)) { graph.saveGraphData (); + msg ("Graph saved."); } else { - msg ("Graph not saved\nThere are errors. See console..."); + msg ("Graph not saved. There are errors, see console..."); } showMenu (Menu::NodeMainPage2); break; case 5: - graph.saveGraphData (); + if (graph.saveGraphData ()) { + msg ("Graph saved."); + } + else { + msg ("Could not save Graph. See console..."); + } showMenu (Menu::NodeMainPage2); break; case 6: - graph.loadGraphData (); + if (graph.loadGraphData ()) { + msg ("Graph loaded."); + } + else { + msg ("Could not load Graph. See console..."); + } showMenu (Menu::NodeMainPage2); break; @@ -1348,9 +1359,11 @@ int BotControl::menuGraphPage2 (int item) { if (graph.hasEditFlag (GraphEdit::Noclip)) { graph.clearEditFlag (GraphEdit::Noclip); + msg ("Noclip mode disabled."); } else { graph.setEditFlag (GraphEdit::Noclip); + msg ("Noclip mode enabled."); } showMenu (Menu::NodeMainPage2);