UI: Prevent race condition during emulator startup.

This commit is contained in:
Parker Lamb
2017-07-01 14:36:16 -05:00
parent 0c20f1c0fc
commit fc27b34304
6 changed files with 47 additions and 0 deletions

View File

@@ -19,6 +19,8 @@
namespace xe {
namespace ui {
class Window;
class MenuItem {
public:
typedef std::unique_ptr<MenuItem, void (*)(MenuItem*)> MenuItemPtr;
@@ -51,6 +53,9 @@ class MenuItem {
void RemoveChild(MenuItem* child_item);
MenuItem* child(size_t index);
virtual void EnableMenuItem(Window& window) = 0;
virtual void DisableMenuItem(Window& window) = 0;
protected:
MenuItem(Type type, const std::wstring& text, const std::wstring& hotkey,
std::function<void()> callback);