diff options
Diffstat (limited to '')
-rw-r--r-- | src/gui/test.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/gui/test.py b/src/gui/test.py new file mode 100644 index 0000000..7ba928b --- /dev/null +++ b/src/gui/test.py @@ -0,0 +1,35 @@ +import dearpygui.dearpygui as dpg + +dpg.create_context() + +with dpg.window(label="Tutorial", pos=(20, 50), width=275, height=225) as win1: + t1 = dpg.add_input_text(default_value="some text") + t2 = dpg.add_input_text(default_value="some text") + with dpg.child_window(height=100): + t3 = dpg.add_input_text(default_value="some text") + dpg.add_input_int() + dpg.add_input_text(default_value="some text") + +with dpg.window(label="Tutorial", pos=(320, 50), width=275, height=225) as win2: + dpg.add_input_text(default_value="some text") + dpg.add_input_int() + +with dpg.theme() as container_theme: + + with dpg.theme_component(dpg.mvAll): + dpg.add_theme_color(dpg.mvThemeCol_FrameBg, (150, 100, 100), category=dpg.mvThemeCat_Core) + dpg.add_theme_style(dpg.mvStyleVar_FrameRounding, 5, category=dpg.mvThemeCat_Core) + + with dpg.theme_component(dpg.mvInputInt): + dpg.add_theme_color(dpg.mvThemeCol_FrameBg, (100, 150, 100), category=dpg.mvThemeCat_Core) + dpg.add_theme_style(dpg.mvStyleVar_FrameRounding, 5, category=dpg.mvThemeCat_Core) + +dpg.bind_item_theme(win1, container_theme) + +dpg.show_style_editor() + +dpg.create_viewport(title='Custom Title', width=800, height=600) +dpg.setup_dearpygui() +dpg.show_viewport() +dpg.start_dearpygui() +dpg.destroy_context() |