HUD Subclassing

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

HUD Subclassing

Postby EXetoC » Mon Dec 05, 11 8:00 am

Has anyone been able to do it? I think that this approach is better than modifying the class directly. The problem is that DeusExRootWindow for example seems to be created in native code, thus making it impossible to change the type. I am modifying 2027, whose source code consist almost entirely of subclasses in a separate directory, and i'd like to adhere to that convention.
EXetoC
Newbie
 
Posts: 20
Joined: Sun Oct 23, 11 12:29 am
Location: Stockholm, Sweden

Postby ~DJ~ » Mon Dec 05, 11 1:05 pm

If I'm getting this right.. yeah? It's pretty simple.. your HUD extending DeusExHUD.. you'll need a playerclass along with it though. If that's not what you're talking about then NEEVEMIND :oops:
User avatar
~DJ~
Forum Super Hero
 
Posts: 3766
Joined: Tue May 22, 07 12:23 pm

Postby EXetoC » Mon Dec 05, 11 9:12 pm

Yes i realized that, although it might not be a good idea to create a subclass after all. The question then is, do i move my variables from TruePlayer (which is a subclass of DeusExPlayer), to DeusExPlayer, or do i just add a few references to TruePlayer (alternatively replacing all the references to TruePlayer, thus making the code a little less messy)? The former is rather ugly from an object oriented perspective, i think. Either way, i'm under version control so a little experimentation isn't going to do much harm.

Was this at all confusing? :)
EXetoC
Newbie
 
Posts: 20
Joined: Sun Oct 23, 11 12:29 am
Location: Stockholm, Sweden

Postby EXetoC » Tue Dec 06, 11 12:04 am

Actually 2027 seems to modify the original classes (even some that are also subclassed), and it can save quite a lot of headaches i suppose.
EXetoC
Newbie
 
Posts: 20
Joined: Sun Oct 23, 11 12:29 am
Location: Stockholm, Sweden


Return to Editing issues

Who is online

Users browsing this forum: No registered users and 9 guests