From fad70c9f37568c89a2512af6409264a5ddc935fd Mon Sep 17 00:00:00 2001 From: Vasily Davydov Date: Tue, 2 May 2023 11:24:54 +0300 Subject: [PATCH] menu: [#25] rename event to state --- source/shoh/src/threads/manager/Menu.cpp | 4 ++-- source/shoh/src/threads/manager/Menu.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/shoh/src/threads/manager/Menu.cpp b/source/shoh/src/threads/manager/Menu.cpp index 3a89b20..04f24ed 100644 --- a/source/shoh/src/threads/manager/Menu.cpp +++ b/source/shoh/src/threads/manager/Menu.cpp @@ -63,10 +63,10 @@ void Menu::HandleEventPair (Event::EventPair *ep) return; } -void Menu::SetEvent (obj_pointer newevent) +void Menu::SetState (p_state new_state) { (this->*current) (MenuObjEvent (MenuObjEvent::eUnFocus)); - current = newevent; + current = new_state; (this->*current) (MenuObjEvent (MenuObjEvent::eFocus)); } diff --git a/source/shoh/src/threads/manager/Menu.h b/source/shoh/src/threads/manager/Menu.h index ef432d4..eb89d98 100644 --- a/source/shoh/src/threads/manager/Menu.h +++ b/source/shoh/src/threads/manager/Menu.h @@ -14,7 +14,7 @@ #define THREADS_MANAGER_MENU_H_ class Menu; -typedef void (Menu::*obj_pointer) (const MenuObjEvent &); +typedef void (Menu::*p_state) (const MenuObjEvent &); class Menu { @@ -25,9 +25,9 @@ public: private: /* Variables and objects */ - obj_pointer current; + p_state current; /* Methods */ - void SetEvent (obj_pointer newevent); + void SetState (p_state new_state); void HandleObj (const MenuObjEvent &event); };