it would be great if when moving and positioning windows it could be forced to snap to some grid (e.g. with cell size 5x5 pixels). i did not find anything on the net about such functionality though.
it would be great if when moving and positioning windows it could be forced to snap to some grid (e.g. with cell size 5x5 pixels). i did not find anything on the net about such functionality though.
thanks, i thought of such a solution, good to see how to use isMouseDragging etc in practice. ideally it would be even better if even during dragging it would snap the window to closest grid point.
i tried to add some drag and drop functionality but imgui:isItemHovered(ImGui.HoveredFlags_AllowWhenBlockedByActiveItem) does not seem to work. (the purpose would be to know if a button is hovered while dragging another)
i tried to add some drag and drop functionality but imgui:isItemHovered(ImGui.HoveredFlags_AllowWhenBlockedByActiveItem) does not seem to work. (the purpose would be to know if a button is hovered while dragging another)
this gives me a headache.
I'll check it right now
Also
Added new function: setNextWindowSizeConstraints(minW, minH, maxW, maxH) It affects beginWindow().
i tried to add some drag and drop functionality but imgui:isItemHovered(ImGui.HoveredFlags_AllowWhenBlockedByActiveItem) does not seem to work. (the purpose would be to know if a button is hovered while dragging another)
thanks. i just changed from imgui.dll to imgui_beta.dll and the same code which worked now crashes. do you have any guess what has changed that can cause this? (no error message naturally)
thanks. i just changed from imgui.dll to imgui_beta.dll and the same code which worked now crashes. do you have any guess what has changed that can cause this? (no error message naturally)
Maybe because of beginWindow() ? Can you post how you use it? If not then you have to find out it by yourself and then let me know.
I dont know how to properly name new image function with background color
is this good? imgui:beginWindow("Project###Project List Classic", ImGui.WindowFlags_NoResize | ImGui.WindowFlags_NoSavedSettings ) or this? imgui:beginWindow("Project###Project List Classic", nil, ImGui.WindowFlags_NoResize| ImGui.WindowFlags_NoSavedSettings )
latter works, thanks for pointing in the right direction.
thanks, your example code for snapping window position+size works except that when you grab a window first then the window jumps to the mouse position.
also, can you check your code for those two flags mentioned earlier for sliders (logarithmic and clamping), perhaps there is also some issue there. thanks
after one week of working on the imgui menu of my app you can check my progress in the attached video.. i'm quite satisfied with imgui so far, it can do 90% of what i want, the rest @rrraptor added to me or i can slightly change my plans when they get too exotic. also it can be made quite nice (and custom) with the styling options. videos: gui demo video 1 gui demo video 2
(some of the image buttons need to be redrawn, they are juts temporary)
local c =0for x =0,1,0.5dofor y =0,1,0.5do
imgui:pushStyleVar(ImGui.StyleVar_ButtonTextAlign, x, y)
imgui:button(("[%.1f, %.1f]"):format(x,y), 200, 100)
imgui:popStyleVar()
c +=1if c <3then
imgui:sameLine()else
c =0endendend
after one week of working on the imgui menu of my app you can check my progress in the attached video.. i'm quite satisfied with imgui so far, it can do 90% of what i want, the rest @rrraptor added to me or i can slightly change my plans when they get too exotic. also it can be made quite nice (and custom) with the styling options. videos: gui demo video 1 gui demo video 2
(some of the image buttons need to be redrawn, they are juts temporary)
It would be better with docking, right? There is a docking branch, so I can use it instead.
local c =0for x =0,1,0.5dofor y =0,1,0.5do
imgui:pushStyleVar(ImGui.StyleVar_ButtonTextAlign, x, y)
imgui:button(("[%.1f, %.1f]"):format(x,y), 200, 100)
imgui:popStyleVar()
c +=1if c <3then
imgui:sameLine()else
c =0endendend
thanks, very good examples, this topic will be a good quickstart later too for anybody who wants to use imgui (perhaps these snippets could be collected on the wiki).
actually i did the same but used popStyleVar(ImGui.StyleVar_ButtonTextAlign) instead of popStyleVar() as that seemed logical, but it was not correct, as it turns out.
EDIT: So instead I suggest (keszegh) to create the wiki page a bit differently. We will do it by adding all various ImGui elements as examples (like pils) with an image to show the result. This will still look professional imho.
SliderFlags_ClampOnInput: works for int and float. SliderFlags_Logarithmic: works only with float sliders. SliderFlags_NoRoundToFormat: idk how to us it SliderFlags_NoInput: also works for both.
SliderFlags_ClampOnInput: works for int and float. SliderFlags_Logarithmic: works only with float sliders. SliderFlags_NoRoundToFormat: idk how to us it SliderFlags_NoInput: also works for both.
well, i wanted to use logarithmic on an int slider. that won't work then, i can live with that - or i can emulate a log int slider with a float slider i guess somehow by manually rounding.
also i wanted to use clamponinput on an int slider and an int filled slider. will these work? for me it seemed they don't.
Comments
Likes: MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: MoKaLux, SinisterSoft
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Also
Added new function: setNextWindowSizeConstraints(minW, minH, maxW, maxH)
It affects beginWindow().
Example from gif:
Likes: SinisterSoft, MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
I dont know how to properly name new image function with background color
Likes: keszegh, MoKaLux
imgui:beginWindow("Project###Project List Classic", ImGui.WindowFlags_NoResize | ImGui.WindowFlags_NoSavedSettings )
or this?
imgui:beginWindow("Project###Project List Classic", nil, ImGui.WindowFlags_NoResize| ImGui.WindowFlags_NoSavedSettings )
latter works, thanks for pointing in the right direction.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
imgui:beginWindow("Project###Project List Classic", nil, ImGui.WindowFlags_NoResize| ImGui.WindowFlags_NoSavedSettings )
also, can you check your code for those two flags mentioned earlier for sliders (logarithmic and clamping), perhaps there is also some issue there. thanks
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
also it can be made quite nice (and custom) with the styling options.
videos:
gui demo video 1
gui demo video 2
(some of the image buttons need to be redrawn, they are juts temporary)
Likes: rrraptor, SinisterSoft, MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
StyleVar_ButtonTextAlign ?ty
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: keszegh
P.S. Added new
Fragmenter - animated loop machine and IKONOMIKON - the memory game
actually i did the same but used popStyleVar(ImGui.StyleVar_ButtonTextAlign) instead of popStyleVar() as that seemed logical, but it was not correct, as it turns out.
Likes: MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Added docking support. See new branch, dll name is different, so you can use both versions if you want.
https://github.com/MultiPain/Gideros_ImGui/tree/docking
ImGuiID is unsigned integer.
New constants:
I will start the wiki when I am more experienced with it.
Likes: keszegh
How do I make a full screen window?
The window should be fixed and cover all the screen.
ps: I am using the gideros plugin (not the beta nor beta_docking)
Thank you.
It is very impressive so far and I have only scratched the surface. Should start the wiki soon God's willing.
Also, you can use all 3 versions in parallel (but beta versions only works for windows) All you need is to change argument in “require” function .
Likes: MoKaLux
I have tried all three versions of the plugin but I decided to stick with the official so the wiki matches gideros.
Now for ImGui wiki, is it possible to do it like we did for the other classes/plugins? I don't think so, it is too big of a task. What do you think?
https://wiki.giderosmobile.com/index.php/Dear_ImGui
EDIT: So instead I suggest (keszegh) to create the wiki page a bit differently. We will do it by adding all various ImGui elements as examples (like pils) with an image to show the result. This will still look professional imho.
even original imgui is not documented in a wiki style, just inline, see
https://github.com/ocornut/imgui/blob/master/imgui.h
and
https://github.com/pthom/imgui_manual
together with
https://github.com/MultiPain/Gideros_ImGui/blob/master/README.md
these links should be enough to start working on ImGui as the original and the lua syntax is very similar (on purpose).
also some of the code examples from this topic could be added.
Likes: MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
SliderFlags_ClampOnInput: works for int and float.
SliderFlags_Logarithmic: works only with float sliders.
SliderFlags_NoRoundToFormat: idk how to us it
SliderFlags_NoInput: also works for both.
also i wanted to use clamponinput on an int slider and an int filled slider. will these work? for me it seemed they don't.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: keszegh
Likes: antix
Fragmenter - animated loop machine and IKONOMIKON - the memory game