From 22c4fd7bb3ef1d7c6bfc67baf79aed53d22d8636 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期五, 14 十一月 2025 18:00:06 +0800
Subject: [PATCH] 1.竖排slot格子指示;

---
 SourceCode/Bond/Servo/EqsGraphWnd.cpp |   33 ++++++++++++++++++++++-----------
 1 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/SourceCode/Bond/Servo/EqsGraphWnd.cpp b/SourceCode/Bond/Servo/EqsGraphWnd.cpp
index fbdd34b..cca80eb 100644
--- a/SourceCode/Bond/Servo/EqsGraphWnd.cpp
+++ b/SourceCode/Bond/Servo/EqsGraphWnd.cpp
@@ -64,6 +64,8 @@
 	m_nMagneticLinHoz = 0;
 	m_nMagneticLinVer = 0;
 	m_hFontTitle = nullptr;
+	m_nIndicatorSize = 10;
+	m_nIndicatorMargin = 3;
 
 }
 
@@ -157,6 +159,20 @@
 
 	m_crItemIdText[0] = CColorTransfer::ApproximateColor(m_crItemNameText[0], -0.3f);
 	m_crItemIdText[1] = CColorTransfer::ApproximateColor(m_crItemNameText[1], -0.3f);
+}
+
+void CEqsGraphWnd::SetIndicatorSize(int nSize)
+{
+	if (nSize > 0) {
+		m_nIndicatorSize = nSize;
+	}
+}
+
+void CEqsGraphWnd::SetIndicatorMargin(int nMargin)
+{
+	if (nMargin >= 0) {
+		m_nIndicatorMargin = nMargin;
+	}
 }
 
 void CEqsGraphWnd::EnableScroll(BOOL bEnable)
@@ -1964,10 +1980,10 @@
 			::DrawText(hMemDC, pItem->text, (int)strlen(pItem->text), &rcItem,
 				DT_CENTER | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS);
 
-			// 澶氫釜鎸囩ず鐏細宸︿笂瑙掞紝鎸� 4 鍒� 脳 2 琛屾帓鍒�
-			const int indicatorSize = 10;
-			const int indicatorMargin = 3;
-			const int indicatorsPerRow = 4;
+			// indicators vertical column layout
+			const int indicatorSize = m_nIndicatorSize;
+			const int indicatorMargin = m_nIndicatorMargin;
+			const int indicatorX = rcItem.left + 5;
 
 			for (int k = 0; k < EQITEM_INDICATOR_COUNT; ++k) {
 				BYTE indicatorState = pItem->nIndicatorState[k];
@@ -1975,17 +1991,12 @@
 					continue;
 				}
 
-				int row = k / indicatorsPerRow;
-				int col = k % indicatorsPerRow;
-
 				RECT rcIndicator;
-				rcIndicator.left = rcItem.left + 5 + col * (indicatorSize + indicatorMargin);
-				rcIndicator.top = rcItem.top + 5 + row * (indicatorSize + indicatorMargin);
+				rcIndicator.left = indicatorX;
+				rcIndicator.top = rcItem.top + 5 + k * (indicatorSize + indicatorMargin);
 				rcIndicator.right = rcIndicator.left + indicatorSize;
 				rcIndicator.bottom = rcIndicator.top + indicatorSize;
 
-
-				// 鐢婚珮浜�/鐏拌壊鏂瑰潡
 				RECT rcInner = rcIndicator;
 				::InflateRect(&rcInner, -1, -1);
 				::FillRect(hMemDC, &rcInner, indicatorState == INDICATOR_STATE_HIGHLIGHT

--
Gitblit v1.9.3