Irrlicht IMGUI binding

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
bkeys
Posts: 42
Joined: Sat Feb 27, 2016 9:06 pm

Re: Irrlicht IMGUI binding

Post by bkeys »

bkeys wrote:Thank you GrafZhal for your work! Here is an update for our usage of IrrImGui, we use it for our main menu and plan on using it as a full replacement for the Irrlicht GUI in our project. You really saved our bacon with this project (we were grasping at straws for a GUI library that would work with Irrlicht). We also use your Irrlicht CMake build for our project, and in our windows build. Here is a screenshot of our game:
Image
Here is our project's repository:
https://gitlab.com/CollectiveTyranny/DMUX

I tried to make the main menu as generic as possible so that other projects using your wrapper can benefit, the main menu is under the GPL v3 and can be found here:
https://gitlab.com/bkeys/IrrImMenu
It is not complete, but a lot of the work is already done since the main menu is not the most interesting thing to create.
Oh man yeah I really cannot thank you enough now with how your IMGUI bindings have helped us with all things GUI in our game. Here is a screen shot now that we are implementing different teams, we have a very interesting lineup for 3 way warfare:
Image
We hope that our players have fun with this aspect of the game when we finish it 8)
EDIT: Made better layout for GUI
- Brigham Keys, Esq.
Ganso
Posts: 2
Joined: Wed Oct 05, 2016 4:59 am

Re: Irrlicht IMGUI binding

Post by Ganso »

Hi guys!

First off, let me start by saying how awesome this binding is, it was pretty much plug and play (unlike some other GUI libraries who seem to have a million dependencies).

I have a problem and I'm hoping someone could help me out here.

The binding pretty much works as advertised when I run the Hello World example, but in my project I have a custom MyEventReceiver class which I need to inherit from CIMGUIEventReceiver, thing is when I use the createIMGUI function and pass my EventReceiver object instead of the CIMGUIEventReceiver as in the example my Mouse Pointer gets stuck on the upper left corner

In other words, instead of having

Code: Select all

 
CIMGUIEventReceiver EventReceiver;
.....
IIMGUIHandle * const pGUI = createIMGUI(pDevice, &EventReceiver);
 
I have this

Code: Select all

 
//In it's own header file
class EventReceiver : public IrrIMGUI::CIMGUIEventReceiver
{
//stuff
};
////
 
and this

Code: Select all

 
MyEventReceiver EventReceiver;
.....
IIMGUIHandle * const pGUI = createIMGUI(pDevice, &EventReceiver);
 

Here's a screen shot of the mouse pointer stuck on the top left corner

Image

The cool part is that the MyEventReceiver is detecting input correctly, I can detect where the mouse "should be" and even do picking on the scene's objects but the actual cursor image doesn't move.

The following is a picture after I do a Mouse Wheel Zoom Out:
Image

So the problem seems to be that the mouse cursor's image is just not being drawn where the mouse should be, if that makes sense.

Oh yea, something else that's happening is that when I move the mouse outside of the window then the cursor appears again, but I get two mouse cursors on screen at the same time, one follows my actual mouse movements and the other is the one stuck on the top left (I can't get a screen shot of that, sorry).

Am I missing a configuration or a call somewhere?

Would really appreciate any insight on this.

Thanks!
Ganso
Posts: 2
Joined: Wed Oct 05, 2016 4:59 am

Re: Irrlicht IMGUI binding

Post by Ganso »

Well, I figured out why my mouse cursor stopped moving :P

Turns Out that if you overwrite the checkMouseEvents method in the Event Receiver class and omit the part where you actually set the mouse coords the cursor will just stick to (0,0)
mMousePositionX = rEvent.MouseInput.X;
mMousePositionY = rEvent.MouseInput.Y;
Once I added the code back to my custom handler it worked fine.
bkeys
Posts: 42
Joined: Sat Feb 27, 2016 9:06 pm

Re: Irrlicht IMGUI binding

Post by bkeys »

Hey you guys; I just ported IrrIMGUI to the new Irrlicht2 (IrrlichtBAW); you can read more about my release here
http://irrlicht.sourceforge.net/forum/v ... =6&t=51599
Here is a screenshot of it running with the new Irrlicht
Image
Thank you for IrrIMGUI!
- Brigham Keys, Esq.
mzadmzad
Posts: 3
Joined: Sun Mar 21, 2021 4:56 pm

Re: Irrlicht IMGUI binding

Post by mzadmzad »

Hi..... I am trying to use ImGui with Irrlicht (ver. 1.84) but getting undefined reference error (using codeblock+mingw64 ) as shown here Image

Can anyone tell me how can I get this work.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht IMGUI binding

Post by CuteAlien »

Not using it - but sounds like you don't link to the library maybe?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply