按钮(Button、Switch、Radio)
更多...
#include <dl_ui_button_base.h>
被 dl::UI::ButtonNormal, dl::UI::ButtonScale, dl::UI::ButtonSprite, dl::UI::ButtonSprite9, dl::UI::ButtonSpriteColor , 以及 dl::UI::ButtonTextColor 继承.
按钮(Button、Switch、Radio)
在文件 dl_ui_button_base.h 第 29 行定义.
◆ CbCustomRender
◆ CbEventClick
◆ Mode
◆ State
| 枚举值 |
|---|
| NORMAL | 普通
|
| OVER | 经过(仅有光标时使用)
|
| DOWN | 按下
|
| DISABLE | 禁用
|
| DOWN_OVER | 按下经过(Switch使用)
|
| DOWN_DISABLE | 按下禁用(Switch、Radio使用)
|
| MAX_NUM | |
在文件 dl_ui_button_base.h 第 34 行定义.
◆ Button() [1/2]
| dl::UI::Button::Button |
( |
| ) |
|
|
inline |
◆ Button() [2/2]
| dl::UI::Button::Button |
( |
const Button & | b | ) |
|
◆ ~Button()
| virtual dl::UI::Button::~Button |
( |
| ) |
|
|
inlinevirtual |
◆ _refresh_element_data()
| void dl::UI::Button::_refresh_element_data |
( |
| ) |
|
|
inlineprotected |
◆ _use_over()
| bool dl::UI::Button::_use_over |
( |
| ) |
|
|
inlineconstexprprotected |
◆ AddText() [1/3]
| void dl::UI::Button::AddText |
( |
gcText | txt | ) |
|
◆ AddText() [2/3]
| void dl::UI::Button::AddText |
( |
gcText | txt, |
|
|
const std::vector< Color > & | mul_col ) |
◆ AddText() [3/3]
| void dl::UI::Button::AddText |
( |
gcText | txt, |
|
|
const std::vector< Color > & | mul_col, |
|
|
const std::vector< Position > & | mul_offset ) |
添加文本属性
- 参数
-
| [in] | txt | 文本 |
| [in] | mul_col | 5种状态颜色 |
| [in] | mul_offset | 5种状态的文本偏移 |
◆ AddTextDefault()
| void dl::UI::Button::AddTextDefault |
( |
| ) |
|
◆ ClearState()
| void dl::UI::Button::ClearState |
( |
| ) |
|
◆ Clone()
| virtual Button * dl::UI::Button::Clone |
( |
| ) |
|
|
pure virtual |
◆ GetAnchor()
| virtual Position dl::UI::Button::GetAnchor |
( |
| ) |
|
|
pure virtual |
◆ GetClickControl()
| static Button * dl::UI::Button::GetClickControl |
( |
| ) |
|
|
inlinestatic |
◆ GetCoor()
| Coor * dl::UI::Button::GetCoor |
( |
| ) |
|
|
inline |
◆ GetCpt()
◆ GetIndex()
| std::size_t dl::UI::Button::GetIndex |
( |
State | state | ) |
|
|
inlineprotected |
◆ GetMode()
| Mode dl::UI::Button::GetMode |
( |
| ) |
|
|
inline |
◆ GetOrder() [1/2]
| virtual float dl::UI::Button::GetOrder |
( |
| ) |
|
|
pure virtual |
◆ GetOrder() [2/2]
| float dl::UI::Button::GetOrder |
( |
int | offset | ) |
|
|
inline |
◆ GetSize()
| virtual Position dl::UI::Button::GetSize |
( |
| ) |
|
|
pure virtual |
◆ GetState()
| State dl::UI::Button::GetState |
( |
| ) |
|
|
inline |
◆ GetString()
| std::string dl::UI::Button::GetString |
( |
| ) |
|
|
inline |
◆ GetTextData()
| TextData * dl::UI::Button::GetTextData |
( |
| ) |
|
|
inlineprotected |
◆ IsClick()
| bool dl::UI::Button::IsClick |
( |
| ) |
|
控件被点击
- 注解
- 对于 button来说,单击并释放才会触发
-
对于 switch来说,单击并释放才会触发
-
对于 radio来说,单击才会触发
◆ IsDown()
| bool dl::UI::Button::IsDown |
( |
| ) |
|
|
inline |
◆ IsOverOnce()
| bool dl::UI::Button::IsOverOnce |
( |
| ) |
|
◆ IsPickup()
| virtual bool dl::UI::Button::IsPickup |
( |
| ) |
|
|
pure virtual |
◆ IsRadio()
| bool dl::UI::Button::IsRadio |
( |
| ) |
|
|
inline |
◆ IsSelect()
| bool dl::UI::Button::IsSelect |
( |
| ) |
|
|
inline |
◆ OnTextSizeChange()
| virtual void dl::UI::Button::OnTextSizeChange |
( |
const Position & | size | ) |
|
|
inlineprotectedvirtual |
◆ Render()
| void dl::UI::Button::Render |
( |
| ) |
|
◆ RenderChild()
| virtual void dl::UI::Button::RenderChild |
( |
State | state_pre, |
|
|
State | state ) |
|
protectedvirtual |
◆ RenderDebug()
| virtual void dl::UI::Button::RenderDebug |
( |
| ) |
|
|
protectedvirtual |
◆ SetCustomRender()
◆ SetDisable()
| void dl::UI::Button::SetDisable |
( |
bool | disable | ) |
|
|
inline |
◆ SetEevntClick()
◆ SetElementData()
◆ SetElementDataAutoSize()
| void dl::UI::Button::SetElementDataAutoSize |
( |
bool | parent_w, |
|
|
bool | parent_h ) |
|
inline |
◆ SetElementDataRunAble()
| void dl::UI::Button::SetElementDataRunAble |
( |
bool | able | ) |
|
|
inline |
◆ SetMode()
| void dl::UI::Button::SetMode |
( |
Mode | mode | ) |
|
◆ SetName()
| void dl::UI::Button::SetName |
( |
std::string_view | name | ) |
|
|
inline |
◆ SetOrder()
| virtual void dl::UI::Button::SetOrder |
( |
float | order | ) |
|
|
pure virtual |
◆ SetSelect()
| void dl::UI::Button::SetSelect |
( |
bool | open | ) |
|
◆ SetSizeWithText()
| void dl::UI::Button::SetSizeWithText |
( |
bool | with, |
|
|
const Position & | extra_size ) |
◆ SetSound()
| void dl::UI::Button::SetSound |
( |
std::string_view | click, |
|
|
std::string_view | over ) |
|
inline |
◆ SetString()
| void dl::UI::Button::SetString |
( |
std::string_view | str | ) |
|
◆ SetTextAlign()
◆ Update()
| void dl::UI::Button::Update |
( |
| ) |
|
◆ UpdateChild()
| virtual void dl::UI::Button::UpdateChild |
( |
State | state_pre, |
|
|
State | state ) |
|
protectedvirtual |
◆ UpdateTextOrder()
| void dl::UI::Button::UpdateTextOrder |
( |
float | order | ) |
|
|
inlineprotected |
◆ _coor
| Coor* dl::UI::Button::_coor |
|
protected |
该类的文档由以下文件生成: