17#ifndef DL_DISABLE_RENDER
65 _statePre{ b._statePre },
68 _isClick{ b._isClick },
69 _bDisable{ b._bDisable },
70 _cptElemData{ b._cptElemData },
120 void SetSound(std::string_view click, std::string_view over)
122 _strSndClick = std::string{ click };
123 _strSndOver = std::string{ over };
139 _cptElemData.
_hv = hv;
140 _cptElemData.
_pos = pos;
145 _cptElemData._bRunAble = able;
155 return _clickControl;
160 if (_clickControl ==
this)
161 _clickControl =
nullptr;
174 std::string _strSndClick;
175 std::string _strSndOver;
191 return (std::size_t)state;
198 _cptElemData._size =
GetSize();
204#if DL_PLATFORM == DL_PLATFORM_ANDROID
227 void _delete_this() {
delete this; }
236 _cptDeleteThis = std::bind(&Button::_delete_this,
this);
247 _cptClone = std::bind(&Button::_clone,
this);
266 static Button* _clickControl;
271 virtual void UpdateChild(
State state_pre,
State state) = 0;
272 virtual void RenderChild(
State state_pre,
State state) = 0;
274 void _update_button();
275 void _update_switch();
276 void _update_radio();
void PushBack(AnyType any)
添加一个任意对象
static Coor * Create(Coor *parent=nullptr)
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< void()>, str_uid("RenderD")> RenderDebug
调试绘图
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