how exactly do i get this to work? i have my button widgetinitialized in AS3 and it is fine but when I add Eventlisteners as explained by Matt Doyle , I don't get event calls to the event function.
event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
{
local bool bWasHandled;
bWasHandled = false;
`log(" WidgetName: " @ WidgetName @ " Path: " @ WidgetPath @ " Widget: " @ Widget);
switch(WidgetName)
{
case ('structbtn'):
if (StructureBtn == none)
{
StructureBtn = GFxClikWidget(Widget);
StructureBtn.AddEventListener('CLIK_buttonPress', OnStructBtnClicked);
bWasHandled = true;
}
break;
.................................................. ...........
function OnStructBtnClicked(GFxClikWidget.EventData ev)
{
`log("Struct was clicked");
}



Reply With Quote

Bookmarks