dl
dl::UI::MsgBox类 参考

消息框 更多...

#include <dl_ui_msg_box.h>

继承自 dl::UI::Window .

Public 成员函数

PanelGetPanelButton ()
 返回按钮组 @info 设置整体位置和按钮布局
 
virtual void Update () override
 帧函数 @info 子类重载后,需要调用 Window::Update()
 
void SetClickClose (bool close)
 设置是否点击任意按钮关闭窗口
 
size_t GetClickIndex ()
 返回点击的按钮下标,不包含关闭按钮
 
size_t GetOverOnceIndex ()
 返回经过的按钮下标,不包含关闭按钮
 
void Set (std::string_view title, std::string_view info, std::vector< std::string_view > all_btn)
 设置内容
 
 ~MsgBox ()
 
- Public 成员函数 继承自 dl::UI::Window
void Render ()
 
template<typename T>
TCast ()
 
bool IsPickup ()
 
bool IsClickClose ()
 
float GetOrder ()
 
void SetOrder (float order)
 设置绘制顺序
 
void SetSize (const Position &size)
 设置大小
 
void Center ()
 
void SetBackground (UI::Background *bg, bool auto_size=true)
 设置背景
 
UI::BackgroundGetBackground ()
 
void SetButtonClose (UI::Button *btn)
 设置关闭按钮
 
UI::ButtonGetButtonClose ()
 
void SetVisible (bool visible)
 设置是否显示
 
bool IsVisible ()
 
void SetWindowCache (bool cache)
 
void SetWindowModal (bool modal)
 
PanelGetPanel ()
 
CoorGetCoor ()
 
void RenderDebug ()
 
void ExFastSet ()
 快速初始化到一般的样式,可作为用法参考
 
ComponentsGetCpt ()
 
virtual ~Window ()
 

静态 Public 成员函数

static MsgBoxCreate (UI::Text *title, UI::Text *content, UI::Button *btn)
 创建窗口
 

额外继承的成员函数

- Protected 成员函数 继承自 dl::UI::Window
 Window ()
 
- Protected 属性 继承自 dl::UI::Window
Panel_panel
 

详细描述

消息框

在文件 dl_ui_msg_box.h24 行定义.

构造及析构函数说明

◆ ~MsgBox()

dl::UI::MsgBox::~MsgBox ( )

成员函数说明

◆ Create()

static MsgBox * dl::UI::MsgBox::Create ( UI::Text * title,
UI::Text * content,
UI::Button * btn )
static

创建窗口

参数
[in]panel元素模板

◆ GetClickIndex()

size_t dl::UI::MsgBox::GetClickIndex ( )

返回点击的按钮下标,不包含关闭按钮

◆ GetOverOnceIndex()

size_t dl::UI::MsgBox::GetOverOnceIndex ( )

返回经过的按钮下标,不包含关闭按钮

◆ GetPanelButton()

Panel * dl::UI::MsgBox::GetPanelButton ( )
inline

返回按钮组 @info 设置整体位置和按钮布局

在文件 dl_ui_msg_box.h38 行定义.

◆ Set()

void dl::UI::MsgBox::Set ( std::string_view title,
std::string_view info,
std::vector< std::string_view > all_btn )

设置内容

参数
[in]title标题
[in]info内容
[in]btns按钮内容

◆ SetClickClose()

void dl::UI::MsgBox::SetClickClose ( bool close)
inline

设置是否点击任意按钮关闭窗口

注解
默认为真

在文件 dl_ui_msg_box.h45 行定义.

◆ Update()

virtual void dl::UI::MsgBox::Update ( )
overridevirtual

帧函数 @info 子类重载后,需要调用 Window::Update()

重载 dl::UI::Window .


该类的文档由以下文件生成: