14#ifndef DL_DISABLE_RENDER
43 return dynamic_cast<T*
>(
this);
53 return _btnClose && _btnClose->IsClick();
72 _cptElemData._size = size;
77 _panel->SetPosScale({ 0.5f, 0.5f });
130 _btnClose{ nullptr },
160 void _delete_this() {
delete this; }
164 _cptDeleteThis = std::bind(&Window::_delete_this,
this);
183 void _refresh_order_bg(
float order)
189 void _refresh_order_btn_close(
float order)
void PushBack(AnyType any)
添加一个任意对象
void SetOrder(float order)
UI::Background * GetBackground()
virtual void Update()
帧函数 @info 子类重载后,需要调用 Window::Update()
void ExFastSet()
快速初始化到一般的样式,可作为用法参考
void SetWindowCache(bool cache)
void SetButtonClose(UI::Button *btn)
设置关闭按钮
void SetVisible(bool visible)
设置是否显示
UI::Button * GetButtonClose()
void SetBackground(UI::Background *bg, bool auto_size=true)
设置背景
void SetWindowModal(bool modal)
void SetSize(const Position &size)
设置大小
void SetOrder(float order)
设置绘制顺序
Function< std::function< void(float)>, str_uid("SetOrder")> SetOrder
设置order
Function< std::function< void()>, str_uid("RenderD")> RenderDebug
调试绘图
Function< std::function< dl::Coor *()>, str_uid("GetCoor")> GetCoor
返回坐标系
Function< std::function< void()>, str_uid("Render")> Render
绘制
Function< std::function< void()>, str_uid("DeleteThis")> DeleteThis
删除自身
Function< std::function< void()>, str_uid("Update")> Update
逻辑
constexpr float OffsetOrder(float order, int u=1, int v=0, int w=0)
偏移order