Ludeon Forums

Ludeon Forums

  • June 04, 2020, 01:28:06 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Modding request: make TexButton public, not internal  (Read 53 times)


  • Colonist
  • ***
  • Posts: 923
  • Little White Mouse
    • View Profile
Modding request: make TexButton public, not internal
« on: May 22, 2020, 11:36:15 PM »

Verse.TexButton is an internal class.  If it were a public class, then modders could more easily match the look of the vanilla game.

Modders can get around this by keeping a static Texture2D and using Harmony (or reflection):
Code: [Select]
        static MyThingThatNeedsTexture_StaticConstructor () {
                .TypeByName("Verse.TexButton"), "Drop").GetValue(null);
        private static Texture2D Drop; // == TexButton.Drop
But that is not elegant and adds unnecessary clutter to mods.

Thank you for the consideration!
« Last Edit: May 23, 2020, 01:25:01 PM by LWM »