Window类弹窗函数增加注释说明

This commit is contained in:
Nomango 2018-07-17 10:34:16 +08:00
parent 02bb68f21f
commit 167bf51d4c
2 changed files with 11 additions and 10 deletions

View File

@ -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:

View File

@ -79,7 +79,7 @@ public:
};
// 弹窗样式
enum class PopupStyle : int
enum class Popup : int
{
Information, /* 信息 */
Warning, /* 警告 */
@ -144,11 +144,12 @@ public:
bool enabled
);
// µ¯´°
// 弹出窗口
// 返回值:当窗口包含取消按钮时,返回值表示用户是否点击确认按钮
bool popup(
const String& text, /* 窗口内容 */
const String& title, /* 窗口标题 */
PopupStyle style = PopupStyle::Information, /* µ¯´°Ñùʽ */
Popup style = Popup::Information, /* 弹窗样式 */
bool hasCancel = false /* 包含取消按钮 */
);