Closed maxmbed closed 4 months ago
Hello, some comments and answer:
for i, static in enumerate(static_list):
# Note: "static" below emulates C/C++ static variables.
# In a production program, it would be better to pass an instance of a state class
for i, static in enumerate(static_list):
# You are using a different id for each color, which is good
# Note: this could be rewritten as:
# name = f"MyColor##{i}"
name = "MyColor##{}".format(i)
# As with all imgui widget, imgui.color_edit3 returns two values:
# (modified, new_value)
# Here, you store the result of both widgets in the same static.color3 variable
# ==> By construction this variable can only store one value
_, static.color3 = imgui.color_edit3(name, static.color3, misc_flags)
Hi,
When using multiple Color Edit 3 widget, it displays good in window but editing any color will apply the change to all other color editors at the same time. While I wanted to have independent color editors instead.
I am new to imgui_bundle so pretty sure I am missing some basic principle here. Below is the used code. Vastly copied from
imgui_hello_world.py
with few adaptations.How one can have multiple self independent Color Editor 3 using imgui_bundle ?