3 registered members (Ayumi, Akow, AndrewAMD),
1,505
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: How to call a function through a function paramater
[Re: msmith2468]
#402695
06/09/12 11:46
06/09/12 11:46
|
Joined: Nov 2007
Posts: 2,568 Germany, BW, Stuttgart
MasterQ32
Expert
|
Expert
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
|
use a dummy function:
void mybuttonfunc(void);
functing MikesBtn(var SIZEX, var SIZEY, VOID* LeftClickFunction) { if(Left click) { mybuttonfunc = LeftClickFunction; if(mybuttonfunc) mybuttonfunc(); } }
Last edited by MasterQ32; 06/09/12 11:46.
|
|
|
Re: How to call a function through a function paramater
[Re: MasterQ32]
#402734
06/09/12 18:23
06/09/12 18:23
|
Joined: Jun 2004
Posts: 2,234 Wisconsin USA
FoxHound
Expert
|
Expert
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
|
That should work and will work fine with the 3dgs button setup. Don't make the game making any harder than it has to be by reinventing the wheel here.
--------------------- There is no signature here.
QUIT LOOKING FOR ONE!
|
|
|
Re: How to call a function through a function paramater
[Re: msmith2468]
#402912
06/11/12 19:46
06/11/12 19:46
|
Joined: Jun 2004
Posts: 2,234 Wisconsin USA
FoxHound
Expert
|
Expert
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
|
There are plenty of things about 3dgs that I don't like but the button system in the panels is not one of them. http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=402345#Post402345The things I do with buttons in this thing, plus panel pointers when you click the buttons is a bit over the top. However learning how to make a button from scratch is a pretty good way to learn in depth programming and I salute that.
--------------------- There is no signature here.
QUIT LOOKING FOR ONE!
|
|
|
|