From 33b71dc71157ab4cb59d45ab81327022e5b7e275 Mon Sep 17 00:00:00 2001 From: monitor1394 Date: Tue, 10 Dec 2024 08:49:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0`UIToggle`=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Documentation~/zh/changelog.md | 2 ++ Runtime/Component/Child/BorderStyle.cs | 6 ++++++ Runtime/Internal/UIComponent.cs | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index 5457a844..366b47ab 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -78,6 +78,8 @@ slug: /changelog ## master +* (2024.12.10) 增加`UIToggle`扩展组件 +* (2024.12.09) 修复`UITable`的`scrollbar`无法拖动的问题 * (2024.12.07) 修复`Chart`节点下不能放自定义节点的问题 * (2024.12.05) 增加`UIText`扩展组件 * (2024.12.04) 删除`TextStyle`的无用配置项`tmpAlignment` diff --git a/Runtime/Component/Child/BorderStyle.cs b/Runtime/Component/Child/BorderStyle.cs index 6ef2124c..2a828ad5 100644 --- a/Runtime/Component/Child/BorderStyle.cs +++ b/Runtime/Component/Child/BorderStyle.cs @@ -82,5 +82,11 @@ namespace XCharts.Runtime { return m_Show && roundedCorner ? m_CornerRadius : null; } + + public bool IsCricle() + { + return roundedCorner && m_CornerRadius[0] == 1 && m_CornerRadius[1] == 1 && + m_CornerRadius[2] == 1 && m_CornerRadius[3] == 1; + } } } \ No newline at end of file diff --git a/Runtime/Internal/UIComponent.cs b/Runtime/Internal/UIComponent.cs index ab3ab1dc..43916eeb 100644 --- a/Runtime/Internal/UIComponent.cs +++ b/Runtime/Internal/UIComponent.cs @@ -14,7 +14,7 @@ namespace XCharts.Runtime { [SerializeField] private bool m_DebugModel = false; [SerializeField] protected UIComponentTheme m_Theme = new UIComponentTheme(); - [SerializeField] private Background m_Background = new Background() { show = true }; + [SerializeField] protected Background m_Background = new Background() { show = true }; protected bool m_DataDirty; private ThemeType m_CheckTheme = 0;