Label bar: authenticity rows first, quality rows second; single-fan brand text moved off the fan
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7f458b0139
commit
559a702ee3
6 files changed
+9
-6
No files matched your search
Binary file not shown.
+1
-1
@@ -173,7 +173,7 @@ def gpu_front(accent, accent_dark, brand_text, tier=1, burnt=False):
|
|||||||
# 前沿斜切装饰条:品牌色 + 品牌字
|
# 前沿斜切装饰条:品牌色 + 品牌字
|
||||||
for x in range(x0 + 4, x1 - 20):
|
for x in range(x0 + 4, x1 - 20):
|
||||||
c.rect(x, y1 - 5, x, y1 - 3, accent if x % 11 else accent_dark)
|
c.rect(x, y1 - 5, x, y1 - 3, accent if x % 11 else accent_dark)
|
||||||
text57(c, 136 if count == 1 else 112, 84, brand_text, 'h')
|
text57(c, 30 if count == 1 else 112, 84, brand_text, 'h') # 单风扇的大风扇占了右边,品牌字改放左下
|
||||||
# 顶沿:四根铜热管端头与 8 针供电口
|
# 顶沿:四根铜热管端头与 8 针供电口
|
||||||
for i in range(4):
|
for i in range(4):
|
||||||
x = 38 + i * 9
|
x = 38 + i * 9
|
||||||
|
|||||||
@@ -49,7 +49,9 @@ namespace Decentralized.Domain
|
|||||||
public static class CardLabels
|
public static class CardLabels
|
||||||
{
|
{
|
||||||
public const int RowSpec = 1, RowBuild = 2, RowFan = 4, RowFingers = 8, RowBracket = 16, RowPrint = 32, RowSerial = 64, RowSeal = 128, AllRows = 255;
|
public const int RowSpec = 1, RowBuild = 2, RowFan = 4, RowFingers = 8, RowBracket = 16, RowPrint = 32, RowSerial = 64, RowSeal = 128, AllRows = 255;
|
||||||
public static readonly int[] Rows = { RowSpec, RowBuild, RowFan, RowFingers, RowBracket, RowPrint, RowSerial, RowSeal };
|
/// <summary>标签栏的顺序:前四行鉴定真伪(型号、供电与风扇、序列号条形码、丝印),后四行鉴定成色。</summary>
|
||||||
|
public static readonly int[] Rows = { RowSpec, RowBuild, RowSerial, RowPrint, RowFan, RowFingers, RowBracket, RowSeal };
|
||||||
|
public const int AuthRows = 4;
|
||||||
|
|
||||||
/// <summary>各标签各取值对价格的影响(百分比,相加):风扇叶片积灰 −4%、缺角 −12%;金手指发暗 −4%、氧化 −12%;挡板划痕 −2%;封条缺失 −6%。
|
/// <summary>各标签各取值对价格的影响(百分比,相加):风扇叶片积灰 −4%、缺角 −12%;金手指发暗 −4%、氧化 −12%;挡板划痕 −2%;封条缺失 −6%。
|
||||||
/// 型号、供电与风扇、丝印、序列号本身不扣价,它们决定的是这块卡是什么芯片。</summary>
|
/// 型号、供电与风扇、丝印、序列号本身不扣价,它们决定的是这块卡是什么芯片。</summary>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Decentralized
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed class GpuInspectView : MonoBehaviour
|
public sealed class GpuInspectView : MonoBehaviour
|
||||||
{
|
{
|
||||||
private const float RowH = 27f, CardScale = 2.7f, PanelTop = -86f;
|
private const float RowH = 27f, CardScale = 2.7f, PanelTop = -86f, GroupGap = 8f;
|
||||||
private const int RowCount = 8;
|
private const int RowCount = 8;
|
||||||
private static GpuInspectView instance;
|
private static GpuInspectView instance;
|
||||||
private RectTransform root, cardRoot;
|
private RectTransform root, cardRoot;
|
||||||
@@ -173,15 +173,16 @@ namespace Decentralized
|
|||||||
font = buttonTemplate.GetComponentInChildren<TextMeshProUGUI>()?.font;
|
font = buttonTemplate.GetComponentInChildren<TextMeshProUGUI>()?.font;
|
||||||
if (font != null) serialText.font = font;
|
if (font != null) serialText.font = font;
|
||||||
// 标签区:深色底加浅色边框,和上面的大图分开
|
// 标签区:深色底加浅色边框,和上面的大图分开
|
||||||
float panelH = RowCount * RowH + 10f, panelY = PanelTop - panelH / 2;
|
float panelH = RowCount * RowH + 10f + GroupGap, panelY = PanelTop - panelH / 2;
|
||||||
MakeRect(root, "LabelFrame", new Vector2(0, panelY), new Vector2(648, panelH + 8), new Color(0.78f, 0.68f, 0.45f, 1f));
|
MakeRect(root, "LabelFrame", new Vector2(0, panelY), new Vector2(648, panelH + 8), new Color(0.78f, 0.68f, 0.45f, 1f));
|
||||||
MakeRect(root, "LabelBack", new Vector2(0, panelY), new Vector2(640, panelH), new Color(0.10f, 0.11f, 0.14f, 0.96f));
|
MakeRect(root, "LabelBack", new Vector2(0, panelY), new Vector2(640, panelH), new Color(0.10f, 0.11f, 0.14f, 0.96f));
|
||||||
|
MakeRect(root, "LabelDivider", new Vector2(0, PanelTop - 5 - RowH * CardLabels.AuthRows - GroupGap / 2), new Vector2(620, 2), new Color(0.78f, 0.68f, 0.45f, 0.8f));
|
||||||
flip = MakeButton(root, "Flip", new Vector2(0, PanelTop - panelH - 24), new Vector2(200, 30), out flipText);
|
flip = MakeButton(root, "Flip", new Vector2(0, PanelTop - panelH - 24), new Vector2(200, 30), out flipText);
|
||||||
flip.onClick.AddListener(() => { if (shown != null) Items.Flip(shown); });
|
flip.onClick.AddListener(() => { if (shown != null) Items.Flip(shown); });
|
||||||
for (int i = 0; i < RowCount; i++)
|
for (int i = 0; i < RowCount; i++)
|
||||||
{
|
{
|
||||||
int row = CardLabels.Rows[i];
|
int row = CardLabels.Rows[i];
|
||||||
float y = PanelTop - 5 - RowH * (i + 0.5f);
|
float y = PanelTop - 5 - RowH * (i + 0.5f) - (i >= CardLabels.AuthRows ? GroupGap : 0f);
|
||||||
rowName[i] = MakeText(root, "RowName" + i, new Vector2(-255, y), new Vector2(110, RowH), TextAlignmentOptions.Left, 22);
|
rowName[i] = MakeText(root, "RowName" + i, new Vector2(-255, y), new Vector2(110, RowH), TextAlignmentOptions.Left, 22);
|
||||||
rowText[i] = MakeText(root, "RowText" + i, new Vector2(-30, y), new Vector2(330, RowH), TextAlignmentOptions.Left, 22);
|
rowText[i] = MakeText(root, "RowText" + i, new Vector2(-30, y), new Vector2(330, RowH), TextAlignmentOptions.Left, 22);
|
||||||
rowButton[i] = MakeButton(root, "RowButton" + i, new Vector2(245, y), new Vector2(110, RowH - 3), out rowButtonText[i]);
|
rowButton[i] = MakeButton(root, "RowButton" + i, new Vector2(245, y), new Vector2(110, RowH - 3), out rowButtonText[i]);
|
||||||
@@ -218,7 +219,7 @@ namespace Decentralized
|
|||||||
{
|
{
|
||||||
int row = CardLabels.Rows[i];
|
int row = CardLabels.Rows[i];
|
||||||
rowName[i].text = RowName(row);
|
rowName[i].text = RowName(row);
|
||||||
rowName[i].color = new Color(1f, 0.85f, 0.45f);
|
rowName[i].color = i < CardLabels.AuthRows ? new Color(1f, 0.85f, 0.45f) : new Color(0.6f, 0.85f, 1f); // 真伪行金黄,成色行浅蓝
|
||||||
string text;
|
string text;
|
||||||
Color color = new Color(0.96f, 0.98f, 1f);
|
Color color = new Color(0.96f, 0.98f, 1f);
|
||||||
string Show(Claim c) => row == CardLabels.RowSpec ? DisplayModel(c.Model) : ValueText(row, c.Get(row));
|
string Show(Claim c) => row == CardLabels.RowSpec ? DisplayModel(c.Model) : ValueText(row, c.Get(row));
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Reference in new issue
Block a user