OpenGL de プログラミング - NVIDIA_SDK_06::Part2
現在地メニュー >> NVIDIA_SDK >> NVIDIA_SDK_06 >> NVIDIA_SDK_06::Part2

スライダ


スライダは「doHorizontalSliderメソッド」を使う。
bool doHorizontalSlider(const Rect & rect, float min, float max, float * value, int style = 0);
【rect】
スライダのサイズ。

【min,max】
スライダの最小値、最大値

【value】
スライダの現在値を格納する

【style】
描画スタイル

※スライダの状態が変化すると「true」が返ってくる。

【例】
float sliderLevel;
... ...
g_ui.beginGroup(nv::GroupFlags_GrowRightFromBottom);
g_ui.doHorizontalSlider(nv::Rect(),0.f,1.f,&sliderLevel,1);
g_ui.endGroup();
... ...

サンプルコード