17#ifndef DL_DISABLE_RENDER
61 _statePre(b._statePre),
64 _bDisable(b._bDisable),
111 void SetSound(std::string_view click, std::string_view over)
113 _strSndClick = std::string{ click };
114 _strSndOver = std::string{ over };
129 _cptElemData._hv = hv;
134 _cptElemData._bRunAble = able;
155 std::string _strSndClick;
156 std::string _strSndOver;
172 return (std::size_t)state;
179 _cptElemData._size =
GetSize();
199 void _delete_this() {
delete this; }
208 _cptDeleteThis = std::bind(&Button::_delete_this,
this);
218 _cptClone = std::bind(&Button::_clone,
this);
236 static Button* _clickControl;
241 virtual void UpdateChild(
State state_pre,
State state) = 0;
242 virtual void RenderChild(
State state_pre,
State state) = 0;
244 void _update_button();
245 void _update_switch();
246 void _update_radio();
void PushBack(AnyType any)
添加一个任意对象
static Coor * Create(Coor *parent=nullptr)
std::array< Direction, 2 > Direction2
Function< std::function< bool()>, str_uid("IsSelect")> IsSelect
选择
Function< std::function< void(float)>, str_uid("SetOrder")> SetOrder
设置order
Function< std::function< dl::Coor *()>, str_uid("GetCoor")> GetCoor
返回坐标系
Function< std::function< bool()>, str_uid("IsPickup")> IsPickup
---------------------------—具体组件----------------------------------—
Function< std::function< bool()>, str_uid("IsDown")> IsDown
按下状态
Function< std::function< void(bool)>, str_uid("SetSelect")> SetSelect
设置是否选择
Function< std::function< void()>, str_uid("Render")> Render
绘制
Function< std::function< void()>, str_uid("DeleteThis")> DeleteThis
删除自身
Function< std::function< void()>, str_uid("Update")> Update
逻辑
Function< std::function< bool()>, str_uid("IsClick")> IsClick
点击
Function< std::function< Components *()>, str_uid("Clone")> Clone
克隆
Button::State ButtonState