packages/pyglGA/scripts/basicCubeGUI.py
def displayGUI():
    """
        displays the ImGUI window to control the background color and the 'wireframe' rendering of the cube
    """
    
    global wireFrame
    global color1
    global state
    global f
    # imgui.new_frame()
    ImGui.set_next_window_size(400.0, 160.0)
    #imgui.set_next_window_position(10., 0.)
    ImGui.begin("BasicCube GUI", True)

    # Shows Simple text
    ImGui.text("Hello, CG world!")

    # Goes to a new line
    ImGui.new_line()

    # Creates a simple slider
    changed, f = ImGui.slider_float("float", f, 0.0, 1.0)
    ImGui.separator()

    # Manipulates colors
    changed, color1 = ImGui.color_edit3("clear color", *color1)
    ImGui.separator()

    # Creates a checkbox
    changed, checkbox = ImGui.checkbox("Wireframe", state)
    if changed:
        if checkbox is False:
            wireFrame = False
            state = False
        if checkbox is True:
            wireFrame = True
            state = True
    
    #strFrameRate = str(("Application average" , 1000.0/float(ImGui.get_io().framerate), "ms/frame (", str(ImGui.get_io().framerate)," FPS)"))
    strFrameRate = str(("Application average: ", ImGui.get_io().framerate, " FPS"))
    ImGui.text(strFrameRate)

    ImGui.end()

        displays the ImGUI window to control the background color and the 'wireframe' rendering of the cube
    
displays the ImGUI window to control the background color and the 'wireframe' rendering of the cube
displays the ImGUI window to control the background color and the ' wireframe ' rendering of the cube
def displayGUI():
    global wireFrame
    global color1
    global state
    global f
    ImGui.set_next_window_size(400.0, 160.0)
    ImGui.begin("BasicCube GUI", True)
    ImGui.text("Hello, CG world!")
    ImGui.new_line()
    changed, f = ImGui.slider_float("float", f, 0.0, 1.0)
    ImGui.separator()
    changed, color1 = ImGui.color_edit3("clear color", *color1)
    ImGui.separator()
    changed, checkbox = ImGui.checkbox("Wireframe", state)
    if changed:
        if checkbox is False:
            wireFrame = False
            state = False
        if checkbox is True:
            wireFrame = True
            state = True
    strFrameRate = str(("Application average: ", ImGui.get_io().framerate, " FPS"))
    ImGui.text(strFrameRate)
    ImGui.end()
def displayGUI ( ) : global wireFrame global color1 global state global f ImGui . set_next_window_size ( 400.0 , 160.0 ) ImGui . begin ( "BasicCube GUI" , True ) ImGui . text ( "Hello, CG world!" ) ImGui . new_line ( ) changed , f = ImGui . slider_float ( "float" , f , 0.0 , 1.0 ) ImGui . separator ( ) changed , color1 = ImGui . color_edit3 ( "clear color" , * color1 ) ImGui . separator ( ) changed , checkbox = ImGui . checkbox ( "Wireframe" , state ) if changed : if checkbox is False : wireFrame = False state = False if checkbox is True : wireFrame = True state = True strFrameRate = str ( ( "Application average: " , ImGui . get_io ( ) . framerate , " FPS" ) ) ImGui . text ( strFrameRate ) ImGui . end ( )
displays the ImGUI window to control the background color and the 'wireframe' rendering of the cube
displays the ImGUI window to control the background color and the ' wireframe ' rendering of the cube
"""
        displays the ImGUI window to control the background color and the 'wireframe' rendering of the cube
    """ # imgui.new_frame() #imgui.set_next_window_position(10., 0.) # Shows Simple text # Goes to a new line # Creates a simple slider # Manipulates colors # Creates a checkbox #strFrameRate = str(("Application average" , 1000.0/float(ImGui.get_io().framerate), "ms/frame (", str(ImGui.get_io().framerate)," FPS)"))