Modding UI suggestion

Discuss coding questions, pull requests, and implementation details.
User avatar
Hazelnut
Posts: 2004
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Modding UI suggestion

Post by Hazelnut » Thu Oct 17, 2019 10:00 pm

Cool, well I submitted a PR with a UIWindowFactory - tried to keep it nice and compact. Will not be able to do that with manager classes since they don't follow any interface.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Asesino
Posts: 32
Joined: Fri Aug 16, 2019 3:14 am

Re: Modding UI suggestion

Post by Asesino » Sat Oct 19, 2019 3:43 pm

This is a fantastic idea. I just looked at your implementation; it is very elegant. I had recently tried to mod the inventory window, and hit too many stumbling blocks due to protected and private methods. Now I can simply register my modified inventory window, and everything just works.

Thank you for doing this!
A

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

Re: Modding UI suggestion

Post by Hazelnut » Sat Oct 19, 2019 6:58 pm

Glad you like it. Please be aware there are many members and methods that cannot currently be extended - they will need to be make protected and virtual for methods. Since I don't want to go through and do all the classes, I'm leaving them for mod authors to do/request. Please feel free to submit a PR with permission changes that you need. Will review to check nothing untoward is changed and then it will go in the next build after is merged.

I do hope you are extending the core inventory window class and then adding extra functionality, that way you don't need to keep your version maintained as the core version is modified.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

Post Reply