step 4: add digital bar level and status gauges

This commit is contained in:
2026-07-02 14:35:13 +02:00
parent 41e44a23bc
commit d638c512e9
11 changed files with 516 additions and 21 deletions

30
examples/basic_level.py Normal file
View File

@@ -0,0 +1,30 @@
# pyright: reportGeneralTypeIssues=false
import dearpygui.dearpygui as dpg
import dpg_gauges as dpgg
def main() -> None:
dpg.create_context()
try:
with dpg.window(label="Level Gauge", width=260, height=320):
dpgg.level_gauge(
tag="fuel",
label="Fuel",
value=68,
unit="%",
width=180,
height=240,
)
dpg.create_viewport(title="dpg-gauges level", width=300, height=360)
dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
finally:
dpg.destroy_context()
if __name__ == "__main__":
main()