MenuItem()#
MenuItem(tag, label, short_cut, [select, enable])#
メニューの項目を設定します。
パラメータ#
string tag
string label
タグとラベルを指定します。
string short_cut
ショートカットをあらわす文字列を指定します。ショートカットがない場合は、""を記述します。
bool select
省略可能
Select状態を設定します。通常はFalse。
bool enable
省略可能
Enable状態を設定します。通常はTrue。
戻り値#
bool
アイテムが選択された場合、Trueを返します。
コメント#
サンプル#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | vrmapi.ImGui().Begin("w1","Sample", tr_win, vrmapi.ImGuiWindowFlags.MenuBar) if vrmapi.ImGui().BeginMenuBar() : if vrmapi.ImGui().BeginMenu("me1","MENU") : if vrmapi.ImGui().MenuItem("mi1","ROT-0","") : tr_rot[0] = 0.0 if vrmapi.ImGui().MenuItem("mi2","ROT-90","") : tr_rot[0] = 90.0 if vrmapi.ImGui().MenuItem("mi3","ROT-180","") : tr_rot[0] = 180.0 vrmapi.ImGui().EndMenu() vrmapi.ImGui().EndMenuBar() |