@rrraptor That's a great idea but personally I don't think it's worthwhile. I say that because I don't see Gideros ever being able to make apps that need a user interfaces as complex as that since Gideros is really a gaming platform, not a utility platform.
You dont have to create apps. What if I want to create a city building simulator or something like Factorio or maybe a strategy game? In all cases, the UI will be pretty complex. Check this out.
Also.. your little GUI framework is very good and more than Gideros needs I'd say
No, it is missing a lot of stuff, like drop downs, popups, text input dialogs (single line and nultiline) and e.t.c.
As I said, I can try to create a binding, but I dont know where to start. It sounds not that hard:
Integrating Dear ImGui within your custom engine is a matter of 1) wiring mouse/keyboard/gamepad inputs 2) uploading one texture to your GPU/render engine 3) providing a render function that can bind textures and render textured triangles.
But the only thing that I can do by my self is mouse and keyboard inputs, but not the drawing stuff.
I think the issue was that 'binder' class isn't actually visible from plugins, so you have to compile it inside the plugin by including "luabinding/binder.cpp" inside your plugin
I think the issue was that 'binder' class isn't actually visible from plugins, so you have to compile it inside the plugin by including "luabinding/binder.cpp" inside your plugin
Ty, that worked
Btw, can I setup qt so it will put the dll to "plugins" folder ? Solved
@hgy29 how can I redefine a ImGui assertion macro to get error messages ?
It says that you need to change macro in imgui.h:
//---- Define assertion handler. Defaults to calling assert().// If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement.
//#define IM_ASSERT(_EXPR) MyAssert(_EXPR)//#define IM_ASSERT(_EXPR)((void)(_EXPR))// Disable asserts
But in order to use lua_error(lua_State *L) I need a lua_State. But idk how to get/use it in macro.
i see imGui is not following the sprite hierarchy philosophy, instead the 'redraw on each frame' philosophy. that's a bit inconvenient, in gideros code it will look strange, but i guess we can live with it.
i see imGui is not following the sprite hierarchy philosophy, instead the 'redraw on each frame' philosophy. that's a bit inconvenient, in gideros code it will look strange, but i guess we can live with it.
Anyways, I think it is easier to create a binding of existing GUI library rather than trying to create you own solution from scratch. Also, I will coninue working on my "retained" lib
@rraptor, here is your main.cpp modified for rendering. New init code from lua: wpre lang="lua"> local imgui = ImGui.new(application:getContentWidth(),application:getContentHeight())
Now you say that, I didn't pay much attention to clipping values, and assumed they were x,y,w,h while they seem to be x1,y1,x2,y2 instead. Try to change
Now you say that, I didn't pay much attention to clipping values, and assumed they were x,y,w,h while they seem to be x1,y1,x2,y2 instead. Try to change
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 knew that adding this cannot be that hard, finally we are lucky to have @rrraptor around to do the dirty job with the help of @hgy29. thanks for you all.
@hgy29 how can I get keyboard modifiers? I dont see any method in "LuaApplication" or "Application" that can help me. Also, can I add callback to detect if window is resized/lose focus without using lua?
I think this is a NPOT texture size issue. Gideros makes textures power of two, expending your 320 to 512 internally, but of course that changes the uv mappings and Imgui won’t know.
Comments
Check this out. No, it is missing a lot of stuff, like drop downs, popups, text input dialogs (single line and nultiline) and e.t.c.
As I said, I can try to create a binding, but I dont know where to start. It sounds not that hard: But the only thing that I can do by my self is mouse and keyboard inputs, but not the drawing stuff.
I tried to compile this, but got an error... I dont realy remember what kind of error, but it was related to "binder.pushInstance".
Likes: rrraptor
Likes: MoKaLux, rrraptor
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Btw, can I setup qt so it will put the dll to "plugins" folder ?Solved
Likes: keszegh, hgy29, MoKaLux
It says that you need to change macro in imgui.h:
Example use of IM_ASSERT:
Plugin source is attached. There is a "MyImGuiRenderFunction" function that handles the drawing stuff. ImGui initialization in "initImGui" function.
Demo code:
P.S. I forgot about screen resolution Its 200x200 by default
Likes: MoKaLux, SinisterSoft
Fragmenter - animated loop machine and IKONOMIKON - the memory game
http://forum.giderosmobile.com/discussion/comment/63638/#Comment_63638
Anyways, I think it is easier to create a binding of existing GUI library rather than trying to create you own solution from scratch. Also, I will coninue working on my "retained" lib
Likes: keszegh, MoKaLux
New init code from lua: wpre lang="lua">
local imgui = ImGui.new(application:getContentWidth(),application:getContentHeight())
Result:
Likes: rrraptor, SinisterSoft
Likes: hgy29
Light theme does not work corectly(is just me, nevermind ). Clipping does not work corectly.P.S. Fixed mouse.
Likes: MoKaLux
Try to change
1 more question. Lines are sharp, but in original they are smooth.
I changed render code for colors with
Likes: rrraptor
Likes: keszegh, SinisterSoft, MoKaLux
Likes: MoKaLux
https://deluxepixel.com
Likes: MoKaLux, SinisterSoft
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Fragmenter - animated loop machine and IKONOMIKON - the memory game
But I just looked at CPU usage in windows task manager and its about 2-4%
Code: