Skip to content

Commit 118fc5c

Browse files
committed
remove screenshot accidentally uploaded to repo (#1008)
* remove file from repo * upload to lfs * update with new imgui release
1 parent d344b6b commit 118fc5c

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

examples/guis/imgui_basic.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ def update(self):
5252
# the UI will be used to modify the line
5353
self._line = figure[0, 0]["sine-wave"]
5454

55-
# get the current line RGB values
56-
rgb_color = self._line.colors[:-1]
55+
# get the current line RGBA values
56+
rgba_color = self._line.colors
5757
# make color picker
58-
changed_color, rgb = imgui.color_picker3("color", col=rgb_color)
58+
changed_color, rgba = imgui.color_picker3("color", col=imgui.ImVec4(tuple(rgba_color)))
5959

6060
# get current line color alpha value
6161
alpha = self._line.colors[-1]
@@ -65,6 +65,7 @@ def update(self):
6565
# if RGB or alpha changed
6666
if changed_color | changed_alpha:
6767
# set new color along with alpha
68+
rgb = (rgba[0], rgba[1], rgba[2])
6869
self._line.colors = [*rgb, new_alpha]
6970

7071
# example of a slider, you can also use input_float

examples/image_volume/image_volume_render_modes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ def update(self):
6060
_, self.graphic.substep_size = imgui.slider_float(
6161
"substep_size", v=self.graphic.substep_size, v_max=10.0, v_min=0.1,
6262
)
63-
_, self.graphic.emissive = imgui.color_picker3("emissive color", col=self.graphic.emissive.rgb)
63+
64+
col = imgui.ImVec4((*self.graphic.emissive.rgb, 1))
65+
_, self.graphic.emissive = imgui.color_picker3("emissive color", col=col)
6466

6567
if self.graphic.mode == "slice":
6668
imgui.text("Select plane defined by:\nax + by + cz + d = 0")

examples/screenshots/imgui_top.png

-17.9 KB
Loading

0 commit comments

Comments
 (0)