コンテンツにスキップ

BeginMenu()#

BeginMenu(tag, label, [enable])#

メニューの表示を開始します。 EndMenu()と組み合わせて使用します。必ず、一組になるようにしてください。

パラメータ#

string tag

string label

タグとラベルを指定します。

bool enable

省略可能

Enable状態を設定します。通常はTrue。

戻り値#

bool

メニューが開いている状態を返します。

コメント#

EndMenu()は、開いたときのメニュー内容の終端になります。

サンプル#

 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()