vvvv / VL.StandardLibs

A collection of standard libraries for vvvv including VL.Stride, VL.Skia, VL.ImGui, msgpack.org[VL]
https://visualprogramming.net
GNU Lesser General Public License v3.0
40 stars 15 forks source link

Open/Close (Display/Discard) a Window #10

Closed antongit closed 1 year ago

antongit commented 1 year ago

To actually create a window on the screen (to display it), we just enable an If region with the Window inside. The Window has IsVisible output pin that turns false when the Close button on the titlebar is clicked.

Here how ImGui defines it: https://github.com/ocornut/imgui/blob/5bb287494096461f90eb5d18135f7c4809efd2f5/imgui.h#L318

To Open / Close (display / discard) a window the patch looks like that: image

HowTo Open And Close a Window.zip

Is it ok like that? @azeno , @gregsn What do think?

azeno commented 1 year ago

Hmm not sure, it doesn't feel intuitive yet. The naming is hard to grasp.

I've opened a branch with the two changes suggested above https://github.com/vvvv/VL.ImGui/tree/feature/window-with-closing-input

antongit commented 1 year ago

After checking the Issue with @azeno we came to conclusion:

Open-Visible-Close-Issue.zip

antongit commented 1 year ago

Current state of the Pins:

Window

CollapsingHeader, TreeNode

Popup

Popup (Modal)

TabItem

antongit commented 1 year ago

After the call with @azeno and @gregsn it looks like, that we've finally got it with the pin names:

image

Additional unrelated issue:

antongit commented 1 year ago

ImGui-Visible-Collapsed-Closing-Test.zip