Jump to content
Sign in to follow this  
samatra

Class inheritance question

Recommended Posts

Hi. I need to have several of same Controls Groups with only one difference - coordinates and idcs. The problem is that I'm not sure how to organize proper inheritance and avoid copy-pasting of same stuff.

class Group:RscControlsGroup {
...
class Controls {
	... many controls here with different idcs ...
};
};

class Group2:Group {
... different coordinates ...
class Controls; ???
};

So how would I redefine idc values of some controls inside Group2->Controls without having to copy-paste everything? Preferably without using pre-processor commands.

Share this post


Link to post
Share on other sites

Don't put controls {} because then you override "Group" controls

so

class Group2:Group

{

x = 342

y = 012

};

Share this post


Link to post
Share on other sites

The thing is that I need to edit these Controls, only some values inside specific control.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×