32 ret->_txt->
SetUI(
true);
49 return _txt->IsPickup();
55 _txt->SetOrder(order);
64 void SetLang(std::string_view tag, std::string_view name)
66 _cptLang._str = { std::string{tag}, std::string{name} };
67 _cptLang._func = std::bind(&Text::_refresh_lang,
this, std::placeholders::_1, std::placeholders::_2);
68 _cpt.PushBack(&_cptLang);
70 _refresh_lang(tag, name);
75 if(_txt->SetString(str))
76 _refresh_element_data();
109 void _delete_this() {
delete this; }
118 _cptDeleteThis = std::bind(&Text::_delete_this,
this);
119 _cptSetOrder = std::bind(&
Text::SetOrder,
this, std::placeholders::_1);
123 _cptSetOrder = std::bind(&
Text::SetOrder,
this, std::placeholders::_1);
124 _cptClone = std::bind(&Text::_clone,
this);
126 _cpt.PushBack(&_cptDeleteThis);
127 _cpt.PushBack(&_cptSetOrder);
128 _cpt.PushBack(&_cptIsPickup);
129 _cpt.PushBack(&_cptRender);
130 _cpt.PushBack(&_cptGetCoor);
131 _cpt.PushBack(&_cptSetOrder);
132 _cpt.PushBack(&_cptClone);
133 _cpt.PushBack(&_panel);
136 _cpt.PushBack(&_cptElemData);
139 void _refresh_lang(std::string_view tag, std::string_view name)
144 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, const Position &pos={})
static Text * Create(gcText txt)
gcText GetText()
返回文本对象,注意在大小变化后,不会更新ui的元素数据