Quote:
Is it possible in c-script to pass an object name in an argument so you can dynamically reference an object in a function?
Todd has his own world.
For rare instances, where I actually want get/set element by name behavior, I use a dll plugin.
Code:
panel* pnl0_;
function showPanel(whichPanel) {
// whichPanel parameter might be considered a var or long at this point
// whichPanel.alpha = 50;
// do sort of cast to (panel*)
pnl0_ = whichPanel;
pnl0_.alpha = 50;
}
//...
showPanel(message_panel);
showPanel(warning_panel);
//...