|
dl
|
缩放按钮(注意精灵没有Coor) 更多...
#include <dl_ui_button_scale.h>
继承自 dl::UI::Button .
Public 成员函数 | |
| virtual ButtonScale * | Clone () override |
| 必须实现的函数 | |
| virtual bool | IsPickup () override |
| virtual void | SetOrder (float order) override |
| virtual float | GetOrder () override |
| virtual Position | GetSize () override |
| virtual Position | GetAnchor () override |
| virtual void | RenderDebug () override |
| ~ButtonScale () | |
Public 成员函数 继承自 dl::UI::Button | |
| Button () | |
| Button (const Button &b) | |
| void | Update () |
| void | Render () |
| bool | IsClick () |
| 控件被点击 | |
| bool | IsDown () |
| 控件按下状态 | |
| bool | IsOverOnce () |
| 经过按钮,直到离开控件再次进入才会返回真 | |
| bool | IsRadio () |
| bool | IsSelect () |
| 控件是选中状态 | |
| void | SetSelect (bool open) |
| void | SetMode (Mode mode) |
| void | SetDisable (bool disable) |
| void | ClearState () |
| 清理状态为普通 | |
| void | SetSound (std::string_view click, std::string_view over) |
| 设置按钮音效 | |
| State | GetState () |
| Coor * | GetCoor () |
| 添加到Panel后会自动设置Coor数据,要设置位置等 请调用SetElementData | |
| float | GetOrder (int offset) |
| void | SetElementData (const Align::Direction2 &hv, const Position &pos={}) |
| void | SetElementDataRunAble (bool able) |
| void | SetElementDataAutoSize (bool parent_w, bool parent_h) |
| std::string | GetString () |
| void | AddText (gcText txt, const std::vector< Color > &mul_col, const std::vector< Position > &mul_offset) |
| 添加文本属性 | |
| void | AddTextDefault () |
| void | AddText (gcText txt) |
| void | AddText (gcText txt, const std::vector< Color > &mul_col) |
| void | SetString (std::string_view str) |
| void | SetTextAlign (const Align::Direction2 &hv) |
| void | SetSizeWithText (bool with, const Position &extra_size) |
| 设置精灵大小跟随文本 | |
| void | SetName (std::string_view name) |
| void | SetCustomRender (CbCustomRender cb) |
| void | SetEevntClick (CbEventClick cb) |
| Components * | GetCpt () |
| Mode | GetMode () |
| virtual | ~Button () |
静态 Public 成员函数 | |
| static ButtonScale * | Create (Panel *panel, float min=1.0f, float max=1.2f, float dt=1.0f) |
| 缩放按钮 | |
静态 Public 成员函数 继承自 dl::UI::Button | |
| static Button * | GetClickControl () |
额外继承的成员函数 | |
Public 类型 继承自 dl::UI::Button | |
| enum class | State { NORMAL , OVER , DOWN , DISABLE , DOWN_OVER , DOWN_DISABLE , MAX_NUM } |
| enum class | Mode { BUTTON , SWITCH , RADIO } |
| using | CbCustomRender = std::function<void(Button*)> |
| using | CbEventClick = std::function<void(Button*)> |
Protected 成员函数 继承自 dl::UI::Button | |
| std::size_t | GetIndex (State state) |
| 返回索引 | |
| void | _refresh_element_data () |
| constexpr bool | _use_over () |
| virtual void | RenderChild (State state_pre, State state) |
| void | UpdateTextOrder (float order) |
| order变化时需要调用 | |
| virtual void | OnTextSizeChange (const Position &size) |
| TextData * | GetTextData () |
Protected 属性 继承自 dl::UI::Button | |
| Coor * | _coor |
缩放按钮(注意精灵没有Coor)
在文件 dl_ui_button_scale.h 第 24 行定义.
| dl::UI::ButtonScale::~ButtonScale | ( | ) |
|
overridevirtual |
必须实现的函数
实现了 dl::UI::Button.
|
static |
缩放按钮
| [in] | panel | 组件面板 |
|
inlineoverridevirtual |
实现了 dl::UI::Button.
在文件 dl_ui_button_scale.h 第 49 行定义.
|
inlineoverridevirtual |
实现了 dl::UI::Button.
在文件 dl_ui_button_scale.h 第 44 行定义.
|
inlineoverridevirtual |
实现了 dl::UI::Button.
在文件 dl_ui_button_scale.h 第 48 行定义.
|
inlineoverridevirtual |
实现了 dl::UI::Button.
在文件 dl_ui_button_scale.h 第 36 行定义.
|
inlineoverridevirtual |
重载 dl::UI::Button .
在文件 dl_ui_button_scale.h 第 50 行定义.
|
inlineoverridevirtual |
实现了 dl::UI::Button.
在文件 dl_ui_button_scale.h 第 40 行定义.