BattletechModders / MechEngineer

Mod for BattleTech that introduces many CBT mechanics to the MechLab
GNU Lesser General Public License v2.1
11 stars 21 forks source link

DynamicSlots Moveable slots has no UIName #203

Closed iAcolyte closed 3 years ago

iAcolyte commented 3 years ago

When I try to install some module then use dynamics slots, the slots don't show UIName, so you can see only the movable slot label.

изображение

I fixed it by adding NameText in JSON

"DynamicSlots": {
    "NameText" : "Ferro-Fibrous",
    "ReservedSlots": 14
},
CptMoore commented 3 years ago

Thats intentional! Movable/fixed slots are just slots that take up space and shouldn't clutter the UI with unnecessary text. Colors are used to know which component the space is used up by.

RogueTech and I think BTA both use UIName or more precisely they say "NameText": null

        public string NameText { get; set; } = ""; // null: use component name
        public string BonusAText { get; set; } = ""; // null: use component bonus, "": dont show
        public string BonusBText { get; set; } = ""; // null: use component bonus, "": dont show
        public string BackgroundColor { get; set; } = null; // null: use component color

If you need it, I could probably introduce a global default that is used by components, so as to make it easier for you to change all dynamic slots to your preferred style.

iAcolyte commented 3 years ago

I use the mod without RogueTech. And I saw the names there, so I thought it is a problem.

Anyway, thank you for your reply, awesome mod!