diff --git a/core/Base/Window.cpp b/core/Base/Window.cpp index 8087725f..8ed9a203 100644 --- a/core/Base/Window.cpp +++ b/core/Base/Window.cpp @@ -351,18 +351,18 @@ void e2d::Window::setTypewritingEnabled(bool enabled) } } -bool e2d::Window::popup(const String & text, const String & title, PopupStyle style, bool hasCancel) +bool e2d::Window::popup(const String & text, const String & title, Popup style, bool hasCancel) { UINT type = 0; switch (style) { - case e2d::Window::PopupStyle::Information: + case e2d::Window::Popup::Information: type = MB_ICONINFORMATION; break; - case e2d::Window::PopupStyle::Warning: + case e2d::Window::Popup::Warning: type = MB_ICONWARNING; break; - case e2d::Window::PopupStyle::Error: + case e2d::Window::Popup::Error: type = MB_ICONERROR; break; default: diff --git a/core/e2dbase.h b/core/e2dbase.h index 3f1f51b0..9e5b8c02 100644 --- a/core/e2dbase.h +++ b/core/e2dbase.h @@ -79,7 +79,7 @@ public: }; // 弹窗样式 - enum class PopupStyle : int + enum class Popup : int { Information, /* 信息 */ Warning, /* 警告 */ @@ -144,12 +144,13 @@ public: bool enabled ); - // 弹窗 + // 弹出窗口 + // 返回值:当窗口包含取消按钮时,返回值表示用户是否点击确认按钮 bool popup( - const String& text, /* 窗口内容 */ - const String& title, /* 窗口标题 */ - PopupStyle style = PopupStyle::Information, /* 弹窗样式 */ - bool hasCancel = false /* 包含取消按钮 */ + const String& text, /* 窗口内容 */ + const String& title, /* 窗口标题 */ + Popup style = Popup::Information, /* 弹窗样式 */ + bool hasCancel = false /* 包含取消按钮 */ ); // 处理窗体消息