26 lines
614 B
Python
26 lines
614 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="Analog Gauge", width=320, height=320):
|
|
dpgg.analog_gauge(
|
|
tag="rpm", label="RPM", value=3250, max_value=8000, width=240, height=240
|
|
)
|
|
|
|
dpg.create_viewport(title="dpg-gauges analog", width=360, height=360)
|
|
dpg.setup_dearpygui()
|
|
dpg.show_viewport()
|
|
dpg.start_dearpygui()
|
|
finally:
|
|
dpg.destroy_context()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|