48 return _txt->IsPickup();
54 _txt->SetOrder(order);
63 void SetLang(std::string_view tag, std::string_view name)
65 _cptLang._str = { std::string{tag}, std::string{name} };
66 _cptLang._func = std::bind(&Text::_refresh_lang,
this, std::placeholders::_1, std::placeholders::_2);
67 _cpt.PushBack(&_cptLang);
69 _refresh_lang(tag, name);
74 if(_txt->SetString(str))
75 _refresh_element_data();
106 void _delete_this() {
delete this; }
115 _cptDeleteThis = std::bind(&Text::_delete_this,
this);
116 _cptSetOrder = std::bind(&
Text::SetOrder,
this, std::placeholders::_1);
120 _cptSetOrder = std::bind(&
Text::SetOrder,
this, std::placeholders::_1);
121 _cptClone = std::bind(&Text::_clone,
this);
123 _cpt.PushBack(&_cptDeleteThis);
124 _cpt.PushBack(&_cptSetOrder);
125 _cpt.PushBack(&_cptIsPickup);
126 _cpt.PushBack(&_cptRender);
127 _cpt.PushBack(&_cptGetCoor);
128 _cpt.PushBack(&_cptSetOrder);
129 _cpt.PushBack(&_cptClone);
130 _cpt.PushBack(&_panel);
133 _cpt.PushBack(&_cptElemData);
136 void _refresh_lang(std::string_view tag, std::string_view name)
141 void _refresh_element_data()
void SetOrder(float order)
设置绘制顺序
void SetLang(std::string_view tag, std::string_view name)
设置语言
void SetString(std::string_view str)
void SetElementData(const Align::Direction2 &hv)
static Text * Create(gcText txt)
gcText GetText()
返回文本对象,注意在大小变化后,不会更新ui的元素数据