Irrlicht.Net is no longer developed or supported,
Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
JiB-z
Posts: 7 Joined: Sun Apr 11, 2004 12:54 pm
Location: Bordeaux (France)
Post
by JiB-z » Thu Oct 06, 2005 7:58 pm
Ok here is the code which doesn't work
:
Code: Select all
if (e.Type == EventType.GUIEvent)
{
... Handle GUIEvent.BUTTON_CLICKED with id of a button ...
}
The code in the "if" block is never reached SO
I guess that Irrlicht never get a GUIEvent like GUIEvent.BUTTON_CLICKED ...
I would know If someone had handle successfully a GUI with Irrlicht.Net and so
show me how he codes it.
Thanks for your answers.
Guest
Post
by Guest » Thu Oct 06, 2005 9:06 pm
hi
i had the same problem. Now i made two classes and it works
Code: Select all
public class MainMenu
{
internal MainClass()
{
//device initialisieren
device = new IrrlichtDevice(DriverType.DIRECTX9,new Dimension2D(1280,800), 32, true, true, true);
device.EventReceiver = new EventReceiver();
....
}
Code: Select all
public class EventReceiver : IEventReceiver
{
public EventReceiver()
{
}
public bool OnEvent(Event e)
{
if(e.Type == EventType.GUIEvent && e.GUIEventType == GUIEvent.BUTTON_CLICKED)
{
switch(e.GUIEventCaller.ID)
{
..
}
JiB-z
Posts: 7 Joined: Sun Apr 11, 2004 12:54 pm
Location: Bordeaux (France)
Post
by JiB-z » Fri Oct 07, 2005 10:12 am
Thanks for your help but it doesn't work for me I had already this pattern for my app. So I guess that it can be a result of using .Net 2.0, I don't know if you use it.
So I decided to try to implement a GUI with WinForm classes.
Guest
Post
by Guest » Sat Oct 08, 2005 2:10 pm
don´t know if it depends on the .net-Version.
i use 1.1.