Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
487 changes: 307 additions & 180 deletions .appveyor.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![completion](https://img.shields.io/badge/completion-81%25%20%28373%20of%20458%29-blue.svg)](https://github.com/swistakm/pyimgui)
[![completion](https://img.shields.io/badge/completion-70%25%20%28517%20of%20734%29-blue.svg)](https://github.com/swistakm/pyimgui)
[![Coverage Status](https://coveralls.io/repos/github/swistakm/pyimgui/badge.svg?branch=master)](https://coveralls.io/github/swistakm/pyimgui?branch=master)
[![Documentation Status](https://readthedocs.org/projects/pyimgui/badge/?version=latest)](https://pyimgui.readthedocs.io/en/latest/?badge=latest)

Expand Down
14 changes: 11 additions & 3 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,20 @@
from _pytest.outcomes import Skipped
from sphinx.application import Sphinx

import imgui

PROJECT_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
sphinx = None

if 'FROM_APPVEYOR' in os.environ:
# We need to trick the import mechanism in order to load the
# builded wheel instead of the local src directory
init_file_path = os.path.join(PROJECT_ROOT_DIR, 'imgui','__init__.py')
init_file_path_tmp = os.path.join(PROJECT_ROOT_DIR, 'imgui','__init__TMP.py')
os.rename(init_file_path, init_file_path_tmp)
import imgui
os.rename(init_file_path_tmp, init_file_path)
else:
import imgui


def project_path(*paths):
return os.path.join(PROJECT_ROOT_DIR, *paths)
Expand All @@ -25,7 +34,6 @@ def _ns(locals_, globals_):
ns.update(globals_)
return ns


class SphinxDoc(pytest.File):
def __init__(self, path, parent):
# yuck!
Expand Down
48 changes: 27 additions & 21 deletions doc/examples/integrations_glfw3.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,48 @@ def main():
imgui.create_context()
window = impl_glfw_init()
impl = GlfwRenderer(window)

io = imgui.get_io()
io.config_flags |= imgui.CONFIG_VIEWPORTS_ENABLE | imgui.CONFIG_DOCKING_ENABLE
show_custom_window = True

while not glfw.window_should_close(window):
glfw.poll_events()
impl.process_inputs()

imgui.new_frame()

if imgui.begin_main_menu_bar():
if imgui.begin_menu("File", True):

clicked_quit, selected_quit = imgui.menu_item(
"Quit", 'Cmd+Q', False, True
)

if clicked_quit:
exit(1)

imgui.end_menu()
imgui.end_main_menu_bar()


viewport = imgui.get_main_viewport()
imgui.set_next_window_position(viewport.pos.x, viewport.pos.y)
imgui.set_next_window_size(viewport.size[0], viewport.size[1])
imgui.set_next_window_viewport(viewport.id)
imgui.set_next_window_bg_alpha(0.0)
window_flags = imgui.WINDOW_MENU_BAR|imgui.WINDOW_NO_DOCKING
window_flags |= imgui.WINDOW_NO_TITLE_BAR|imgui.WINDOW_NO_COLLAPSE|imgui.WINDOW_NO_RESIZE
window_flags |= imgui.WINDOW_NO_MOVE|imgui.WINDOW_NO_BRING_TO_FRONT_ON_FOCUS|imgui.WINDOW_NO_NAV_FOCUS

imgui.push_style_var(imgui.STYLE_WINDOW_ROUNDING, 0.0)
imgui.push_style_var(imgui.STYLE_WINDOW_BORDERSIZE, 0.0)
imgui.push_style_var(imgui.STYLE_WINDOW_PADDING,(0.0,0.0))
imgui.begin("Dockspace Demo", 0, window_flags)
imgui.pop_style_var()
imgui.pop_style_var()
imgui.pop_style_var()

flags = imgui.DOCK_NODE_PASS_THRU_CENTRAL_NODE
id = imgui.get_id('MyDockspace')
imgui.dockspace(id, flags=flags)
if show_custom_window:
is_expand, show_custom_window = imgui.begin("Custom window", True)
is_expand, show_custom_window = imgui.begin("Custom window", True, )
if is_expand:
imgui.text("Bar")
imgui.text_ansi("B\033[31marA\033[mnsi ")
imgui.text_ansi_colored("Eg\033[31mgAn\033[msi ", 0.2, 1., 0.)
imgui.extra.text_ansi_colored("Eggs", 0.2, 1., 0.)
imgui.end()

show_test_window()
#imgui.show_test_window()

gl.glClearColor(1., 1., 1., 1)
# show_test_window()
imgui.show_test_window()
imgui.end()
gl.glClearColor(.1, .1, .1, 1)
gl.glClear(gl.GL_COLOR_BUFFER_BIT)

imgui.render()
Expand Down
2 changes: 1 addition & 1 deletion imgui-cpp
Submodule imgui-cpp updated 106 files
Loading