#include <comboBoxComponent.h>
Public Member Functions | |
ComboBoxComponent (TTF_Draw &ttf_resource) | |
TrueTypeFontリソース指定のコンストラクタ. | |
bool | draw (unsigned long ticks, const UserInput &ui) |
コンポーネントの描画 | |
void | add (const Uint16 *text) |
表示項目の追加 | |
void | add (const char *text) |
void | setColor (unsigned long fore, unsigned long back, unsigned long focused_fore, unsigned long focused_back) |
void | setFontSize (int size) |
フォントサイズ変更 | |
void | updateSelected (void) |
選択情報のクリア | |
void | activate (bool on) |
描画 | |
void | setNowIndex (int index) |
選択項目の強制指定 | |
bool | isDecided (void) |
unsigned int | getNowIndex (void) |
選択項目の取得 | |
void | beginFocus (void) |
void | endFocus (void) |
Definition at line 23 of file comboBoxComponent.h.
ComboBoxComponent::ComboBoxComponent | ( | TTF_Draw & | ttf_resource | ) |
TrueTypeFontリソース指定のコンストラクタ.
ttf_resource | [i] TrueTypeFontリソース |
Definition at line 11 of file comboBoxComponent.cpp.
References ComponentInterface::h, ComponentInterface::position, and ComponentInterface::w.
bool ComboBoxComponent::draw | ( | unsigned long | ticks, | |
const UserInput & | ui | |||
) | [virtual] |
コンポーネントの描画
コンポーネントを描画する
ticks | [i] 時刻印 [msec]を渡す。ただし、これ以外の情報を渡してもよい | |
ui | [i] ウィンドウへのユーザ入力情報 |
true | 正常 | |
false | 以後の描画は必要ない |
Implements ComponentInterface.
Definition at line 66 of file comboBoxComponent.cpp.
References MenuComponent::activate(), MenuComponent::draw(), LabelComponent::draw(), ButtonComponent::draw(), MenuComponent::getNowIndex(), ComponentInterface::h, MenuComponent::hide(), MenuComponent::isDecided(), ButtonComponent::isPressed(), ComponentInterface::position, setNowIndex(), ComponentInterface::setPosition(), and UserInput::state.
void ComboBoxComponent::add | ( | const Uint16 * | text | ) |
表示項目の追加
text | [i] 表示文字列 |
Definition at line 111 of file comboBoxComponent.cpp.
Referenced by PracticeMenu::Initialize(), and FirstMenu::Initialize().
void ComboBoxComponent::setFontSize | ( | int | size | ) |
フォントサイズ変更
size | [i] フォントサイズ |
Definition at line 137 of file comboBoxComponent.cpp.
Referenced by PracticeMenu::Initialize(), and FirstMenu::Initialize().
void ComboBoxComponent::activate | ( | bool | on | ) |
描画
on | [i] 描画するときに true |
Definition at line 158 of file comboBoxComponent.cpp.
References MenuComponent::activate(), MenuComponent::add(), MultiSurface::addSurface(), TTF_Draw::createText(), MenuComponent::defaultSelection(), SurfaceInterface::h, ComponentInterface::h, MenuComponent::hide(), ButtonComponent::setFocusedSurface(), updateSelected(), SurfaceInterface::w, and ComponentInterface::w.
Referenced by PracticeMenu::Initialize(), and FirstMenu::Initialize().
void ComboBoxComponent::setNowIndex | ( | int | index | ) |
選択項目の強制指定
index | [i] 選択項目番号 |
Definition at line 233 of file comboBoxComponent.cpp.
References MenuComponent::setNowIndex(), and updateSelected().
Referenced by draw(), and FirstMenu::Initialize().
unsigned int ComboBoxComponent::getNowIndex | ( | void | ) |
選択項目の取得
Definition at line 247 of file comboBoxComponent.cpp.
Referenced by PracticeMenu::MainLoop(), and FirstMenu::MainLoop().