lzx 2 天之前
父節點
當前提交
304199652d

+ 171 - 6
Assets/Res/UI/DivineSence/ShengShiEventWidget.prefab

@@ -130,6 +130,7 @@ RectTransform:
   m_Children:
   - {fileID: 2569128129379278262}
   - {fileID: 7926538923124969525}
+  - {fileID: 5756912092956138666}
   - {fileID: 7725117982298227658}
   - {fileID: 5228474193845945166}
   m_Father: {fileID: 0}
@@ -309,6 +310,107 @@ MonoBehaviour:
   m_OnClick:
     m_PersistentCalls:
       m_Calls: []
+--- !u!1 &1379751428497380242
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 7
+  m_Component:
+  - component: {fileID: 5756912092956138666}
+  - component: {fileID: 3616928138258849069}
+  - component: {fileID: 1283235113617953110}
+  - component: {fileID: 6324131941511215942}
+  m_Layer: 5
+  m_HasEditorInfo: 1
+  m_Name: Massge (1)
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 0
+--- !u!224 &5756912092956138666
+RectTransform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1379751428497380242}
+  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 8599819629026832582}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 1, y: 0.5}
+  m_AnchorMax: {x: 1, y: 0.5}
+  m_AnchoredPosition: {x: 110, y: -15.199951}
+  m_SizeDelta: {x: 23.099396, y: 30}
+  m_Pivot: {x: 1, y: 0.5}
+--- !u!222 &3616928138258849069
+CanvasRenderer:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1379751428497380242}
+  m_CullTransparentMesh: 1
+--- !u!114 &1283235113617953110
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1379751428497380242}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Material: {fileID: 0}
+  m_Color: {r: 0.45098042, g: 0.43529415, b: 0.39607847, a: 1}
+  m_RaycastTarget: 1
+  m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
+  m_Maskable: 1
+  m_OnCullStateChanged:
+    m_PersistentCalls:
+      m_Calls: []
+  m_FontData:
+    m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
+    m_FontSize: 22
+    m_FontStyle: 0
+    m_BestFit: 0
+    m_MinSize: 1
+    m_MaxSize: 40
+    m_Alignment: 3
+    m_AlignByGeometry: 0
+    m_RichText: 1
+    m_HorizontalOverflow: 0
+    m_VerticalOverflow: 0
+    m_LineSpacing: 1
+  m_Text: ...
+--- !u!114 &6324131941511215942
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1379751428497380242}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_IgnoreLayout: 1
+  m_MinWidth: -1
+  m_MinHeight: -1
+  m_PreferredWidth: -1
+  m_PreferredHeight: -1
+  m_FlexibleWidth: -1
+  m_FlexibleHeight: -1
+  m_LayoutPriority: 1
 --- !u!1 &2132268725135064903
 GameObject:
   m_ObjectHideFlags: 0
@@ -565,6 +667,9 @@ GameObject:
   - component: {fileID: 7725117982298227658}
   - component: {fileID: 464927802296640676}
   - component: {fileID: 1326197565086495762}
+  - component: {fileID: 3876351265721522071}
+  - component: {fileID: 2222830019858827579}
+  - component: {fileID: 5529441806350073449}
   m_Layer: 5
   m_HasEditorInfo: 1
   m_Name: Massge
@@ -587,11 +692,11 @@ RectTransform:
   m_Children: []
   m_Father: {fileID: 8599819629026832582}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0.5, y: 0.5}
-  m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 71.85443, y: -15}
-  m_SizeDelta: {x: 226.4912, y: 30}
-  m_Pivot: {x: 0.5, y: 0.5}
+  m_AnchorMin: {x: 0, y: 0.5}
+  m_AnchorMax: {x: 0, y: 0.5}
+  m_AnchoredPosition: {x: 7.5, y: -15.2}
+  m_SizeDelta: {x: 216.9298, y: 30}
+  m_Pivot: {x: 0, y: 0.5}
 --- !u!222 &464927802296640676
 CanvasRenderer:
   m_ObjectHideFlags: 0
@@ -633,4 +738,64 @@ MonoBehaviour:
     m_HorizontalOverflow: 0
     m_VerticalOverflow: 0
     m_LineSpacing: 1
-  m_Text: "\u4E00\u4E2A\u8001\u5934\u6B63\u5728\u6CB3\u8FB9"
+  m_Text: "\u4E00\u4E2A\u8001\u5934\u6B63\u5728\u6CB3\u8FB9..."
+--- !u!114 &3876351265721522071
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7222460974042505386}
+  m_Enabled: 0
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_IgnoreLayout: 0
+  m_MinWidth: -1
+  m_MinHeight: -1
+  m_PreferredWidth: -1
+  m_PreferredHeight: -1
+  m_FlexibleWidth: 178.3554
+  m_FlexibleHeight: -1
+  m_LayoutPriority: 1
+--- !u!114 &2222830019858827579
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7222460974042505386}
+  m_Enabled: 0
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_HorizontalFit: 2
+  m_VerticalFit: 0
+--- !u!114 &5529441806350073449
+MonoBehaviour:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 7222460974042505386}
+  m_Enabled: 0
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  m_Padding:
+    m_Left: 0
+    m_Right: 0
+    m_Top: 0
+    m_Bottom: 0
+  m_ChildAlignment: 0
+  m_Spacing: 0
+  m_ChildForceExpandWidth: 1
+  m_ChildForceExpandHeight: 1
+  m_ChildControlWidth: 0
+  m_ChildControlHeight: 0
+  m_ChildScaleWidth: 0
+  m_ChildScaleHeight: 0
+  m_ReverseArrangement: 0

+ 7 - 1
Assets/Scripts/GameUI/UI/CombatPanel/ShengShiEventWidget.cs

@@ -44,7 +44,13 @@ namespace Fort23.Mono
             Text_Name.text = LanguageManager.Instance.Text(randomEventConfig.Description);
 
             EventConditionConfig conditionConfig = ConfigComponent.Instance.Get<EventConditionConfig>(randomEventConfig.EventBeginId);
-            Massge.text = LanguageManager.Instance.Text(conditionConfig.LanID[0]);
+            string desc = LanguageManager.Instance.Text(conditionConfig.LanID[0]);
+            if (desc.Length > 8)
+            {
+                desc = desc.Substring(0, 8);
+                desc += "...";
+            }
+            Massge.text = LanguageManager.Instance.Text(desc);
         }
     }
 }