diff --git a/1.6/1.6/Assemblies/WulaFallenEmpire.dll b/1.6/1.6/Assemblies/WulaFallenEmpire.dll index 3078d041..9f243bd7 100644 Binary files a/1.6/1.6/Assemblies/WulaFallenEmpire.dll and b/1.6/1.6/Assemblies/WulaFallenEmpire.dll differ diff --git a/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml b/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml index 5531a657..bf5b83d3 100644 --- a/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml +++ b/1.6/1.6/Defs/EventDefs/EventDef_Wula/Wula_MainEvent.xml @@ -11,14 +11,28 @@
  • 早在这些生物的祖先还在有机汤里面翻滚时,我们就已经是这个银河系的霸主了——以前如此,今后也会如此。
  • 一般来说,我们并不喜欢暴力和流血冲突,如果这些星系的原住民能更配合点就好了。
  • + +
  • + + +
  • + Wula_Goodwill_To_PIA +
  • +
  • + Wula_PIA_Legion_Faction + Wula_Goodwill_To_PIA +
  • + + +
  • - - true - (255,255,255,255) + +
  • @@ -28,8 +42,16 @@
  • - - true + + 殖民地的表现让P.I.A相当不满意,不会为殖民地派出任何额外增援 + +
  • + Wula_Goodwill_To_PIA + -75 +
  • + + false + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -46,8 +68,15 @@
  • - - true + + true + +
  • + Wula_Reinforcement_From_PIA_Level + 1 +
  • + + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -65,7 +94,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -109,6 +138,11 @@ 0 Int
  • +
  • + Wula_Reinforcement_From_PIA_Level + 1 + Int +
  • @@ -144,7 +178,7 @@
  • - + 你们不会自己去造吗? false @@ -187,7 +221,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -213,20 +247,6 @@
  • 原来是来要钱的嘛···我可以给你们调拨一轮紧急资金,但是这是有限的,并且仅能作殖民地发展之用。\n\n话说回来,你们真的缺钱吗,我怎么有点不信?
  • - -
  • - - -
  • - Wula_Goodwill_To_PIA -
  • -
  • - Wula_PIA_Legion_Faction - Wula_Goodwill_To_PIA -
  • - - -
  • @@ -259,6 +279,85 @@
  • +
  • + + true + +
  • + Wula_Reinforcement_From_PIA_Level + 1 +
  • + + +
  • + +
  • + Wula_UI_Legion_31A +
  • +
  • + +
  • +
    + +
  • + + +
  • + +
  • + Wula_UI_Legion_1 +
  • +
  • + +
  • + + +
    + + + Wula_UI_Legion_31A + + Wula/Events/Portraits/WULA_Legion_5 + 「军团」,P.I.A + +
  • 很具体的要求,看起来你们是遇到了一点零件大危机?我空投一些给你们吧,但是要记住免费的零部件可不会老是从天上掉下来。
  • +
    + +
  • + + 殖民地的表现让P.I.A相当不满意,不会为殖民地派出任何额外增援 + false + +
  • + Wula_Goodwill_To_PIA + -75 +
  • + + +
  • + +
  • + ComponentIndustrial + 30 +
  • +
  • + ComponentSpacer + 4 +
  • +
  • + Wula_Has_Receive_Silver_From_PIA + 1 + Add +
  • +
  • + P.I.A的紧急物资已经空投(30零部件4高级零部件) + PositiveEvent +
  • +
  • + +
  • +
    +
  • @@ -282,20 +381,6 @@
  • 唔,现在我手上确实有一台乌拉帝国合成人还没有分配殖民地,你们需要的话可以划拨给你们。但是下次你们得记得自己造——造合成人的材料是要花项目资金的。
  • - -
  • - - -
  • - Wula_Goodwill_To_PIA -
  • -
  • - Wula_PIA_Legion_Faction - Wula_Goodwill_To_PIA -
  • - - -
  • @@ -327,6 +412,88 @@
  • +
  • + + true + +
  • + Wula_Reinforcement_From_PIA_Level + 1 +
  • + + +
  • + +
  • + Wula_UI_Legion_32A +
  • +
  • + +
  • +
    + +
  • + + +
  • + +
  • + Wula_UI_Legion_1 +
  • +
  • + +
  • + + +
    +
    + + Wula_UI_Legion_32A + + Wula/Events/Portraits/WULA_Legion_5 + 「军团」,P.I.A + +
  • 缺廉价劳动力吗?那我把手边的乌拉猫猫都扔下去吧,应该有十来只,够你们用的了。
  • +
    + +
  • + + 殖民地的表现让P.I.A相当不满意,不会为殖民地派出任何额外增援 + false + +
  • + Wula_Goodwill_To_PIA + -75 +
  • + + +
  • + +
  • + Mech_WULA_Cat_Constructor + 3 + true +
  • +
  • + Mech_WULA_Cat_Assault + 3 + true +
  • +
  • + Mech_WULA_Cat + 3 + true +
  • +
  • + Wula_Has_Receive_MechWula_From_PIA + 1 + Add +
  • +
  • + +
  • +
    +
  • @@ -350,20 +517,6 @@
  • 遇到麻烦了?我可以把手上的特遣队丢下去,你们记得找好掩体。
  • - -
  • - - -
  • - Wula_Goodwill_To_PIA -
  • -
  • - Wula_PIA_Legion_Faction - Wula_Goodwill_To_PIA -
  • - - -
  • @@ -404,6 +557,89 @@
  • +
  • + + true + +
  • + Wula_Reinforcement_From_PIA_Level + 1 +
  • + + +
  • + +
  • + Wula_UI_Legion_33A +
  • +
  • + +
  • +
    + +
  • + + +
  • + +
  • + Wula_UI_Legion_1 +
  • +
  • + +
  • + + +
    +
    + + Wula_UI_Legion_33A + + Wula/Events/Portraits/WULA_Legion_1 + 「军团」,P.I.A + +
  • 你们要申请重装部队支援?倒也可以,她们的人数比冲锋队少很多,但是都是精锐部队——小心别被她们的迫击炮炸到。
  • +
    + +
  • + + 殖民地的表现让P.I.A相当不满意,不会为殖民地派出任何额外增援 + false + +
  • + Wula_Goodwill_To_PIA + -75 +
  • + + +
  • + +
  • + Wula_Has_Receive_Reinforcement_From_PIA + 1 + Add +
  • +
  • + 4000 + Wula_PIA_Legion_Faction + ImmediateAttackFriendly + EdgeDropGroups + Combat + +
  • + Combat + 100 + + 1 + +
  • + + +
  • + +
  • +
    +
  • @@ -433,7 +669,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) diff --git a/1.6/1.6/Defs/QuestScriptDefs/WULA_Base_Tex_Quest.xml b/1.6/1.6/Defs/QuestScriptDefs/WULA_Base_Tex_Quest.xml index c758ed6c..94269dd3 100644 --- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Base_Tex_Quest.xml +++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Base_Tex_Quest.xml @@ -209,7 +209,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) diff --git a/1.6/1.6/Defs/QuestScriptDefs/WULA_Colony_Promotion.xml b/1.6/1.6/Defs/QuestScriptDefs/WULA_Colony_Promotion.xml index a6699714..cb4137fc 100644 --- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Colony_Promotion.xml +++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Colony_Promotion.xml @@ -11,7 +11,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -29,7 +29,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -491,6 +491,10 @@
  • $promotionReward
  • +
  • + pickupShipThing.SentSatisfied + WULA_GiveQuest_Colony_Promotion_UI_2 +
  • Success true @@ -539,4 +543,51 @@ + + WULA_GiveQuest_Colony_Promotion_UI_2 + + Wula/Events/Portraits/WULA_Legion_2 + 「军团」,P.I.A + +
  • 看起来你们的殖民地还不错,井井有条并且符合帝国法典和章程——你们值得一个更高位的许可,稍后我会通过运输舱把晋升许可寄给你们。\n\n此外,我也将你们的支援系统重置了,你们可以再次申请之前申请过的支援,并且新的支援也会开放给你们。继续发展你们的殖民地,我就能帮你们申请更高级的权限。\n\n帝国荣光永存。
  • + + +
  • + +
  • + Wula_Has_Receive_Reinforcement_From_PIA +
  • +
  • + Wula_Has_Receive_MechWula_From_PIA +
  • +
  • + Wula_Has_Receive_Silver_From_PIA +
  • + +
  • + Wula_Reinforcement_From_PIA_Level + 1 + Add +
  • + + +
    + +
  • + + false + (255,255,255,255) + (157,201,185,195) + (255,255,255,255) + (255,255,255,255) + +
  • + +
  • + +
  • + + +
    +
    \ No newline at end of file diff --git a/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_NewColony.xml b/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_NewColony.xml index 5b6ec346..476d4bdd 100644 --- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_NewColony.xml +++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_NewColony.xml @@ -59,7 +59,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -77,7 +77,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -95,7 +95,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -124,7 +124,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -142,7 +142,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -160,7 +160,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -189,7 +189,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -207,7 +207,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -236,7 +236,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -254,7 +254,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -283,7 +283,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -301,7 +301,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -330,7 +330,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -348,7 +348,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -366,7 +366,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -395,7 +395,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) diff --git a/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_Spy.xml b/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_Spy.xml index 0a9836fe..d2242a58 100644 --- a/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_Spy.xml +++ b/1.6/1.6/Defs/QuestScriptDefs/WULA_Intro_Spy.xml @@ -417,7 +417,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -435,7 +435,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -453,7 +453,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -479,7 +479,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -508,7 +508,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -537,7 +537,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) @@ -594,7 +594,7 @@
  • - true + false (255,255,255,255) (157,201,185,195) (255,255,255,255) diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_1.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_1.png index f944e2a3..95d16cfb 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_1.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_1.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_2.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_2.png index 8038154f..e23f6ae5 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_2.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_2.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_3.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_3.png index 3d411adb..03c4f405 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_3.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_3.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_4.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_4.png index 3d2fa5de..54de0db6 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_4.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_4.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_5.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_5.png index 0eab78ba..3a0dcf68 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_5.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_5.png differ diff --git a/Content/Textures/Wula/Events/Portraits/WULA_Legion_6.png b/Content/Textures/Wula/Events/Portraits/WULA_Legion_6.png index 6e7ebfaa..5be4b452 100644 Binary files a/Content/Textures/Wula/Events/Portraits/WULA_Legion_6.png and b/Content/Textures/Wula/Events/Portraits/WULA_Legion_6.png differ diff --git a/Content/Textures/Wula/Events/tile_large_bg.png b/Content/Textures/Wula/Events/tile_large_bg.png index 584c1529..62cfee46 100644 Binary files a/Content/Textures/Wula/Events/tile_large_bg.png and b/Content/Textures/Wula/Events/tile_large_bg.png differ diff --git a/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs b/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs index 2c09e8d5..6df07b47 100644 --- a/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs +++ b/Source/WulaFallenEmpire/EventSystem/Dialog_CustomDisplay.cs @@ -27,6 +27,190 @@ namespace WulaFallenEmpire } } + // 新增:自定义按钮样式设置 + private static readonly Color CustomButtonNormalColor = new Color(0.5f, 0.2f, 0.2f, 1f); + private static readonly Color CustomButtonHoverColor = new Color(0.6f, 0.3f, 0.3f, 1f); + private static readonly Color CustomButtonDisabledColor = new Color(0.15f, 0.15f, 0.15f, 0.6f); + + private static readonly Color CustomButtonTextNormalColor = new Color(0.9f, 0.9f, 0.9f, 1f); + private static readonly Color CustomButtonTextHoverColor = new Color(1f, 1f, 1f, 1f); + private static readonly Color CustomButtonTextDisabledColor = new Color(0.6f, 0.6f, 0.6f, 1f); + // 绘制单个选项 - 使用自定义样式 + private void DrawSingleOption(Rect rect, EventOption option) + { + string reason; + bool conditionsMet = AreConditionsMet(option.conditions, out reason); + + // 水平居中选项 + float optionWidth = Mathf.Min(rect.width, Config.optionSize.x * (rect.width / Config.windowSize.x)); + float optionX = rect.x + (rect.width - optionWidth) / 2; + Rect optionRect = new Rect(optionX, rect.y, optionWidth, rect.height); + // 保存原始状态 + Color originalColor = GUI.color; + GameFont originalFont = Text.Font; + Color originalTextColor = GUI.contentColor; + TextAnchor originalAnchor = Text.Anchor; + try + { + // 设置文本居中 + Text.Anchor = TextAnchor.MiddleCenter; + Text.Font = GameFont.Small; + if (conditionsMet) + { + // 启用状态的选项 - 使用自定义样式 + if (option.useCustomColors) + { + // 使用选项自定义颜色 + DrawCustomButtonWithColors(optionRect, option.label.Translate(), option); + } + else + { + // 使用默认自定义颜色 + DrawCustomButton(optionRect, option.label.Translate(), isEnabled: true); + } + // 添加点击处理 + if (Widgets.ButtonInvisible(optionRect)) + { + HandleAction(option.optionEffects); + } + } + else + { + // 禁用状态的选项 - 使用自定义禁用样式 + if (option.useCustomColors && option.disabledColor.HasValue) + { + // 使用选项自定义禁用颜色 + DrawCustomButtonWithColors(optionRect, option.label.Translate(), option, isEnabled: false); + } + else + { + // 使用默认自定义禁用颜色 + DrawCustomButton(optionRect, option.label.Translate(), isEnabled: false); + } + // 添加禁用提示 + TooltipHandler.TipRegion(optionRect, GetDisabledReason(option, reason).Translate()); + } + } + finally + { + // 恢复原始状态 + GUI.color = originalColor; + Text.Font = originalFont; + GUI.contentColor = originalTextColor; + Text.Anchor = originalAnchor; + } + } + /// + /// 绘制自定义按钮(基础版本) + /// + private void DrawCustomButton(Rect rect, string label, bool isEnabled = true) + { + bool isMouseOver = Mouse.IsOver(rect); + + // 确定按钮状态颜色 + Color buttonColor, textColor; + + if (!isEnabled) + { + // 禁用状态 + buttonColor = CustomButtonDisabledColor; + textColor = CustomButtonTextDisabledColor; + } + else if (isMouseOver) + { + // 悬停状态 + buttonColor = CustomButtonHoverColor; + textColor = CustomButtonTextHoverColor; + } + else + { + // 正常状态 + buttonColor = CustomButtonNormalColor; + textColor = CustomButtonTextNormalColor; + } + // 绘制按钮背景 + GUI.color = buttonColor; + Widgets.DrawBoxSolid(rect, buttonColor); + + // 绘制边框 + if (isEnabled) + { + Widgets.DrawBox(rect, 1); + } + else + { + // 禁用状态的边框更细更暗 + Widgets.DrawBox(rect, 1); + } + // 绘制文本 + GUI.color = textColor; + Text.Anchor = TextAnchor.MiddleCenter; + Widgets.Label(rect.ContractedBy(4f), label); + + // 如果是禁用状态,添加删除线效果 + if (!isEnabled) + { + GUI.color = new Color(0.6f, 0.6f, 0.6f, 0.8f); + Widgets.DrawLine( + new Vector2(rect.x + 10f, rect.center.y), + new Vector2(rect.xMax - 10f, rect.center.y), + GUI.color, + 1f + ); + } + } + /// + /// 绘制自定义按钮(使用选项自定义颜色) + /// + private void DrawCustomButtonWithColors(Rect rect, string label, EventOption option, bool isEnabled = true) + { + bool isMouseOver = Mouse.IsOver(rect); + + // 确定按钮状态颜色 + Color buttonColor, textColor; + + if (!isEnabled) + { + // 禁用状态 + buttonColor = option.disabledColor ?? CustomButtonDisabledColor; + textColor = option.textDisabledColor ?? CustomButtonTextDisabledColor; + } + else if (isMouseOver) + { + // 悬停状态 + buttonColor = option.hoverColor ?? CustomButtonHoverColor; + textColor = option.textHoverColor ?? CustomButtonTextHoverColor; + } + else + { + // 正常状态 + buttonColor = option.normalColor ?? CustomButtonNormalColor; + textColor = option.textColor ?? CustomButtonTextNormalColor; + } + // 绘制按钮背景 + GUI.color = buttonColor; + Widgets.DrawBoxSolid(rect, buttonColor); + + // 绘制边框 + Widgets.DrawBox(rect); + // 绘制文本 + GUI.color = textColor; + Text.Anchor = TextAnchor.MiddleCenter; + Widgets.Label(rect.ContractedBy(4f), label); + + // 如果是禁用状态,添加删除线效果 + if (!isEnabled) + { + GUI.color = new Color(0.6f, 0.6f, 0.6f, 0.8f); + Widgets.DrawLine( + new Vector2(rect.x + 10f, rect.center.y), + new Vector2(rect.xMax - 10f, rect.center.y), + GUI.color, + 1f + ); + } + } + // 使用配置的窗口尺寸 public override Vector2 InitialSize { @@ -342,90 +526,6 @@ namespace WulaFallenEmpire } } } - // 绘制单个选项 - 增强版本(修复版本) - private void DrawSingleOption(Rect rect, EventOption option) - { - string reason; - bool conditionsMet = AreConditionsMet(option.conditions, out reason); - // 水平居中选项 - float optionWidth = Mathf.Min(rect.width, Config.optionSize.x * (rect.width / Config.windowSize.x)); - float optionX = rect.x + (rect.width - optionWidth) / 2; - Rect optionRect = new Rect(optionX, rect.y, optionWidth, rect.height); - if (conditionsMet) - { - // 保存原始状态 - Color originalColor = GUI.color; - GameFont originalFont = Text.Font; - Color originalTextColor = GUI.contentColor; - TextAnchor originalAnchor = Text.Anchor; - try - { - // 应用自定义颜色 - if (option.useCustomColors) - { - ApplyOptionColors(option, optionRect); - } - // 设置文本居中 - Text.Anchor = TextAnchor.MiddleCenter; - - if (Widgets.ButtonText(optionRect, option.label.Translate())) - { - HandleAction(option.optionEffects); - } - } - finally - { - // 恢复原始状态 - GUI.color = originalColor; - Text.Font = originalFont; - GUI.contentColor = originalTextColor; - Text.Anchor = originalAnchor; - } - } - else - { - // 禁用状态的选项 - 修复版本 - Color originalColor = GUI.color; - GameFont originalFont = Text.Font; - Color originalTextColor = GUI.contentColor; - TextAnchor originalAnchor = Text.Anchor; - try - { - // 设置禁用状态的颜色 - GUI.color = new Color(0.85f, 0.85f, 0.85f, 1f); - GUI.contentColor = new Color(0.85f, 0.85f, 0.85f, 1f); - Text.Font = GameFont.Small; - // 修复:使用正确的 DrawBoxSolid 方法 - Widgets.DrawBoxSolid(optionRect, new Color(0.2f, 0.2f, 0.2f, 0.3f)); - Widgets.DrawBox(optionRect); - // 设置文本居中 - Text.Anchor = TextAnchor.MiddleCenter; - // 绘制居中的文本 - Rect textRect = optionRect.ContractedBy(4f); - Widgets.Label(textRect, option.label.Translate()); - // 可选:在文本上添加删除线效果 - if (Config.drawBorders) - { - // 修复:使用正确的 DrawLine 方法 - Widgets.DrawLine( - new Vector2(textRect.x, textRect.center.y), - new Vector2(textRect.xMax, textRect.center.y), - Color.gray, - 1f - ); - } - TooltipHandler.TipRegion(optionRect, GetDisabledReason(option, reason).Translate()); - } - finally - { - // 恢复原始状态 - GUI.color = originalColor; - Text.Font = originalFont; - GUI.contentColor = originalTextColor; - Text.Anchor = originalAnchor; - } - } - } // 应用选项颜色 private void ApplyOptionColors(EventOption option, Rect rect) { diff --git a/Source/WulaFallenEmpire/EventSystem/EventUIButtonConfigDef.cs b/Source/WulaFallenEmpire/EventSystem/EventUIButtonConfigDef.cs new file mode 100644 index 00000000..8fe2eb7b --- /dev/null +++ b/Source/WulaFallenEmpire/EventSystem/EventUIButtonConfigDef.cs @@ -0,0 +1,68 @@ +using UnityEngine; +using Verse; + +namespace WulaFallenEmpire +{ + public class EventUIButtonConfigDef : Def + { + // ===== 基础按钮颜色设置 ===== + public Color normalColor = new Color(0.5f, 0.2f, 0.2f, 1f); + public Color hoverColor = new Color(0.6f, 0.3f, 0.3f, 1f); + public Color activeColor = new Color(0.4f, 0.4f, 0.4f, 1f); + public Color disabledColor = new Color(0.15f, 0.15f, 0.15f, 0.6f); + + // ===== 文本颜色设置 ===== + public Color textNormalColor = new Color(0.9f, 0.9f, 0.9f, 1f); + public Color textHoverColor = new Color(1f, 1f, 1f, 1f); + public Color textActiveColor = new Color(1f, 1f, 1f, 1f); + public Color textDisabledColor = new Color(0.6f, 0.6f, 0.6f, 1f); + + // ===== 边框设置 ===== + public bool drawBorder = true; + public Color borderColor = new Color(0.6f, 0.2f, 0.2f, 1f); + public int borderWidth = 1; + + // ===== 效果设置 ===== + public bool showDisabledStrikethrough = true; + public Color strikethroughColor = new Color(0.6f, 0.6f, 0.6f, 0.8f); + public float strikethroughWidth = 1f; + + // ===== 圆角设置 ===== + public bool useRoundedCorners = true; + public float cornerRadius = 5f; + + // ===== 阴影设置 ===== + public bool drawShadow = false; + public Color shadowColor = new Color(0f, 0f, 0f, 0.5f); + public Vector2 shadowOffset = new Vector2(2f, 2f); + + // ===== 动画设置 ===== + public bool enableHoverAnimation = false; + public float hoverScaleFactor = 1.02f; + public float animationDuration = 0.1f; + + // ===== 字体设置 ===== + public GameFont buttonFont = GameFont.Small; + public bool useCustomFont = false; + public string customFontPath; + + // ===== 获取配置实例 ===== + private static EventUIButtonConfigDef config; + public static EventUIButtonConfigDef Config + { + get + { + if (config == null) + { + config = DefDatabase.GetNamed("Wula_EventUIButtonConfig"); + if (config == null) + { + // 创建默认配置 + config = new EventUIButtonConfigDef(); + } + } + return config; + } + } + } +} diff --git a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj index c3279e8a..994afeb9 100644 --- a/Source/WulaFallenEmpire/WulaFallenEmpire.csproj +++ b/Source/WulaFallenEmpire/WulaFallenEmpire.csproj @@ -125,6 +125,7 @@ + diff --git a/美术与文本源文件/Wula/Storyteller/tile_large_bg.png b/美术与文本源文件/Wula/Storyteller/tile_large_bg.png new file mode 100644 index 00000000..62cfee46 Binary files /dev/null and b/美术与文本源文件/Wula/Storyteller/tile_large_bg.png differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/WULA_Legion_1.sai2 b/美术与文本源文件/Wula/Storyteller/军团/WULA_Legion_1.sai2 index 0a31f181..6d3f2788 100644 Binary files a/美术与文本源文件/Wula/Storyteller/军团/WULA_Legion_1.sai2 and b/美术与文本源文件/Wula/Storyteller/军团/WULA_Legion_1.sai2 differ diff --git a/美术与文本源文件/Wula/Storyteller/军团/WULA_Legion_Bg.png b/美术与文本源文件/Wula/Storyteller/军团/WULA_Legion_Bg.png new file mode 100644 index 00000000..c6dc9668 Binary files /dev/null and b/美术与文本源文件/Wula/Storyteller/军团/WULA_Legion_Bg.png differ