Improving modability of window classes

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
numidium3rd
Posts: 187
Joined: Sun Mar 25, 2018 12:34 am
Location: United States

Improving modability of window classes

Post by numidium3rd »

I've recently been working on an interface mod for DFU's inventory menu and I noticed something about the menu classes in general: There are a lot of buttons and panels that aren't accessible from derived classes. I feel like the modability of DFU's interface could be greatly increased simply by making buttons, panels, and screen components protected instead of the default internal.

I wanted to see if any core developers would object to this before I submit a PR. Does anyone see a downside to this? Any other suggestions for making the UI more modable?

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Improving modability of window classes

Post by Hazelnut »

When I introduced the UI window factory implementation, I said that the protection levels on the window elements would need changing so they could be used, but that I was not going to go through and do them all. Partly because it was boring and partly because working out what should and what shouldn't be exposed takes a bit of thought and there are a lot of windows. :) So I suggested that they could be done on a case by case basis by mod authors as we go.

So yeah, this is absolutely the right thing to do but feel free just to do what you need and no more.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply