From 1fb8dede1f806992708ec1016dbe1a7c7569adbf Mon Sep 17 00:00:00 2001 From: kohashiwakaba Date: Sat, 22 Jan 2022 00:03:06 +0900 Subject: [PATCH] MCM : reload demo descriptions on language change --- mod_config_menu.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mod_config_menu.lua b/mod_config_menu.lua index cec081f5..cb658e0c 100644 --- a/mod_config_menu.lua +++ b/mod_config_menu.lua @@ -24,8 +24,12 @@ local MCMCompat_oldPermanentObj = false EID.MCMLoaded = MCMLoaded local colorNameArray = {} -local function renderDummyDesc() - MCMCompat_oldPermanentObj = EID.permanentDisplayTextObj +local function renderDummyDesc(reload) + if reload then + MCMCompat_oldPermanentObj = nil + else + MCMCompat_oldPermanentObj = EID.permanentDisplayTextObj + end local demoDescObj = EID:getDescriptionObj(5, 100, 33) demoDescObj.Name = EID:getDescriptionEntry("MCM","DemoObjectName") demoDescObj.Transformation = EID:getDescriptionEntry("MCM","DemoObjectTransformation") @@ -228,6 +232,7 @@ if MCMLoaded then if isFixed then EID:loadFont(EID.modPath .. "resources/font/eid_"..EID.Config["FontType"]..".fnt") end + renderDummyDesc(true) end, Info = {"Changes the language.","Languages marked with (WIP) are incomplete"} }