About Store Forum Documentation Contact



Post Reply 
Callback function in gui list
Author Message
Harton Offline
Member

Post: #1
Callback function in gui list
I use class List and I want hook my callback function to this list but now it is impossible... :( Can you add this functionality?
Code:
list.func(myCallbackFunction);
Thanks!
05-03-2012 07:14 PM
Visit this user's website Find all posts by this user Quote this message in a reply
PsychoBoy Offline
Member

Post: #2
RE: Callback function in gui list
If you want to check what user has selected on list:
Code:
if( (Gui.ms()==&List && Ms.bp(0)) // if clicked on some element in list
if(Elm *cur = List()) //cur = current element in list
05-06-2012 06:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Harton Offline
Member

Post: #3
RE: Callback function in gui list
I know but architecture of our game uses callback functions. We don't use update functions in our gui. smile
05-06-2012 10:58 PM
Visit this user's website Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #4
RE: Callback function in gui list
You could override the List update method (in a derived List struct). Then use the code above to trigger a callback function passing the selected element.
05-06-2012 11:09 PM
Find all posts by this user Quote this message in a reply
Post Reply