CeguiDotNet and Event Handlers

thelsdj

24-10-2005 20:25:34

I have a complex layout I load with:
CeguiDotNet.WindowManager.Instance.loadWindowLayout("foo.layout")

Problem is when I go to add event handlers:

CeguiDotNet.PushButton button = (CeguiDotNet.PushButton)CeguiDotNet.WindowManager.Instance.getWindow("SomeButton");
button.Clicked += new CeguiDotNet.WindowEventDelegate(ButtonClicked);

The first line throws an invalid cast, so theres no way to add a .Clicked event

thoughts?