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
-- in init function:
IO:addConfigFlags(ImGui.ConfigFlags_NavEnableKeyboard)-- in enterFrame fill NavInput table like this (see enums):if(UI:isKeyPressed(KeyCode.ENTER))then IO:setNavInput(ImGui.NavInput_Activate, 1)end
UI:newFrame(e)if(UI:isKeyPressed(KeyCode.LEFT))then IO:setNavInput(ImGui.NavInput_DpadLeft, 1)endif(UI:isKeyPressed(KeyCode.RIGHT))then IO:setNavInput(ImGui.NavInput_DpadRight, 1)endif(UI:isKeyPressed(KeyCode.UP))then IO:setNavInput(ImGui.NavInput_DpadUp, 1)endif(UI:isKeyPressed(KeyCode.DOWN))then IO:setNavInput(ImGui.NavInput_DpadDown, 1)end
@rraptor, I have trouble compiling imgui for win32 now, it complains about duplicate symbols:
Build/Common/imgui_user.o:imgui_user.cpp:(.text+0x28c0): multiple definition of `ImGui::TextEx(char const*, char const*, int)'
Build/Common/imgui_src/imgui_widgets.o:imgui_widgets.cpp:(.text+0x28c0): first defined here
Build/Common/imgui_user.o:imgui_user.cpp:(.text+0x2da0): multiple definition of `ImGui::TextUnformatted(char const*, char const*)'
Build/Common/imgui_src/imgui_widgets.o:imgui_widgets.cpp:(.text+0x2da0): first defined here
Build/Common/imgui_user.o:imgui_user.cpp:(.text+0x2dd0): multiple definition of `ImGui::TextV(char const*, char*)'
Build/Common/imgui_src/imgui_widgets.o:imgui_widgets.cpp:(.text+0x2dd0): first defined here
Build/Common/imgui_user.o:imgui_user.cpp:(.text+0x2e40): multiple definition of `ImGui::Text(char const*, ...)'
Build/Common/imgui_src/imgui_widgets.o:imgui_widgets.cpp:(.text+0x2e40): first defined here
...
I see that imgui_user.cpp includes imgui_widgets.cpp, which cause the issues since imgui_widgets.cpp is already compiled on its own. How to fix this ?
@rraptor, I have trouble compiling imgui for win32 now, it complains about duplicate symbols:
Build/Common/imgui_user.o:imgui_user.cpp:(.text+0x28c0): multiple definition of `ImGui::TextEx(char const*, char const*, int)'
Build/Common/imgui_src/imgui_widgets.o:imgui_widgets.cpp:(.text+0x28c0): first defined here
Build/Common/imgui_user.o:imgui_user.cpp:(.text+0x2da0): multiple definition of `ImGui::TextUnformatted(char const*, char const*)'
Build/Common/imgui_src/imgui_widgets.o:imgui_widgets.cpp:(.text+0x2da0): first defined here
Build/Common/imgui_user.o:imgui_user.cpp:(.text+0x2dd0): multiple definition of `ImGui::TextV(char const*, char*)'
Build/Common/imgui_src/imgui_widgets.o:imgui_widgets.cpp:(.text+0x2dd0): first defined here
Build/Common/imgui_user.o:imgui_user.cpp:(.text+0x2e40): multiple definition of `ImGui::Text(char const*, ...)'
Build/Common/imgui_src/imgui_widgets.o:imgui_widgets.cpp:(.text+0x2e40): first defined here
...
I see that imgui_user.cpp includes imgui_widgets.cpp, which cause the issues since imgui_widgets.cpp is already compiled on its own. How to fix this ?
If someone wants to use imgui with SceneManager, do not forget to destroy your imgui object when changing scene! One way to do it:
function MyScene:init()
self.imgui = ImGui.new()
self:addChild(self.imgui)--...
self:addEventListener("exitBegin", self.exitBegin, self)end--function MyScene:exitBegin()
self:removeAllListeners()-- remove "enterFrame" event OR all event if you want
self.imgui =nil-- destroy imguiend
Also, Ive fixed a bug with mouse coordinates in event callbacks (ImGui:onMouseMove(e) and others).
When you give the payload to imgui, you give the string pointer and the string size, so imgui stores the exact number of characters the string has, without the extra zero char strings have in C. This is OK. However when you get back the payload from imgui, you push it to lua without telling the string size, so lua compute the size by looking for the zero char at the end of the string, which might no be there.
When you give the payload to imgui, you give the string pointer and the string size, so imgui stores the exact number of characters the string has, without the extra zero char strings have in C. This is OK. However when you get back the payload from imgui, you push it to lua without telling the string size, so lua compute the size by looking for the zero char at the end of the string, which might no be there.
when i compile it to html then i get this error: "C:\Program Files (x86)\Gideros\Tools\luac.exe: API.lua:8: '+=','-=','*=', '/=', '%=', '^=', '=' expected near 'ImGui'" and when i run the code it does nothing after the gideros loading screen.
Comments
https://github.com/MultiPain/Gideros_examples/tree/master/ImGuiFileDialogDemo
Likes: MoKaLux, SinisterSoft, antix
https://github.com/MultiPain/Gideros_ImGui/commit/cd0a8e6e29ef9d41699cc5cb7df976ecce42e75b
ImGui:calcTextSize() is changed:
Hope I didnt miss anything...
Currently working on nav inputs, because I completely forgot about it
https://github.com/ocornut/imgui/issues/787
Likes: SinisterSoft
Likes: rrraptor
https://deluxepixel.com
Likes: MoKaLux, SinisterSoft
Likes: SinisterSoft
https://wiki.gideros.rocks/index.php/Dear_ImGui
You can add "GDataTypeInfo" and "PatchFormatStringFloatToInt" from here I guess:
and remove include
https://github.com/MultiPain/Gideros_ImGui/blob/ebcd783787440438ec850e81e6dcefa85ffd990f/imgui_user.cpp
One way to do it:
Likes: keszegh
https://github.com/MultiPain/Gideros_ImGui/commit/3d672db9ae0a17214e60958dcb726e0efb29477d?branch=3d672db9ae0a17214e60958dcb726e0efb29477d&diff=unified#diff-608d8de3fba954c50110b6d7386988f27295de845e9d7174e40095ba5efcf1bbR1203
Likes: MoKaLux, SinisterSoft, antix
New functions will keep original image ratio.
https://github.com/MultiPain/Gideros_ImGui/commit/9e319169bfef60a64a40878cd6c0e492568b1185
Removed UV's args because of TextureRegion object.
P.S. Added Node Editor(work in progress ), but only in docking branch.
Likes: MoKaLux
Grid drawn by imgui, drag&drop handled by imgui
Likes: SinisterSoft, MoKaLux
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Seems like drag&drop payload does not work correctly.
To put data into storage we use
For example:
ImGui::SetDragDropPayload:
https://github.com/ocornut/imgui/blob/71cc636696bd17c81514da49707e909958c14632/imgui.cpp#L9453
ImGuiPayload:
https://github.com/ocornut/imgui/blob/71cc636696bd17c81514da49707e909958c14632/imgui.h#L1682
However when you get back the payload from imgui, you push it to lua without telling the string size, so lua compute the size by looking for the zero char at the end of the string, which might no be there.
You need to use
Likes: rrraptor, MoKaLux
Likes: MoKaLux
You can use
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://github.com/ocornut/imgui/wiki/Bindings
Fragmenter - animated loop machine and IKONOMIKON - the memory game
"C:\Program Files (x86)\Gideros\Tools\luac.exe: API.lua:8: '+=','-=','*=', '/=', '%=', '^=', '=' expected near 'ImGui'"
and when i run the code it does nothing after the gideros loading screen.
EDIT: the export not working is probably due to the same bug as reported here:
http://forum.giderosmobile.com/discussion/8341/html5-function-import-requires-a-callable#latest
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
This is the code:
@hgy29 any thoughts?
Seems like 1.80 coming soon. There was tons of commits today
Likes: SinisterSoft
https://github.com/MultiPain/Gideros_ImGui#widgets-images
Likes: MoKaLux, SinisterSoft