step 5: complete first gauge catalogue
This commit is contained in:
29
examples/basic_multi_value.py
Normal file
29
examples/basic_multi_value.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# pyright: reportGeneralTypeIssues=false
|
||||
|
||||
import dearpygui.dearpygui as dpg
|
||||
|
||||
import dpg_gauges as dpgg
|
||||
|
||||
|
||||
def main() -> None:
|
||||
dpg.create_context()
|
||||
try:
|
||||
with dpg.window(label="Multi Value Gauge", width=340, height=220):
|
||||
dpgg.multi_value_gauge(
|
||||
tag="engine",
|
||||
label="Engine",
|
||||
values={"AFR": 12.8, "Oil": "58 psi", "Fuel": "43 psi"},
|
||||
width=280,
|
||||
height=150,
|
||||
)
|
||||
|
||||
dpg.create_viewport(title="dpg-gauges multi-value", width=380, height=260)
|
||||
dpg.setup_dearpygui()
|
||||
dpg.show_viewport()
|
||||
dpg.start_dearpygui()
|
||||
finally:
|
||||
dpg.destroy_context()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user