@hgy29 did you get the imgui improvements before the build?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
If you set the width to -1 it takes the full size (that is to be expected and looks good) that it can fit in, but if you set the width to 0 then it sets it to the size of the text (but doesn't take into account any type of margin or the image in the button. I'm guessing the same applies to height.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
I managed to get it to fit in with my existing table structure really nicely...
if b thenlocal size=48local w=ui:getWindowContentRegionWidth()ifnot s.stackedButtons then
size=20
w=((w+spX)/#b)-spX
end
ui:pushStyleVar(ImGui.StyleVar_ButtonTextAlign,0,0.5)for loop=1,#b doif ui:scaledImageButtonWithText(b[loop,5],b[loop,2],size,size,w,size)then
callButton=loop
endifnot s.stackedButtons then
ui:sameLine()endend
ui:popStyleVar()end
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
local style=ui:getStyle()local spX,spY=style:getItemSpacing()local h2=(h*0.9)local x2=(h-h2)/2
drawList:pushClipRect(x,y,x+w,y+h)
drawList:addRectFilledMultiColor(x,y,x+w,y+h,c2,1,c1,1,c1,1,c2,1)
drawList:addImage(s.icon,spY+x+x2,spY+y+x2,spY+x+x2+h2,spY+y+x2+h2)
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
@SinisterSoft , nice, imGui disguised completely. if it's not that complicated, it would be nice to make a simple example included in gideros that makes such a menu system (extracted from your code).
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
If you export a project to HTML5, then replace the GApp.gidz file with that one, you should be able to test any HTML5 code modifications to your plugin.
(I'm using the test build of Gideros, so I have your latest version submitted to github)
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
If you export a project to HTML5, then replace the GApp.gidz file with that one, you should be able to test any HTML5 code modifications to your plugin.
Im only getting this files. There is no *.gidz file.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
@rrraptor Did you manage to spot what was causing the Lua stack issue?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
cool I am still using 2021.2 will download the new one now DONE thank you rrraptor. I will need to revisit the wiki for a couple of updated imgui widgets that I missed .
@MoKaLux Can you see if there is a stack issue with one of the calls whilst tinkering? Or did you spot it already?
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
SinisterSoft, I am testing most of the widgets so I can also add them as examples in the wiki. I have made a pull request where a couple of callbacks were strange, example:
int DragInt2(lua_State* L) bool result = ImGui::DragInt(label, vec2i, v_speed, v_min, v_max, format, sliderFlag); bool result = ImGui::DragInt2(label, vec2i, v_speed, v_min, v_max, format, sliderFlag);
I am waiting for the commit confirmation before I continue so I know that what I am doing is legit.
hope you are all doing fine I would like to test the changes I make to imgui_bindings.cpp (https://github.com/gideros/gideros/blob/master/plugins/imgui/source/Common/imgui_bindings.cpp) and maybe some other files too(?), the question is how can I compile this? I think I need to recompile the imgui plugin with the changes to create a .dll file? I think I also need either Visual Studio (please no!) or Qt (I prefer Qt but which version)?
hope you are all doing fine I would like to test the changes I make to imgui_bindings.cpp (https://github.com/gideros/gideros/blob/master/plugins/imgui/source/Common/imgui_bindings.cpp) and maybe some other files too(?), the question is how can I compile this? I think I need to recompile the imgui plugin with the changes to create a .dll file? I think I also need either Visual Studio (please no!) or Qt (I prefer Qt but which version)?
It defines if the build is in "beta". That means, that it includes DOCKING stuff, node editor extension, and the plugin name is different (plugin name is used by require function from LUA). You can redefine the name here:
A quick intro to QT
Im using QT creator 4.12.4, but it does not really matter (you can use 5.x version). All you have to do is to install qt and open project file (*.pro).
1 - project tree 2 - dll name 3 - all your source code files 4 - all your header files As you can see I have some extra files included from gideros sources, the path is relative to your projects directory. In my case it is: gideros_installation_folder\All Plugins\Gideros_ImGui You can add extra window tabs (or whatever they called) by using icons:
1 - adds new "window" 2 - closes this "window"
Building
1 - build path 2 - custom steps to automatically copy dll file to gideros "plugins" folder and in my case to project directory aswell (to upload to git). You can add a single step.
1 - path to dll 2 - path to destination folder Once you are done with all the code, press CLTR+B and wait. In lower right corner you can see the progress.
If everything is OK, then you will get a green line If not, check the "issues" tab:
and reading your answer made me smile: Im using QT creator 4.12.4, but it does not really matter (you can use 5.x version). All you have to do is to install qt and open project file (*.pro).
Now I will follow the steps you provided and hopefully build that .dll
Comments
https://deluxepixel.com
in p_open what does p mean? panel?
do you validate this page? https://wiki.gideros.rocks/index.php/ImGui.Core:beginWindow
PLEASE DON'T CHANGE IMGUI TOO MUCH PLEASE
Likes: SinisterSoft
In godot source code it is used all the time Seems good. But why all functions called "ImGui.Core.XXX"?
Likes: MoKaLux
Looks good. I've noticed a couple of things:
If you set the width to -1 it takes the full size (that is to be expected and looks good) that it can fit in, but if you set the width to 0 then it sets it to the size of the text (but doesn't take into account any type of margin or the image in the button. I'm guessing the same applies to height.
https://deluxepixel.com
Likes: MoKaLux
https://deluxepixel.com
drawList:addImage(s.icon,x+x2,y+x2,x+x2+h2,y+x2+h2)
Edit:
This seems to have fixed it:
https://deluxepixel.com
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Likes: keszegh, MoKaLux
https://deluxepixel.com
deletedImGui is getting toughI don't understand checkboxFlags
Sometimes when I call imgui:render() I get an error:
bad argument #3 to '?' (number expected, got string)
This doesn't happen on the Windows player.
What happens just before though is interesting, maybe it happens on Windows too, but not enough to crash it?
This is the test app: https://web.reportcomplete.com/
Here is a link to the unencrypted GApp so you can try it out:
https://web.reportcomplete.com/ReportComplete.GApp.gidz
If you export a project to HTML5, then replace the GApp.gidz file with that one, you should be able to test any HTML5 code modifications to your plugin.
(I'm using the test build of Gideros, so I have your latest version submitted to github)
https://deluxepixel.com
https://github.com/gideros/gideros/blob/5d5a4ac04c83b0c61441b9d8d6c357407a41a355/plugins/imgui/source/Common/imgui_bindings.cpp#L1750
Must be something else...
Probably something wrong with LUA stack? @hgy29 do I need to make sure that the stack is empty when any function is called?
Im only getting this files. There is no *.gidz file.
And the code for that:
https://github.com/MultiPain/Gideros_examples/blob/639321e56cf7039ef3a31547261f3ee0138316d0/ImGuiTablesDemo/assets/TablesDemo.lua#L371
Likes: MoKaLux
https://deluxepixel.com
filledSliderFloat and filledSliderFloat3 work fine.
https://github.com/gideros/gideros/blob/7aba140cb3ccfc92c8df451f4e3a48c585556af5/plugins/imgui/source/Common/imgui_bindings.cpp#L3462
EDIT: also:
float v_min = luaL_checknumber(L, 6, 0);
float v_max = luaL_checknumber(L, 7, 0);
https://github.com/gideros/gideros/blob/7aba140cb3ccfc92c8df451f4e3a48c585556af5/plugins/imgui/source/Common/imgui_bindings.cpp#L3467
Likes: MoKaLux
https://deluxepixel.com
https://github.com/gideros/gideros/pull/508hopefully I didn't mess things upEDIT: I put 0 instead of 0.0f at some placespatch-2I messed up, starting again
https://github.com/gideros/gideros/pull/509/commits/16fe99198125dedfae6ff94b4de830814ba185d9
Can I also change this for consistency?
Color button seems to be broken but I don't know how to handle this oneFIXED IN GIDEROS 2021.3The color button is supposed to return true only when pressed but right now it always returns true. A sample code:Dear ImGui is AMAZING
Likes: MoKaLux
I am still using 2021.2 will download the new one nowDONE thank you rrraptor.I will need to revisit the wiki for a couple of updated imgui widgets that I missed .
Very impressive job rrraptor
Dear ImGui rocks
https://deluxepixel.com
int DragInt2(lua_State* L)
bool result = ImGui::DragInt(label, vec2i, v_speed, v_min, v_max, format, sliderFlag);bool result = ImGui::DragInt2(label, vec2i, v_speed, v_min, v_max, format, sliderFlag);
I am waiting for the commit confirmation before I continue so I know that what I am doing is legit.
Likes: SinisterSoft
I would like to test the changes I make to imgui_bindings.cpp (https://github.com/gideros/gideros/blob/master/plugins/imgui/source/Common/imgui_bindings.cpp)
and maybe some other files too(?), the question is how can I compile this?
I think I need to recompile the imgui plugin with the changes to create a .dll file? I think I also need either Visual Studio (please no!) or Qt (I prefer Qt but which version)?
Can somebody tell me the steps please?PS: there is this thread https://forum.gideros.rocks/discussion/comment/61324/#Comment_61324 will try
Plugin code
There is a macro:It defines if the build is in "beta". That means, that it includes DOCKING stuff, node editor extension, and the plugin name is different (plugin name is used by require function from LUA).
You can redefine the name here:
A quick intro to QT
Im using QT creator 4.12.4, but it does not really matter (you can use 5.x version). All you have to do is to install qt and open project file (*.pro).1 - project tree
2 - dll name
3 - all your source code files
4 - all your header files
As you can see I have some extra files included from gideros sources, the path is relative to your projects directory. In my case it is: gideros_installation_folder\All Plugins\Gideros_ImGui
You can add extra window tabs (or whatever they called) by using icons:
1 - adds new "window"
2 - closes this "window"
Building
1 - build path
2 - custom steps to automatically copy dll file to gideros "plugins" folder and in my case to project directory aswell (to upload to git). You can add a single step.
1 - path to dll
2 - path to destination folder
Once you are done with all the code, press CLTR+B and wait. In lower right corner you can see the progress.
If everything is OK, then you will get a green line
If not, check the "issues" tab:
Likes: MoKaLux
There should be an option like this one:
Likes: MoKaLux
and reading your answer made me smile:
Im using QT creator 4.12.4, but it does not really matter (you can use 5.x version). All you have to do is to install qt and open project file (*.pro).
Now I will follow the steps you provided and hopefully build that .dll