mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-02-05 03:02:20 +08:00
fix
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
using System;
|
using System;
|
||||||
using BepInEx.Configuration;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
|||||||
@@ -118,8 +118,13 @@ public class MyWindow: ManualBehaviour
|
|||||||
var btn = Instantiate(panel.layerButtons[0]);
|
var btn = Instantiate(panel.layerButtons[0]);
|
||||||
btn.gameObject.name = objName;
|
btn.gameObject.name = objName;
|
||||||
btn.highlighted = false;
|
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);
|
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)
|
if (t != null)
|
||||||
{
|
{
|
||||||
t.text = text.Translate();
|
t.text = text.Translate();
|
||||||
|
|||||||
Reference in New Issue
Block a user