Closed FriskTheFallenHuman closed 1 year ago
Hi, you're supposed to run/call your file dialog function outside of the if statements of your menu. A good way to do this is to set a flag to true when the MenuItem is clicked, then use that flag whether to draw the file dialog or not after the BeginContextMenuWindow scope.
Think of Immediate Mode UIs as happening per frame, if you click the menu item, the file dialog will be drawn, but on the next frame, since you are not clicking on the menu item, the line (inside the conditionals) will not be called and thus no file dialog draw.
I'm having an issue with
Slab.FileDialog
the dialog displays but it instantly closes itself I followed both wiki and SlabTest.lua but both ways trigger this issue here's a video click of the problem in action:https://user-images.githubusercontent.com/12750944/198930711-a07c00b2-914c-4225-acb4-edd0786e15d1.mp4
here's what the code looks like: