From 07bb891b7d518f5bcd6c76a86d552eea8059a4bf Mon Sep 17 00:00:00 2001 From: sara Date: Sat, 4 Dec 2021 21:33:08 +0100 Subject: GUI angepasst --- src/gui/test.py | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/gui/test.py (limited to 'src/gui/test.py') 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() -- cgit v1.2.1