step 5: complete first gauge catalogue

This commit is contained in:
2026-07-02 14:47:05 +02:00
parent d638c512e9
commit 1a476bc91d
11 changed files with 594 additions and 16 deletions

View File

@@ -0,0 +1,32 @@
# pyright: reportGeneralTypeIssues=false
import dearpygui.dearpygui as dpg
import dpg_gauges as dpgg
def main() -> None:
dpg.create_context()
try:
with dpg.window(label="Segmented Gauge", width=360, height=160):
dpgg.segmented_gauge(
tag="shift",
label="Shift lights",
value=7200,
min_value=0,
max_value=8000,
segments=12,
width=300,
height=90,
)
dpg.create_viewport(title="dpg-gauges segmented", width=400, height=200)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
finally:
dpg.destroy_context()
if __name__ == "__main__":
main()