Console debug on gui element

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Kaki
Posts: 41
Joined: Thu Oct 12, 2006 12:19 pm
Location: France

Console debug on gui element

Post by Kaki »

Hello

A day I found a topic where messages output are drawn on a gui element. I don't remember how I have done to find it.
On this topic a man presents his code which allows to show the debug. I want to study that.

Could you help me to find this topic ?
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post by JonLT »

Kaki
Posts: 41
Joined: Thu Oct 12, 2006 12:19 pm
Location: France

Post by Kaki »

No it isn't, but this one is interesting. The log file was shown on an irrlicht scene.
JonLT
Posts: 152
Joined: Thu Mar 15, 2007 5:47 pm
Location: Denmark

Post by JonLT »

You could do something like he's doing: making an eventreceiver, make it capture the log events and write them to a gui object:

Code: Select all

class MyEventReceiver : public IEventReceiver 
{ 
public: 
     virtual bool OnEvent(SEvent event) 
     { 
          if (event.EventType == irr::EET_LOG_TEXT_EVENT) 
          { 
              ?? = event.LogEvent.Text //put this text where you want it
          }; 
        
     return false; 
     } 
}; 
I'm not good at the irrlicht gui, but i'm sure you can figure it out! :)
Good luck!
Post Reply