Dxlibのウィンドウのボタンの処理・描画を管理するクラス.
[詳解]
#include <simple_button.h>
Dxlibのウィンドウのボタンの処理・描画を管理するクラス.
simple_button.h の 24 行目に定義があります。
◆ SimpleButton() [1/2]
designlab::SimpleButton::SimpleButton |
( |
| ) |
|
|
delete |
◆ SimpleButton() [2/2]
designlab::SimpleButton::SimpleButton |
( |
const std::string & |
text, |
|
|
int |
x_pos, |
|
|
int |
y_pos, |
|
|
int |
x_size, |
|
|
int |
y_size, |
|
|
bool |
fit_size = false |
|
) |
| |
コンストラクタでボタンのテキスト,座標,サイズを受け取る.
- 引数
-
[in] | text | ボタンに書かれるテキスト. |
[in] | x_pos | ボタンのx座標.ボタンの中心座標. |
[in] | y_pos | ボタンのy座標.ボタンの中心座標. |
[in] | x_size | ボタンの横幅. |
[in] | y_size | ボタンの縦幅. |
[in] | fit_size | ボタンのサイズをテキストに合わせるかどうか. defaultでは false. |
simple_button.cpp の 23 行目に定義があります。
◆ ~SimpleButton()
designlab::SimpleButton::~SimpleButton |
( |
| ) |
|
|
default |
◆ ClickedAction()
void designlab::SimpleButton::ClickedAction |
( |
const DxlibMouseState & |
state | ) |
|
|
overridevirtual |
◆ CursorOnGui()
bool designlab::SimpleButton::CursorOnGui |
( |
int |
cursor_x, |
|
|
int |
cursor_y |
|
) |
| const |
|
overridevirtualnoexcept |
◆ Draw()
void designlab::SimpleButton::Draw |
( |
| ) |
const |
|
overridevirtual |
◆ GetPosMiddleX()
constexpr int designlab::SimpleButton::GetPosMiddleX |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ GetPosMiddleY()
constexpr int designlab::SimpleButton::GetPosMiddleY |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ IsVisible()
bool designlab::SimpleButton::IsVisible |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ SetActivateFunction()
void designlab::SimpleButton::SetActivateFunction |
( |
const std::function< void()> & |
func | ) |
|
|
inline |
ボタンがクリックされたときに実行される関数を設定する.
- 引数
-
[in] | func | ボタンがクリックされたときに実行される関数. |
simple_button.h の 45 行目に定義があります。
◆ SetPos()
ボタンの座標を設定する.
- 引数
-
[in] | pos_x | ボタンのx座標. |
[in] | pos_y | ボタンのy座標. |
[in] | option | ボタンのどの地点を起点に座標を設定するかを指定する. defaultでは左上を起点とする. |
simple_button.cpp の 37 行目に定義があります。
◆ SetVisible()
void designlab::SimpleButton::SetVisible |
( |
bool |
visible | ) |
|
|
inlineoverridevirtual |
◆ Update()
void designlab::SimpleButton::Update |
( |
| ) |
|
|
overridevirtual |
このクラス詳解は次のファイルから抽出されました: