step 5: complete first gauge catalogue
This commit is contained in:
23
examples/basic_compass.py
Normal file
23
examples/basic_compass.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# pyright: reportGeneralTypeIssues=false
|
||||
|
||||
import dearpygui.dearpygui as dpg
|
||||
|
||||
import dpg_gauges as dpgg
|
||||
|
||||
|
||||
def main() -> None:
|
||||
dpg.create_context()
|
||||
try:
|
||||
with dpg.window(label="Compass Gauge", width=320, height=320):
|
||||
dpgg.compass_gauge(tag="heading", label="Heading", value=275, width=240, height=240)
|
||||
|
||||
dpg.create_viewport(title="dpg-gauges compass", width=360, height=360)
|
||||
dpg.setup_dearpygui()
|
||||
dpg.show_viewport()
|
||||
dpg.start_dearpygui()
|
||||
finally:
|
||||
dpg.destroy_context()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user