1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-08 22:13:30 +08:00
This commit is contained in:
2023-10-16 00:22:02 +08:00
parent d9ac5e5786
commit 185682bcda
2 changed files with 6 additions and 2 deletions

View File

@@ -1,5 +1,4 @@
using System;
using BepInEx.Configuration;
using UnityEngine;
using UnityEngine.UI;

View File

@@ -118,8 +118,13 @@ public class MyWindow: ManualBehaviour
var btn = Instantiate(panel.layerButtons[0]);
btn.gameObject.name = objName;
btn.highlighted = false;
var img = btn.gameObject.transform.Find("frame")?.GetComponent<Image>();
if (img != null)
{
img.color = new Color(img.color.r, img.color.g, img.color.b, 0f);
}
Util.NormalizeRectWithTopLeft(btn, x, y, parent);
var t = btn.gameObject.transform.Find("Text").GetComponent<Text>();
var t = btn.gameObject.transform.Find("Text")?.GetComponent<Text>();
if (t != null)
{
t.text = text.Translate();