Page 1 of 1

Improving modability of window classes

Posted: Sat Feb 22, 2020 8:51 pm
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?

Re: Improving modability of window classes

Posted: Sat Feb 22, 2020 11:01 pm
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.