最終更新: mikk_ni3_92 2009年11月22日(日) 13:53:36履歴
現在地:メニュー >> NVIDIA_SDK >> NVIDIA_SDK_06 >> NVIDIA_SDK_06::Part3
コンボボックス、リストボックスは「doListBoxメソッド」「doComboBoxメソッド」を使う
コンボボックス、リストボックスのサイズ。
【numOptions】
選択項目の数
【options】
選択項目の文字列
【selected】
選択項目の値を格納する
【style】
描画スタイル
※コンボボックス、リストボックスに変化があると、「true」が返り値としてくる。
【例】
コンボボックス、リストボックスは「doListBoxメソッド」「doComboBoxメソッド」を使う
bool doListBox(const Rect & rect, int numOptions, const char * options[], int * selected, int style = 0); bool doComboBox(const Rect & rect, int numOptions, const char * options[], int * selected, int style = 0);【rect】
コンボボックス、リストボックスのサイズ。
【numOptions】
選択項目の数
【options】
選択項目の文字列
【selected】
選択項目の値を格納する
【style】
描画スタイル
※コンボボックス、リストボックスに変化があると、「true」が返り値としてくる。
【例】
const char *comboStr[]={"red","green","blue"}; const char *liststr[]={"teapot","cube","sphere"}; int comboMethod; int listMethod; ... ... g_ui.begin(); { //コンボボックス g_ui.beginGroup(nv::GroupFlags_GrowDownFromRight); { g_ui.doComboBox(nv::Rect(),3,comboStr,&comboMethod,1); } g_ui.endGroup(); //リストボックス g_ui.beginGroup(nv::GroupFlags_GrowDownFromLeft); { g_ui.doListBox(nv::Rect(),3,liststr,&listMethod,1); } g_ui.endGroup(); } g_ui.end(); ... ...