34 lines
774 B
Python
34 lines
774 B
Python
# pyright: reportGeneralTypeIssues=false
|
|
|
|
import dearpygui.dearpygui as dpg
|
|
|
|
import dpg_gauges as dpgg
|
|
|
|
|
|
def main() -> None:
|
|
dpg.create_context()
|
|
try:
|
|
with dpg.window(label="Bar Gauge", width=360, height=180):
|
|
dpgg.bar_gauge(
|
|
tag="boost",
|
|
label="Boost",
|
|
value=18.5,
|
|
min_value=0,
|
|
max_value=30,
|
|
unit="psi",
|
|
precision=1,
|
|
width=300,
|
|
height=100,
|
|
)
|
|
|
|
dpg.create_viewport(title="dpg-gauges bar", width=400, height=220)
|
|
dpg.setup_dearpygui()
|
|
dpg.show_viewport()
|
|
dpg.start_dearpygui()
|
|
finally:
|
|
dpg.destroy_context()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|