Programming & Scripting

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Uber Modder Uber ModderMember since: 15.04.2008, 19:40Posts: 2321Location: London, UK Likes: 1
 

 Post Topic: UI Event listener and Functions creation
PostPosted 09.03.2012, 16:54 
I've just copy&pasted the code from here:
http://freesdk.crydev.net/display/SDKDO ... ctionnodes

and followed instructions of implementation. But I have a compile error:

Code:
1>  UIFunctions.cpp
1>UIFunctions.cpp(13): error C2660: 'IUIEventSystem::RegisterListener' : function does not take 1 arguments


It says that the function RegisterListener needs more arguments:

Code:
m_pGameEvents = gEnv->pFlashUI->CreateEventSystem( "Game", IUIEventSystem::eEST_UI_TO_SYSTEM );
m_pGameEvents->RegisterListener(this);



Another problem!

How to make a node, which will send the values as Event? I've tried the standard UI Events, like UISettings, and it worked. After I made Events and Functions in the separate files, like it said in docs, I can't activate the SendEvent function!!!



I need a help. Thank you!


Last edited by Alex626 on 11.03.2012, 20:23, edited 3 times in total.

User avatar   Uber Modder Uber ModderMember since: 15.04.2008, 19:40Posts: 2321Location: London, UK Likes: 1
 

 Post Topic: Re: UIFunctions.cpp - compile error
PostPosted 09.03.2012, 17:56 
First problem is solved.

You should register the listener with a name.

Change this:

Code:
m_pGameEvents->RegisterListener(this);


to this:

Code:
m_pGameEvents->RegisterListener(this,"CUIFunctions");


It should be sticked, and documentation needs to be fixed.
User avatar   Uber Modder Uber ModderMember since: 15.04.2008, 19:40Posts: 2321Location: London, UK Likes: 1
 

 Post Topic: Re: UIFunctions.cpp - compile error
PostPosted 10.03.2012, 13:36 
up^

How to make a node, which will send the values as Event? I've tried the standard UI Events, like UISettings, and it worked. After I made Events and Functions in the separate files, like it said in docs, I can't activate the SendEvent function!!!
User avatar   Uber Modder Uber ModderMember since: 15.04.2008, 19:40Posts: 2321Location: London, UK Likes: 1
 

 Post Topic: Re: UI Event listener and Functions creation
PostPosted 12.03.2012, 18:55 
UP!!