zc
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -85,7 +85,7 @@
|
|||||||
<!-- Gizmo 进度条 -->
|
<!-- Gizmo 进度条 -->
|
||||||
<ARA_Gizmo_SelectIncubationTarget>选择孵化目标...</ARA_Gizmo_SelectIncubationTarget>
|
<ARA_Gizmo_SelectIncubationTarget>选择孵化目标...</ARA_Gizmo_SelectIncubationTarget>
|
||||||
<ARA_Gizmo_SelectProductionTarget>选择生产目标...</ARA_Gizmo_SelectProductionTarget>
|
<ARA_Gizmo_SelectProductionTarget>选择生产目标...</ARA_Gizmo_SelectProductionTarget>
|
||||||
<ARA_Gizmo_QueueFull>(满)</ARA_Gizmo_QueueFull>
|
<ARA_Gizmo_QueueFull></ARA_Gizmo_QueueFull>
|
||||||
<ARA_Gizmo_ReadyClickAbove>就绪 - 点击上方选择目标</ARA_Gizmo_ReadyClickAbove>
|
<ARA_Gizmo_ReadyClickAbove>就绪 - 点击上方选择目标</ARA_Gizmo_ReadyClickAbove>
|
||||||
<ARA_Gizmo_WaitingForLarvaActivation>等待幼虫激活</ARA_Gizmo_WaitingForLarvaActivation>
|
<ARA_Gizmo_WaitingForLarvaActivation>等待幼虫激活</ARA_Gizmo_WaitingForLarvaActivation>
|
||||||
|
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ namespace ArachnaeSwarm
|
|||||||
public float GizmoScrollPosition { get; set; } = 0f;
|
public float GizmoScrollPosition { get; set; } = 0f;
|
||||||
public int QueueLimit => Props.productionQueueLimit;
|
public int QueueLimit => Props.productionQueueLimit;
|
||||||
void IOrderGizmoProvider.ShowOrderMenu() => ShowOrderMenuPublic();
|
void IOrderGizmoProvider.ShowOrderMenu() => ShowOrderMenuPublic();
|
||||||
|
public void CallLarvaForGizmo() => CallLarvae();
|
||||||
|
|
||||||
// === 组件引用 ===
|
// === 组件引用 ===
|
||||||
private CompRefuelableNutrition _fuelComp;
|
private CompRefuelableNutrition _fuelComp;
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ namespace ArachnaeSwarm
|
|||||||
// === IOrderGizmoProvider 实现 ===
|
// === IOrderGizmoProvider 实现 ===
|
||||||
public int QueueLimit => Props.productionQueueLimit;
|
public int QueueLimit => Props.productionQueueLimit;
|
||||||
void IOrderGizmoProvider.ShowOrderMenu() => ShowOrderMenuPublic();
|
void IOrderGizmoProvider.ShowOrderMenu() => ShowOrderMenuPublic();
|
||||||
|
public void CallLarvaForGizmo() => CallLarvae();
|
||||||
|
|
||||||
// === Gizmo 用的订单信息 ===
|
// === Gizmo 用的订单信息 ===
|
||||||
public List<PawnOrderDisplayInfo> GetOrdersForGizmo()
|
public List<PawnOrderDisplayInfo> GetOrdersForGizmo()
|
||||||
|
|||||||
@@ -140,6 +140,7 @@ namespace ArachnaeSwarm
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ShowOrderMenu() => EquipmentIncubatorData?.ShowFloatMenu();
|
public void ShowOrderMenu() => EquipmentIncubatorData?.ShowFloatMenu();
|
||||||
|
public void CallLarvaForGizmo() => CallLarva();
|
||||||
|
|
||||||
public void RemoveOrderByIndex(int index)
|
public void RemoveOrderByIndex(int index)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -141,6 +141,7 @@ namespace ArachnaeSwarm
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void ShowOrderMenu() => IncubatorData?.ShowFloatMenu();
|
public void ShowOrderMenu() => IncubatorData?.ShowFloatMenu();
|
||||||
|
public void CallLarvaForGizmo() => CallLarva();
|
||||||
|
|
||||||
public void RemoveOrderByIndex(int index)
|
public void RemoveOrderByIndex(int index)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -159,6 +159,17 @@ namespace ArachnaeSwarm
|
|||||||
|
|
||||||
if (order.status == OrderStatus.WaitingForLarva)
|
if (order.status == OrderStatus.WaitingForLarva)
|
||||||
{
|
{
|
||||||
|
// 整个标签区域可点击呼叫幼虫
|
||||||
|
if (Mouse.IsOver(labelRect))
|
||||||
|
{
|
||||||
|
Widgets.DrawHighlight(labelRect);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Widgets.ButtonInvisible(labelRect))
|
||||||
|
{
|
||||||
|
provider.CallLarvaForGizmo();
|
||||||
|
}
|
||||||
|
|
||||||
GUI.color = new Color(1f, 0.8f, 0.4f);
|
GUI.color = new Color(1f, 0.8f, 0.4f);
|
||||||
Widgets.Label(labelRect, $"{order.label} [" + "ARA_Status_WaitingForLarva".Translate() + "]");
|
Widgets.Label(labelRect, $"{order.label} [" + "ARA_Status_WaitingForLarva".Translate() + "]");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ namespace ArachnaeSwarm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ShowResearchMenu()
|
public void ShowResearchMenu()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,24 +44,38 @@ namespace ArachnaeSwarm
|
|||||||
|
|
||||||
var storedResearch = reader.StoredResearch;
|
var storedResearch = reader.StoredResearch;
|
||||||
|
|
||||||
// === 第一行:标题 ===
|
// === 第一行:标题(可点击选择研究) ===
|
||||||
Text.Font = GameFont.Small;
|
Text.Font = GameFont.Small;
|
||||||
Text.Anchor = TextAnchor.MiddleLeft;
|
Text.Anchor = TextAnchor.MiddleLeft;
|
||||||
GUI.color = Color.white;
|
|
||||||
Rect titleRect = new Rect(innerRect.x, curY, innerRect.width, 18f);
|
Rect titleRect = new Rect(innerRect.x, curY, innerRect.width, 18f);
|
||||||
|
|
||||||
string title;
|
string title;
|
||||||
if (storedResearch != null)
|
if (storedResearch != null)
|
||||||
{
|
{
|
||||||
title = storedResearch.LabelCap.RawText ?? storedResearch.defName;
|
title = storedResearch.LabelCap.RawText ?? storedResearch.defName;
|
||||||
// 截断过长的标题
|
// 截断过长的标题(留出下拉箭头空间)
|
||||||
title = title.Truncate(innerRect.width - 4f);
|
title = title.Truncate(innerRect.width - 20f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
title = "ARA_ResearchProgress_NoProject".Translate();
|
title = "ARA_ResearchProgress_NoProject".Translate();
|
||||||
}
|
}
|
||||||
Widgets.Label(titleRect, title);
|
|
||||||
|
// 标题可点击
|
||||||
|
if (Mouse.IsOver(titleRect))
|
||||||
|
{
|
||||||
|
Widgets.DrawHighlight(titleRect);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Widgets.ButtonInvisible(titleRect))
|
||||||
|
{
|
||||||
|
reader.ShowResearchMenu();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 带下拉箭头的标题
|
||||||
|
GUI.color = new Color(0.7f, 0.9f, 1f);
|
||||||
|
Widgets.Label(titleRect, title + " ▼");
|
||||||
|
GUI.color = Color.white;
|
||||||
curY += 20f;
|
curY += 20f;
|
||||||
|
|
||||||
// === 第二行:状态信息 ===
|
// === 第二行:状态信息 ===
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ namespace ArachnaeSwarm
|
|||||||
/// <summary>移除指定索引的订单</summary>
|
/// <summary>移除指定索引的订单</summary>
|
||||||
void RemoveOrderByIndex(int index);
|
void RemoveOrderByIndex(int index);
|
||||||
|
|
||||||
|
/// <summary>呼叫幼虫</summary>
|
||||||
|
void CallLarvaForGizmo();
|
||||||
|
|
||||||
/// <summary>Gizmo 滚动位置(用于多订单时)</summary>
|
/// <summary>Gizmo 滚动位置(用于多订单时)</summary>
|
||||||
float GizmoScrollPosition { get; set; }
|
float GizmoScrollPosition { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user