对话框面板

This commit is contained in:
taosuqi 2024-08-16 18:08:09 +08:00
parent 520b72986c
commit 3f9b5524a8
10 changed files with 1795 additions and 977 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -69,7 +69,7 @@ MonoBehaviour:
m_text: "\u8BA1\u91CF\u88C5\u7F6E\u8F6E\u6362" m_text: "\u8BA1\u91CF\u88C5\u7F6E\u8F6E\u6362"
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: f8ef5cb2ab4d4da4093d3fe60f978c99, type: 2} m_fontAsset: {fileID: 11400000, guid: f8ef5cb2ab4d4da4093d3fe60f978c99, type: 2}
m_sharedMaterial: {fileID: 7379424646034793120, guid: f8ef5cb2ab4d4da4093d3fe60f978c99, type: 2} m_sharedMaterial: {fileID: -4829118149068189727, guid: f8ef5cb2ab4d4da4093d3fe60f978c99, type: 2}
m_fontSharedMaterials: [] m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0} m_fontMaterial: {fileID: 0}
m_fontMaterials: [] m_fontMaterials: []

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: ca0f341d0b1b2cb479ab9f2ac2d115d3 guid: e1c65a5761735064cac2dc1acb28a1a5
PrefabImporter: PrefabImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@ -36,7 +36,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 185.77551, y: -109.97} m_AnchoredPosition: {x: 186, y: -110}
m_SizeDelta: {x: 140.2748, y: 43.657} m_SizeDelta: {x: 140.2748, y: 43.657}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!222 &49510012 --- !u!222 &49510012
@ -157,7 +157,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 26.199463, y: -109.974365} m_AnchoredPosition: {x: 26, y: -108}
m_SizeDelta: {x: 139.6921, y: 43.6528} m_SizeDelta: {x: 139.6921, y: 43.6528}
m_Pivot: {x: 0, y: 1} m_Pivot: {x: 0, y: 1}
--- !u!222 &402120150 --- !u!222 &402120150
@ -369,11 +369,11 @@ RectTransform:
m_Father: {fileID: 105569939733545126} m_Father: {fileID: 105569939733545126}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: -783.88, y: 4.2672} m_AnchoredPosition: {x: 26, y: -172}
m_SizeDelta: {x: 299.86, y: 722.7639} m_SizeDelta: {x: 300, y: 724}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0, y: 1}
--- !u!222 &2127448646759749463 --- !u!222 &2127448646759749463
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -709,7 +709,6 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_processItem: {fileID: 0} _processItem: {fileID: 0}
_subProcessItem: {fileID: 0}
_content: {fileID: 6938315256435242855} _content: {fileID: 6938315256435242855}
--- !u!1 &7828491511771849252 --- !u!1 &7828491511771849252
GameObject: GameObject:

View File

@ -529,7 +529,8 @@ RectTransform:
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0} m_LocalScale: {x: 0, y: 0, z: 0}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: [] m_Children:
- {fileID: 1637121948}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -538,3 +539,113 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0} m_Pivot: {x: 0, y: 0}
--- !u!224 &1637121948 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
m_PrefabInstance: {fileID: 8169459106856285915}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8169459106856285915
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1460101715}
m_Modifications:
- target: {fileID: 1007992946085938808, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_text
value: "\u6211\u662Fxxx\u4F9B\u7535\u6240\u4EBA\u5458\uFF0C\u5230xxx\u5730\u65B9\u5F00\u5C55\u7ECF\u4E92\u611F\u5668\u63A5\u5165\u5F0F\u4F4E\u538B\u7535\u80FD\u8BA1\u91CF\u88C5\u7F6E\u5B89\u88C5\u4F5C\u4E1A\u3002"
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_AnchorMax.x
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_AnchorMax.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_SizeDelta.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_SizeDelta.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2593408648689179035, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3836442360969627084, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: TypeTime
value: 5
objectReference: {fileID: 0}
- target: {fileID: 6120619673790644657, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}
propertyPath: m_Name
value: UI_SessionPanel
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e1c65a5761735064cac2dc1acb28a1a5, type: 3}

View File

