[SOLVED] Question about functions
Posted: Tue Apr 13, 2010 2:31 pm
I have a few functions that act like buttons, and I was wondering if there was a way to make a general function, and somehow pass a function to a function? lol
like, I could say
void drawButton(SDL_Surface* destination, SDL_Surface* source, int x, int y, SDL_Event &event, FUNCTION HERE);
and say
drawButton(screen, image, 10, 10, events, rotateMap(90));
If I am going about this wrong, then you can yell at me about that too D:
like, I could say
void drawButton(SDL_Surface* destination, SDL_Surface* source, int x, int y, SDL_Event &event, FUNCTION HERE);
and say
drawButton(screen, image, 10, 10, events, rotateMap(90));
If I am going about this wrong, then you can yell at me about that too D: