From b734328b5e7e41a43bf23e0c6c60820be04daa08 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Tue, 16 Jul 2024 23:25:58 +0800 Subject: [PATCH] [saco] Imlement/match `CMenuPool::HideMenu(...)` --- saco/net/menupool.cpp | 8 ++++++++ saco/net/menupool.h | 1 + 2 files changed, 9 insertions(+) diff --git a/saco/net/menupool.cpp b/saco/net/menupool.cpp index 0702ff5..c4eb8a7 100644 --- a/saco/net/menupool.cpp +++ b/saco/net/menupool.cpp @@ -92,3 +92,11 @@ void CMenuPool::ShowMenu(BYTE byteMenuID) m_byteExited = 0; } +void CMenuPool::HideMenu(BYTE byteMenuID) +{ + if (byteMenuID >= MAX_MENUS || m_byteCurrentMenu == MAX_MENUS) return; + if (m_bMenuSlotState[byteMenuID] == FALSE || !m_pMenus[byteMenuID]) return; + m_pMenus[byteMenuID]->Hide(); + m_byteCurrentMenu = MAX_MENUS; +} + diff --git a/saco/net/menupool.h b/saco/net/menupool.h index ffff5e9..257d9d0 100644 --- a/saco/net/menupool.h +++ b/saco/net/menupool.h @@ -21,6 +21,7 @@ public: BOOL Delete(BYTE byteMenuID); void ShowMenu(BYTE byteMenuID); + void HideMenu(BYTE byteMenuID); }; //----------------------------------------------------