@ -35,7 +35,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 29.3965, y: -0.000077903} m_AnchoredPosition: {x: 29.3965, y: -0.000078201294}
m_SizeDelta: {x: 291.205, y: 50} m_SizeDelta: {x: 291.205, y: 50}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5857752454484495482 --- !u!222 &5857752454484495482
@ -93,10 +93,10 @@ MonoBehaviour:
m_faceColor: m_faceColor:
serializedVersion: 2 serializedVersion: 2
rgba: 4294967295 rgba: 4294967295
m_fontSize: 29.25 m_fontSize: 22
m_fontSizeBase: 36 m_fontSizeBase: 22
m_fontWeight: 400 m_fontWeight: 400
m_enableAutoSizing: 1 m_enableAutoSizing: 0
m_fontSizeMin: 4.47 m_fontSizeMin: 4.47
m_fontSizeMax: 50.85 m_fontSizeMax: 50.85
m_fontStyle: 0 m_fontStyle: 0
@ -244,8 +244,8 @@ RectTransform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: -784.7, y: -513.9} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 350, y: 50} m_SizeDelta: {x: 350, y: 50}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0, y: 0}

View File

@ -90,6 +90,7 @@ public abstract class BaseToolOrDevice : MonoBehaviour
if (GameManager.RunModelMgr.SceneType != E_SceneType.ToolRoom) return; if (GameManager.RunModelMgr.SceneType != E_SceneType.ToolRoom) return;
if (EventSystem.current.IsPointerOverGameObject()) return; if (EventSystem.current.IsPointerOverGameObject()) return;
OnDown(); OnDown();
UIManager.Instance.HidePanel<ItemTips>();//提示面板
//gameObject.SetActive(false); //gameObject.SetActive(false);
} }

View File

@ -1,9 +1,11 @@
using System.Collections;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
public class UI_SessionPanel : BasePanel public class UI_SessionPanel : BasePanel
{ {
public float TypeTime =0.1f;
private void Start() private void Start()
{ {
Debug.Log("1111111"); Debug.Log("1111111");
@ -11,10 +13,11 @@ public class UI_SessionPanel : BasePanel
/// <summary> /// <summary>
/// 初始化 /// 初始化
/// </summary> /// </summary>
//public void Init(string content) public void Init()
//{ {
// GetControl<TextMeshProUGUI>("Text_DialogBox").text = content;//在开始时给content赋值 //GetControl<TextMeshProUGUI>("PlayerText_DialogBox").text = "我是xxx供电所人员到xxx地方开展经互感器接入式低压电能计量装置安装作业。";//在开始时给content赋值
//} StartCoroutine(Typing(GetControl<TextMeshProUGUI>("PlayerText_DialogBox").text = "我是xxx供电所人员到xxx地方开展经互感器接入式低压电能计量装置安装作业。"));
}
public override void ShowMe() public override void ShowMe()
{ {
@ -24,7 +27,18 @@ public class UI_SessionPanel : BasePanel
{ {
} }
IEnumerator Typing(string content)
{
GetControl<TextMeshProUGUI>(content).text = string.Empty;
string strTemp = string.Empty;
for (int i = 0; i < GetControl<TextMeshProUGUI>(content).text.Length; i++)
{
yield return new WaitForSeconds(TypeTime);
strTemp += GetControl<TextMeshProUGUI>(content).text[i];
GetControl<TextMeshProUGUI>(content).text = strTemp;
}
}
/// <summary> /// <summary>
/// 按钮点击 /// 按钮点击
/// </summary> /// </summary>
@ -33,15 +47,20 @@ public class UI_SessionPanel : BasePanel
{ {
switch (btnName) switch (btnName)
{ {
case "ContinueBtn": case "PlayerContinueBtn":
Debug.Log("点击继续按钮"); Debug.Log("点击继续按钮");
GetControl<Button>("ContinueBtn").gameObject.SetActive(false); GetControl<Image>("PlayerSessionPanel").gameObject.SetActive(false);
GetControl<Button>("CloseBtn").gameObject.SetActive(true); GetControl<Image>("ClientSessionPanel").gameObject.SetActive(true);
GetControl<TextMeshProUGUI>("Text_DialogBox").text = "你好我是xx供电公司员工这是我的工作证。现在我们要对贵户高压电能计量装置进行安装"; //StartCoroutine(Typing("好的"));
GetControl<TextMeshProUGUI>("ClientText_DialogBox").text = "好的";
break; break;
case "CloseBtn": case "ClientContinueBtn":
this.gameObject.SetActive(false); this.gameObject.SetActive(false);
break; break;
//case "CloseBtn":
// this.gameObject.SetActive(false);
// break;
} }
} }
} }