From a152c6c4ca5d150873360de6948ef85a6d95daff Mon Sep 17 00:00:00 2001
From: D-AIRY <admin@ds-servers.com>
Date: Sat, 28 Nov 2020 00:50:34 +0300
Subject: [PATCH] Updated terrax menu

---
 source/terrax/mainWindow.cpp |  41 +++++++++++++++++++++++++++++++++++
 source/terrax/resource.h     | Bin 17234 -> 17234 bytes
 source/terrax/terrax.rc      | Bin 35528 -> 35728 bytes
 3 files changed, 41 insertions(+)

diff --git a/source/terrax/mainWindow.cpp b/source/terrax/mainWindow.cpp
index 252700f3a..8bfcd299f 100644
--- a/source/terrax/mainWindow.cpp
+++ b/source/terrax/mainWindow.cpp
@@ -7,6 +7,7 @@
 #include "resource.h"
 #include <commctrl.h>
 #include <combaseapi.h>
+#include <shellapi.h>
 
 #include <dwmapi.h>
 #pragma comment(lib, "dwmapi.lib")
@@ -1273,6 +1274,44 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 		case ID_TOOLS_RELOADMATERIALS:
 			g_pEngine->getCore()->getConsole()->execCommand("mtl_reload");
 			break;
+
+		case ID_HELP_SKYXENGINEWIKI:
+			ShellExecute(0, 0, "https://wiki.skyxengine.com", 0, 0, SW_SHOW);
+			break;
+
+		case ID_HELP_ABOUT:
+			MessageBox(g_hWndMain, SKYXENGINE_VERSION4EDITORS "\nhttps://skyxengine.com\nLicensed under the AGPL-3.0 License\nCopyright (c) DogmaNet Team, 2020", "TerraX Editor " SKYXENGINE_VERSION, MB_OK | MB_ICONINFORMATION);
+			break;
+
+		case ID_EDIT_CLEARSELECTION:
+			{
+				CCommandSelect *pCmdUnselect = new CCommandSelect();
+				for(UINT i = 0, l = g_pLevelObjects.size(); i < l; ++i)
+				{
+					IXEditorObject *pObj = g_pLevelObjects[i];
+					if(pObj->isSelected())
+					{
+						pCmdUnselect->addDeselected(i);
+					}
+				}
+				g_pUndoManager->execCommand(pCmdUnselect);
+			}
+			break;
+
+		case ID_EDIT_SELECTALL:
+			{
+				CCommandSelect *pCmdSelect = new CCommandSelect();
+				for(UINT i = 0, l = g_pLevelObjects.size(); i < l; ++i)
+				{
+					IXEditorObject *pObj = g_pLevelObjects[i];
+					if(!pObj->isSelected())
+					{
+						pCmdSelect->addSelected(i);
+					}
+				}
+				g_pUndoManager->execCommand(pCmdSelect);
+			}
+			break;
 		}
 		break;
 
@@ -2655,6 +2694,8 @@ void XUpdateStatusGrid()
 
 	sprintf_s(szMsg, "Snap: %s; Grid: %s", g_xConfig.m_bSnapGrid ? "on" : "off", szGrid);
 	SendMessage(g_hStatusWnd, SB_SETTEXT, MAKEWPARAM(4, 0), (LPARAM)szMsg);
+
+	XCheckMenuItem(g_hMenu, ID_LEVEL_SNAPTOGRID, g_xConfig.m_bSnapGrid);
 }
 
 void XUpdateStatusMPos()
diff --git a/source/terrax/resource.h b/source/terrax/resource.h
index 70343273ece3674b0c9cdfef99e950dc4479e6d4..e712429581df2dd7579529f034aa9d0f84b3c9d7 100644
GIT binary patch
delta 21
dcmccA#(1fXaYKpI<OVH?$$Cx_lb1NH0{~;b2(SPE

delta 19
bcmccA#(1fXaYKm{qv7O>PTG?fIBfy|Q#%Ml

diff --git a/source/terrax/terrax.rc b/source/terrax/terrax.rc
index d8ba1972ec988f95d4e6094017e4fa818d282f42..b7bb00301c6a27e180893a3943f8c9dffdd69ec5 100644
GIT binary patch
delta 85
zcmX>xm1)9srVSq?CcophnJgihGr5kZWb+frH|&$&aVt#DQ|6jnATGA~k7AJO<bO_V
slNJ05CL4HhZ4Pih#WvZ(OKtKxUY^Mf{8E#5d5cZn;I6cJf}e#A0Nkh{X#fBK

delta 61
zcmbO*o$16>rVSq?CO;71nY=+&X0ncC&g5DAYLn;5T5aZ$dc!{Xfq>3t3#A~{%^V(Q
T*d{M<WScy}y<l^Mzl99|^T8K*

-- 
GitLab