Julien Nadeau <ve...@...> writes:
> 
> 
> This sounds more complicated than it needs to be. User data is normally
> passed using AG_Event arguments. Can you provide some sample code?
> What is the error you are getting? The fn argument must be of type
> void foo(AG_Event *).

This is the GUI code for my main menu:

void GUI::LoginMenu(Network objNetwork)
{
    AG_LabelNew (objLogin, 0, "MOTD: Thanks for downloading Novalis Engine!");
    objUsername = AG_TextboxNew(objLogin, 0, "Username: ");
    objPassword = AG_TextboxNew(objLogin, AG_TEXTBOX_PASSWORD, "Password:  ");
    AG_SpacerNewHoriz(objLogin);
    objLoginButton = AG_ButtonNewFn(objLogin, objNetwork.Login, "Login", 0,
"%p,%p", objUsername, objPassword);
    AG_ButtonSetPadding(objLoginButton, 5, 5, 5, 5);
    AG_WidgetFocus(objUsername);
}


See how in my LoginMenu function, I need to pass objNetwork from something else
or else ill get a segmentation error. But using objNetwork.Login throws an
error. I guess the function there can't be in a class, not even its own (GUI)...

_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html

Reply via email to