done ui info
This commit is contained in:
@@ -8543,10 +8543,102 @@ PrefabInstance:
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 2825516843822704547, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3959004304404627642, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3959004304404627642, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3959004304404627642, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3959004304404627642, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5330897987501731450, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5330897987501731450, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5330897987501731450, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5330897987501731450, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6238266639003596740, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: SkillUI
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6238266639003596740, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_IsActive
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6375080618180806221, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6375080618180806221, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6375080618180806221, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 83.16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6375080618180806221, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -162.18411
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8029283128219612690, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8029283128219612690, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8029283128219612690, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 83.16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8029283128219612690, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -292.4765
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8302858527499935758, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 28
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9102658109286783788, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9102658109286783788, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9102658109286783788, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 83.16
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9102658109286783788, guid: b78469eadfa272c4f8fee4c8cae4b26f, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: -48.51895
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
|
||||
@@ -39,3 +39,5 @@ MonoBehaviour:
|
||||
prefab: {fileID: 6310702841431484757, guid: 6620f766cee7c8f4cb00dd457ac77675, type: 3}
|
||||
- id: Win_ArrangeTeam
|
||||
prefab: {fileID: 2452003196178065293, guid: 5a3e828efd5c542469d1f17565205ded, type: 3}
|
||||
- id: CDlgInfoTooltip
|
||||
prefab: {fileID: 6830833846243993097, guid: 97dd1de3aba08a04980849e40d5c1ea4, type: 3}
|
||||
|
||||
@@ -2,6 +2,7 @@ using BrewMonster;
|
||||
using BrewMonster.Common;
|
||||
using BrewMonster.Network;
|
||||
using BrewMonster.Scripts;
|
||||
using BrewMonster.Scripts.UI;
|
||||
using CSNetwork.GPDataType;
|
||||
using ModelRenderer.Scripts.GameData;
|
||||
using PerfectWorld.Scripts.Managers;
|
||||
@@ -26,9 +27,9 @@ namespace BrewMonster.Scripts.Managers
|
||||
[SerializeField] private GameObject detailPanelRoot;
|
||||
[SerializeField] private Vector2 detailPanelOffset = new Vector2(20f, 0f);
|
||||
[SerializeField] private bool hideDetailOnStart = true;
|
||||
[SerializeField] private TextOutlet nameText;
|
||||
[SerializeField] private TextOutlet descriptionText;
|
||||
[SerializeField] private TextOutlet extendedDescText;
|
||||
[SerializeField] private EC_UIUtility.TextOutlet nameText;
|
||||
[SerializeField] private EC_UIUtility.TextOutlet descriptionText;
|
||||
[SerializeField] private EC_UIUtility.TextOutlet extendedDescText;
|
||||
[SerializeField] private Button equipButton;
|
||||
[SerializeField] private Button dropButton;
|
||||
|
||||
@@ -952,61 +953,11 @@ namespace BrewMonster.Scripts.Managers
|
||||
}
|
||||
|
||||
// === Detail Panel Helpers ===
|
||||
[System.Serializable]
|
||||
private class TextOutlet
|
||||
{
|
||||
[SerializeField] public Text legacy;
|
||||
[SerializeField] public TMPro.TextMeshProUGUI tmp;
|
||||
// Note: TextOutlet has been moved to EC_UIUtility for reuse across the codebase
|
||||
|
||||
public void Set(string value)
|
||||
{
|
||||
if (legacy != null)
|
||||
{
|
||||
legacy.text = EC_Utility.FormatForLegacyText(value ?? string.Empty);
|
||||
}
|
||||
if (tmp != null)
|
||||
{
|
||||
tmp.text = FormatForTextMeshPro(value ?? string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set text with explicit formatting preference
|
||||
/// </summary>
|
||||
/// <param name="value">Raw text with formatting codes</param>
|
||||
/// <param name="preferTextMeshPro">Whether to prefer TextMeshPro formatting</param>
|
||||
public void SetFormatted(string value, bool preferTextMeshPro = true)
|
||||
{
|
||||
string formattedText = preferTextMeshPro ?
|
||||
FormatForTextMeshPro(value ?? string.Empty) :
|
||||
EC_Utility.FormatForLegacyText(value ?? string.Empty);
|
||||
|
||||
if (legacy != null)
|
||||
{
|
||||
legacy.text = formattedText;
|
||||
}
|
||||
if (tmp != null)
|
||||
{
|
||||
tmp.text = formattedText;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void RefreshLayout(GameObject gameObject)
|
||||
{
|
||||
var parent = gameObject.GetComponent<RectTransform>();
|
||||
|
||||
// Force Unity to rebuild layout immediately
|
||||
parent.ForceUpdateRectTransforms();
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(parent);
|
||||
}
|
||||
private void ShowDetailPanel(bool show)
|
||||
{
|
||||
if (detailPanelRoot != null)
|
||||
{
|
||||
detailPanelRoot.SetActive(show);
|
||||
RefreshLayout(detailPanelRoot);
|
||||
}
|
||||
EC_UIUtility.ShowPanel(detailPanelRoot, show);
|
||||
}
|
||||
|
||||
private Button GetButtonForSlot(byte package, int slot)
|
||||
@@ -1054,69 +1005,8 @@ namespace BrewMonster.Scripts.Managers
|
||||
return;
|
||||
}
|
||||
|
||||
var canvas = panelRect.GetComponentInParent<Canvas>();
|
||||
if (canvas == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var parentRect = panelRect.parent as RectTransform;
|
||||
if (parentRect == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Camera eventCamera = canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera;
|
||||
Vector3 worldCenter = buttonRect.TransformPoint(buttonRect.rect.center);
|
||||
Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint(eventCamera, worldCenter);
|
||||
Vector2 localPoint;
|
||||
if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(parentRect, screenPoint, eventCamera, out localPoint))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
float btnHalfW = buttonRect.rect.width * 0.5f;
|
||||
float panelW = panelRect.rect.width;
|
||||
float panelH = panelRect.rect.height;
|
||||
float pivotX = panelRect.pivot.x;
|
||||
float pivotY = panelRect.pivot.y;
|
||||
|
||||
// Compute right-placement candidate (panel's left edge at button's right edge + offset)
|
||||
float leftEdgeRightPlacement = localPoint.x + btnHalfW + detailPanelOffset.x;
|
||||
float candidateXRight = leftEdgeRightPlacement + pivotX * panelW;
|
||||
|
||||
// Compute left-placement candidate (panel's right edge at button's left edge - offset)
|
||||
float rightEdgeLeftPlacement = localPoint.x - btnHalfW - detailPanelOffset.x;
|
||||
float candidateXLeft = rightEdgeLeftPlacement - (1f - pivotX) * panelW;
|
||||
|
||||
// Vertical clamping honoring pivot
|
||||
float minY = parentRect.rect.yMin + pivotY * panelH;
|
||||
float maxY = parentRect.rect.yMax - (1f - pivotY) * panelH;
|
||||
float candidateY = Mathf.Clamp(localPoint.y + detailPanelOffset.y, minY, maxY);
|
||||
|
||||
// Choose side based on available space
|
||||
float rightEdgeOfRight = candidateXRight + (1f - pivotX) * panelW;
|
||||
float canvasRight = parentRect.rect.xMax;
|
||||
float canvasLeft = parentRect.rect.xMin;
|
||||
float leftEdgeOfLeft = candidateXLeft - pivotX * panelW;
|
||||
|
||||
Vector2 finalPos;
|
||||
if (rightEdgeOfRight <= canvasRight)
|
||||
{
|
||||
finalPos = new Vector2(candidateXRight, candidateY);
|
||||
}
|
||||
else if (leftEdgeOfLeft >= canvasLeft)
|
||||
{
|
||||
finalPos = new Vector2(candidateXLeft, candidateY);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback: clamp within canvas horizontally
|
||||
float minX = canvasLeft + pivotX * panelW;
|
||||
float maxX = canvasRight - (1f - pivotX) * panelW;
|
||||
finalPos = new Vector2(Mathf.Clamp(candidateXRight, minX, maxX), candidateY);
|
||||
}
|
||||
|
||||
panelRect.anchoredPosition = finalPos;
|
||||
// Use the extracted utility function for positioning
|
||||
EC_UIUtility.PositionPanelNearButton(panelRect, buttonRect, detailPanelOffset);
|
||||
}
|
||||
|
||||
private void FillDetailPanel(byte package, EC_IvtrItem item)
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
// Filename: CDlgSkillTooltip.cs
|
||||
// Creator: BrewMonster
|
||||
// Date: 2024
|
||||
// Purpose: Tooltip dialog for displaying skill information when clicking skill icons
|
||||
|
||||
using BrewMonster.Scripts.UI;
|
||||
using BrewMonster.UI;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster
|
||||
{
|
||||
/// <summary>
|
||||
/// Tooltip dialog that displays skill information (description, requirements, etc.)
|
||||
/// when clicking on skill icons. Uses EC_UIUtility for smart positioning.
|
||||
/// </summary>
|
||||
public class CDlgInfoTooltip : AUIDialog
|
||||
{
|
||||
[Header("Tooltip Components")]
|
||||
[SerializeField] private GameObject panelRoot;
|
||||
[SerializeField] private EC_UIUtility.TextOutlet descriptionText;
|
||||
[SerializeField] private Button closeButton;
|
||||
|
||||
[Header("Positioning Settings")]
|
||||
[SerializeField] private Vector2 panelOffset = new Vector2(20f, 0f);
|
||||
[SerializeField] private bool autoHideOnClick = true;
|
||||
[SerializeField] private float autoHideDelay = 0f; // 0 = no auto-hide
|
||||
|
||||
private RectTransform sourceButton;
|
||||
private float showTime;
|
||||
|
||||
public override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
|
||||
if (closeButton != null)
|
||||
{
|
||||
closeButton.onClick.RemoveAllListeners();
|
||||
closeButton.onClick.AddListener(HideTooltip);
|
||||
}
|
||||
|
||||
// Hide by default
|
||||
if (panelRoot != null)
|
||||
{
|
||||
panelRoot.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// Auto-hide after delay if enabled
|
||||
if (autoHideDelay > 0f && panelRoot != null && panelRoot.activeSelf)
|
||||
{
|
||||
if (Time.time - showTime >= autoHideDelay)
|
||||
{
|
||||
HideTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
// Click anywhere to hide if enabled
|
||||
if (autoHideOnClick && panelRoot != null && panelRoot.activeSelf)
|
||||
{
|
||||
if (Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1))
|
||||
{
|
||||
// Check if click is outside the tooltip
|
||||
if (!RectTransformUtility.RectangleContainsScreenPoint(
|
||||
panelRoot.transform as RectTransform,
|
||||
Input.mousePosition,
|
||||
null))
|
||||
{
|
||||
HideTooltip();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show the tooltip with skill information near the clicked button.
|
||||
/// </summary>
|
||||
/// <param name="hintText">The skill description and information to display</param>
|
||||
/// <param name="buttonRect">The button RectTransform to position near</param>
|
||||
public void ShowTooltip(string hintText, RectTransform buttonRect)
|
||||
{
|
||||
if (string.IsNullOrEmpty(hintText))
|
||||
{
|
||||
Debug.LogWarning("[CDlgSkillTooltip] ShowTooltip called with empty hint text");
|
||||
return;
|
||||
}
|
||||
|
||||
// Set description text
|
||||
if (descriptionText != null)
|
||||
{
|
||||
// Text is already formatted by the caller
|
||||
descriptionText.Set(hintText);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("[CDlgSkillTooltip] descriptionText is not assigned");
|
||||
}
|
||||
|
||||
sourceButton = buttonRect;
|
||||
showTime = Time.time;
|
||||
|
||||
// Position near button using utility
|
||||
if (panelRoot != null && buttonRect != null)
|
||||
{
|
||||
var panelRect = panelRoot.transform as RectTransform;
|
||||
if (panelRect != null)
|
||||
{
|
||||
// Show first so we can get accurate size for positioning
|
||||
EC_UIUtility.ShowPanel(panelRoot, true);
|
||||
|
||||
// Position using the utility function
|
||||
EC_UIUtility.PositionPanelNearButton(panelRect, buttonRect, panelOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("[CDlgSkillTooltip] panelRoot does not have a RectTransform component");
|
||||
EC_UIUtility.ShowPanel(panelRoot, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (panelRoot == null)
|
||||
{
|
||||
Debug.LogError("[CDlgSkillTooltip] panelRoot is not assigned");
|
||||
}
|
||||
if (buttonRect == null)
|
||||
{
|
||||
Debug.LogWarning("[CDlgSkillTooltip] buttonRect is null, showing tooltip at default position");
|
||||
if (panelRoot != null)
|
||||
{
|
||||
EC_UIUtility.ShowPanel(panelRoot, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hide the tooltip.
|
||||
/// </summary>
|
||||
public void HideTooltip()
|
||||
{
|
||||
EC_UIUtility.ShowPanel(panelRoot, false);
|
||||
sourceButton = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if the tooltip is currently visible.
|
||||
/// </summary>
|
||||
/// <returns>True if tooltip is visible</returns>
|
||||
public bool IsVisible()
|
||||
{
|
||||
return panelRoot != null && panelRoot.activeSelf;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
HideTooltip();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e8681072225697243a08644ceda976a3
|
||||
@@ -0,0 +1,196 @@
|
||||
// Filename: EC_UIUtility.cs
|
||||
// Creator: Extracted from EC_InventoryUI.cs
|
||||
// Date: 2024
|
||||
// Purpose: Reusable UI helper functions for panel positioning, text handling, and layout management
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace BrewMonster.Scripts.UI
|
||||
{
|
||||
/// <summary>
|
||||
/// General-purpose UI utility class providing reusable functions for:
|
||||
/// - Smart panel positioning near buttons with edge detection
|
||||
/// - Dual text component support (Legacy Text + TextMeshPro)
|
||||
/// - Layout refresh helpers
|
||||
/// </summary>
|
||||
public static class EC_UIUtility
|
||||
{
|
||||
/// <summary>
|
||||
/// Position a panel near a button with smart edge detection to keep panel on screen.
|
||||
/// Automatically chooses left or right placement based on available space.
|
||||
/// </summary>
|
||||
/// <param name="panelRect">The panel RectTransform to position</param>
|
||||
/// <param name="buttonRect">The button RectTransform to position near</param>
|
||||
/// <param name="offset">Offset from button (x: horizontal spacing, y: vertical offset)</param>
|
||||
public static void PositionPanelNearButton(RectTransform panelRect, RectTransform buttonRect, Vector2 offset)
|
||||
{
|
||||
if (panelRect == null || buttonRect == null)
|
||||
{
|
||||
Debug.LogWarning("[EC_UIUtility] PositionPanelNearButton: panelRect or buttonRect is null");
|
||||
return;
|
||||
}
|
||||
|
||||
var canvas = panelRect.GetComponentInParent<Canvas>();
|
||||
if (canvas == null)
|
||||
{
|
||||
Debug.LogWarning("[EC_UIUtility] PositionPanelNearButton: Cannot find parent Canvas");
|
||||
return;
|
||||
}
|
||||
|
||||
var parentRect = panelRect.parent as RectTransform;
|
||||
if (parentRect == null)
|
||||
{
|
||||
Debug.LogWarning("[EC_UIUtility] PositionPanelNearButton: Panel parent is not a RectTransform");
|
||||
return;
|
||||
}
|
||||
|
||||
Camera eventCamera = canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera;
|
||||
Vector3 worldCenter = buttonRect.TransformPoint(buttonRect.rect.center);
|
||||
Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint(eventCamera, worldCenter);
|
||||
Vector2 localPoint;
|
||||
if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(parentRect, screenPoint, eventCamera, out localPoint))
|
||||
{
|
||||
Debug.LogWarning("[EC_UIUtility] PositionPanelNearButton: Failed to convert screen point to local point");
|
||||
return;
|
||||
}
|
||||
|
||||
float btnHalfW = buttonRect.rect.width * 0.5f;
|
||||
float panelW = panelRect.rect.width;
|
||||
float panelH = panelRect.rect.height;
|
||||
float pivotX = panelRect.pivot.x;
|
||||
float pivotY = panelRect.pivot.y;
|
||||
|
||||
// Compute right-placement candidate (panel's left edge at button's right edge + offset)
|
||||
float leftEdgeRightPlacement = localPoint.x + btnHalfW + offset.x;
|
||||
float candidateXRight = leftEdgeRightPlacement + pivotX * panelW;
|
||||
|
||||
// Compute left-placement candidate (panel's right edge at button's left edge - offset)
|
||||
float rightEdgeLeftPlacement = localPoint.x - btnHalfW - offset.x;
|
||||
float candidateXLeft = rightEdgeLeftPlacement - (1f - pivotX) * panelW;
|
||||
|
||||
// Vertical clamping honoring pivot
|
||||
float minY = parentRect.rect.yMin + pivotY * panelH;
|
||||
float maxY = parentRect.rect.yMax - (1f - pivotY) * panelH;
|
||||
float candidateY = Mathf.Clamp(localPoint.y + offset.y, minY, maxY);
|
||||
|
||||
// Choose side based on available space
|
||||
float rightEdgeOfRight = candidateXRight + (1f - pivotX) * panelW;
|
||||
float canvasRight = parentRect.rect.xMax;
|
||||
float canvasLeft = parentRect.rect.xMin;
|
||||
float leftEdgeOfLeft = candidateXLeft - pivotX * panelW;
|
||||
|
||||
Vector2 finalPos;
|
||||
if (rightEdgeOfRight <= canvasRight)
|
||||
{
|
||||
// Right placement fits
|
||||
finalPos = new Vector2(candidateXRight, candidateY);
|
||||
}
|
||||
else if (leftEdgeOfLeft >= canvasLeft)
|
||||
{
|
||||
// Left placement fits
|
||||
finalPos = new Vector2(candidateXLeft, candidateY);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback: clamp within canvas horizontally
|
||||
float minX = canvasLeft + pivotX * panelW;
|
||||
float maxX = canvasRight - (1f - pivotX) * panelW;
|
||||
finalPos = new Vector2(Mathf.Clamp(candidateXRight, minX, maxX), candidateY);
|
||||
}
|
||||
|
||||
panelRect.anchoredPosition = finalPos;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Force Unity to rebuild layout immediately for a RectTransform.
|
||||
/// Useful after dynamically changing content that affects layout.
|
||||
/// </summary>
|
||||
/// <param name="rectTransform">The RectTransform to refresh</param>
|
||||
public static void RefreshLayout(RectTransform rectTransform)
|
||||
{
|
||||
if (rectTransform == null)
|
||||
{
|
||||
Debug.LogWarning("[EC_UIUtility] RefreshLayout: rectTransform is null");
|
||||
return;
|
||||
}
|
||||
|
||||
// Force Unity to rebuild layout immediately
|
||||
rectTransform.ForceUpdateRectTransforms();
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(rectTransform);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show or hide a panel with layout refresh.
|
||||
/// </summary>
|
||||
/// <param name="panel">The GameObject panel to show/hide</param>
|
||||
/// <param name="show">True to show, false to hide</param>
|
||||
public static void ShowPanel(GameObject panel, bool show)
|
||||
{
|
||||
if (panel == null)
|
||||
{
|
||||
Debug.LogWarning("[EC_UIUtility] ShowPanel: panel is null");
|
||||
return;
|
||||
}
|
||||
|
||||
panel.SetActive(show);
|
||||
|
||||
if (show)
|
||||
{
|
||||
var rectTransform = panel.GetComponent<RectTransform>();
|
||||
if (rectTransform != null)
|
||||
{
|
||||
RefreshLayout(rectTransform);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper class for managing dual text component support (Legacy Text + TextMeshPro).
|
||||
/// Allows UI components to work with both text systems simultaneously.
|
||||
/// </summary>
|
||||
[System.Serializable]
|
||||
public class TextOutlet
|
||||
{
|
||||
[SerializeField] public Text legacy;
|
||||
[SerializeField] public TMPro.TextMeshProUGUI tmp;
|
||||
|
||||
/// <summary>
|
||||
/// Set text on both legacy and TMP components with automatic formatting.
|
||||
/// </summary>
|
||||
/// <param name="value">The text to display</param>
|
||||
public void Set(string value)
|
||||
{
|
||||
if (legacy != null)
|
||||
{
|
||||
legacy.text = EC_Utility.FormatForLegacyText(value ?? string.Empty);
|
||||
}
|
||||
if (tmp != null)
|
||||
{
|
||||
tmp.text = EC_Utility.FormatForTextMeshPro(value ?? string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set text with explicit formatting preference.
|
||||
/// </summary>
|
||||
/// <param name="value">Raw text with formatting codes</param>
|
||||
/// <param name="preferTextMeshPro">Whether to prefer TextMeshPro formatting</param>
|
||||
public void SetFormatted(string value, bool preferTextMeshPro = true)
|
||||
{
|
||||
string formattedText = preferTextMeshPro ?
|
||||
EC_Utility.FormatForTextMeshPro(value ?? string.Empty) :
|
||||
EC_Utility.FormatForLegacyText(value ?? string.Empty);
|
||||
|
||||
if (legacy != null)
|
||||
{
|
||||
legacy.text = formattedText;
|
||||
}
|
||||
if (tmp != null)
|
||||
{
|
||||
tmp.text = formattedText;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c849af2e49a973947b7dd03b898d0f37
|
||||
@@ -26,6 +26,9 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
private bool m_bForceDynamicRender;
|
||||
|
||||
private AUIDialog m_pParent;
|
||||
|
||||
// Hint/tooltip data storage
|
||||
private string m_hintText = string.Empty;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -34,6 +37,7 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
Debug.LogError("Skill Button is not assigned in AUIImagePicture");
|
||||
return;
|
||||
}
|
||||
skillbutton.onClick.RemoveAllListeners();
|
||||
skillbutton.onClick.AddListener(Execute);
|
||||
m_pParent = GetComponentInParent<AUIDialog>();
|
||||
}
|
||||
@@ -54,6 +58,17 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
{
|
||||
EventBus.Publish(new OpenSkillUIEvent());
|
||||
}
|
||||
|
||||
// Show tooltip if hint exists
|
||||
if (!string.IsNullOrEmpty(m_hintText))
|
||||
{
|
||||
var uiManager = CECUIManager.Instance;
|
||||
if (uiManager != null)
|
||||
{
|
||||
var rectTransform = GetComponent<RectTransform>();
|
||||
uiManager.ShowSkillTooltip(m_hintText, rectTransform);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void SetImage(Sprite sprite)
|
||||
{
|
||||
@@ -68,13 +83,9 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
}
|
||||
private IEnumerator CooldownRoutine()
|
||||
{
|
||||
// Disable interaction
|
||||
skillbutton.interactable = false;
|
||||
// Set gray
|
||||
skillImage.color = Color.gray;
|
||||
// Wait
|
||||
yield return new WaitForSeconds(cooldownTime);
|
||||
// Restore
|
||||
skillImage.color = Color.white;
|
||||
skillbutton.interactable = true;
|
||||
}
|
||||
@@ -95,6 +106,25 @@ namespace BrewMonster.Assets.PerfectWorld.Scripts.UI.GamePlay
|
||||
{
|
||||
return m_bUpdateRenderTarget || m_bForceDynamicRender;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set hint/tooltip text that will be displayed when the skill icon is clicked.
|
||||
/// This is typically the skill description with requirements.
|
||||
/// </summary>
|
||||
/// <param name="hint">The hint text to display</param>
|
||||
public void SetHint(string hint)
|
||||
{
|
||||
m_hintText = hint ?? string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the stored hint/tooltip text.
|
||||
/// </summary>
|
||||
/// <returns>The hint text or empty string if none set</returns>
|
||||
public string GetHint()
|
||||
{
|
||||
return m_hintText;
|
||||
}
|
||||
}
|
||||
public struct OpenSkillUIEvent
|
||||
{
|
||||
|
||||
@@ -170,7 +170,9 @@ namespace BrewMonster
|
||||
var str = EC_Utility.FormatForTextMeshPro(skillDsc.ToString());
|
||||
if (skillID == 1)
|
||||
BMLogger.LogError("HoangDev: CDlgSkillSubListItem skillDsc for skillID " + skillID + " : " + str);
|
||||
//m_skillIconImgPic.SetHint(skillDsc);
|
||||
|
||||
// Store hint for tooltip display when clicking skill icon
|
||||
m_skillIconImgPic.SetHint(str);
|
||||
|
||||
string skillName = model.GetSkillName(m_skillID);
|
||||
/* if (model.IsPassiveSkill(m_skillID))
|
||||
|
||||
@@ -0,0 +1,607 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &124168344263491349
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 8894405194986632892}
|
||||
- component: {fileID: 4376431126769957786}
|
||||
- component: {fileID: 2668322321768899818}
|
||||
- component: {fileID: 5781139014276065127}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP) (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &8894405194986632892
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 124168344263491349}
|
||||
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: 1546246053547542409}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 20, y: -402.765}
|
||||
m_SizeDelta: {x: 400, y: 0}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &4376431126769957786
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 124168344263491349}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2668322321768899818
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 124168344263491349}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: "[InventoryUI] Set TMP text: ^FFFFFF \u2606\u2606T\u1EED Vi Ph\xE1p Kh\u1ED1\n^FFFFFF
|
||||
\nC\u1EA5p 4\n^FFFFFFTh\u1EE7 v\u1EADt l\xFD^FFFFFF +32\n^FFFFFFKh\xE1ng Kim^FFFFFF
|
||||
+355\n^FFFFFFKh\xE1ng M\u1ED9c^FFFFFF +355\n^FFFFFFKh\xE1ng Th\u1EE7y^FFFFFF
|
||||
+355\n^FFFFFFKh\xE1ng H\u1ECFa^FFFFFF +355\n^FFFFFFKh\xE1ng Th\u1ED5^FFFFFF +355\n^FFFFFF\u0110\u1ED9
|
||||
b\u1EC1n 60/60\n^FFFFFFY\xEAu c\u1EA7u c\u1EA5p \u0111\u1ED9 1\n^FFFFFFH\u1EA1n
|
||||
ch\u1EBF ^FFFFFFPS ^FFFFFFVS ^FFFFFFTiT ^FFFFFFVL ^FFFFFFM\u1ECB Linh ^FFFFFFNguy\u1EC7t
|
||||
Ti\xEAn\n^5998FFLinh L\u1EF1c +1\nTh\u1EE7 v\u1EADt l\xFD +8\n\n\n^5998FF(2)
|
||||
Ph\xF2ng ng\u1EF1 v\u1EA5t l\xFD +50\n(3) Kh\xE1ng ph\xE9p+50\n(4) \u0110i\u1EC3m
|
||||
Ch\xE2n kh\xED +50\n^FFFF00T\u1EED Vi (4 / 5)\n^00FF00 \u2606\u2606T\u1EED Vi
|
||||
Ph\xE1p B\xE0o\n^00FF00 \u2606\u2606T\u1EED Vi Ph\xE1p Kh\u1ED1\n^00FF00 \u2606\u2606T\u1EED
|
||||
Vi Ph\xE1p Kh\u1ED1\n^00FF00 \u2606\u2606T\u1EED Vi Khinh O\u1EA3n\n^808080
|
||||
\u2606\u2606T\u1EED Vi Y\xEAu B\u1ED9i^FFFFFFPrice: 0\n"
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 24
|
||||
m_fontSizeBase: 24
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 0
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 20, z: 0, w: 20}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &5781139014276065127
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 124168344263491349}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &4323722196996787684
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7209086543831860202}
|
||||
- component: {fileID: 1207680936664328091}
|
||||
- component: {fileID: 8506468441935914785}
|
||||
- component: {fileID: 719291941139433997}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP) (2)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &7209086543831860202
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4323722196996787684}
|
||||
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: 1546246053547542409}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 20, y: -805.53}
|
||||
m_SizeDelta: {x: 450, y: 0}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &1207680936664328091
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4323722196996787684}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8506468441935914785
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4323722196996787684}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text:
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 24
|
||||
m_fontSizeBase: 24
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &719291941139433997
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4323722196996787684}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &6830833846243993097
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1546246053547542409}
|
||||
- component: {fileID: 3972549934450106718}
|
||||
- component: {fileID: 7489840247554268479}
|
||||
- component: {fileID: 1086546571030594654}
|
||||
- component: {fileID: 426204275254898644}
|
||||
- component: {fileID: 4006058193329126604}
|
||||
m_Layer: 5
|
||||
m_Name: CDlgInfoTooltip
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1546246053547542409
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6830833846243993097}
|
||||
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:
|
||||
- {fileID: 636299721907915661}
|
||||
- {fileID: 8894405194986632892}
|
||||
- {fileID: 7209086543831860202}
|
||||
m_Father: {fileID: 0}
|
||||
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: 220.02612, y: -32.73999}
|
||||
m_SizeDelta: {x: 450, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &3972549934450106718
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6830833846243993097}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e8681072225697243a08644ceda976a3, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
panelRoot: {fileID: 6830833846243993097}
|
||||
descriptionText:
|
||||
legacy: {fileID: 0}
|
||||
tmp: {fileID: 2668322321768899818}
|
||||
closeButton: {fileID: 0}
|
||||
panelOffset: {x: 20, y: 0}
|
||||
autoHideOnClick: 1
|
||||
autoHideDelay: 1
|
||||
--- !u!222 &7489840247554268479
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6830833846243993097}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1086546571030594654
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6830833846243993097}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 31724268aed254d4c9a0523e647a6c71, type: 3}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &426204275254898644
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6830833846243993097}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 59f8146938fff824cb5fd77236b75775, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding:
|
||||
m_Left: 20
|
||||
m_Right: 0
|
||||
m_Top: 0
|
||||
m_Bottom: 20
|
||||
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
|
||||
--- !u!114 &4006058193329126604
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6830833846243993097}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
--- !u!1 &7370156420958780641
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 636299721907915661}
|
||||
- component: {fileID: 7696864549744364523}
|
||||
- component: {fileID: 1495584989084566666}
|
||||
- component: {fileID: 361828112618062766}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &636299721907915661
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7370156420958780641}
|
||||
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: 1546246053547542409}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 20, y: -0}
|
||||
m_SizeDelta: {x: 450, y: 0}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!222 &7696864549744364523
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7370156420958780641}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1495584989084566666
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7370156420958780641}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text:
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_sharedMaterial: {fileID: 9092487103257209053, guid: 369c2e14814cc9a4b8e3ad4e37769134, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 24
|
||||
m_fontSizeBase: 24
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_TextWrappingMode: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 0
|
||||
m_ActiveFontFeatures: 6e72656b
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_EmojiFallbackSupport: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!114 &361828112618062766
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7370156420958780641}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalFit: 0
|
||||
m_VerticalFit: 2
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 97dd1de3aba08a04980849e40d5c1ea4
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1692,9 +1692,9 @@ RectTransform:
|
||||
- {fileID: 4504331075840543341}
|
||||
m_Father: {fileID: 1361524257611413148}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 108.9562, y: -31.05}
|
||||
m_SizeDelta: {x: 179.9124, y: 68.0217}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8804506040386004496
|
||||
@@ -4480,9 +4480,9 @@ RectTransform:
|
||||
- {fileID: 2027606699309904338}
|
||||
m_Father: {fileID: 1361524257611413148}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 468.781, y: -31.05}
|
||||
m_SizeDelta: {x: 179.9124, y: 68.0217}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6741821173640675138
|
||||
@@ -6082,9 +6082,9 @@ RectTransform:
|
||||
- {fileID: 4351609655079222131}
|
||||
m_Father: {fileID: 2825516843822704547}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 167.0151, y: -22.62375}
|
||||
m_SizeDelta: {x: 334.0302, y: 45.2475}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5645061043433811765
|
||||
@@ -8869,8 +8869,8 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 358.8119, y: -50.62375}
|
||||
m_SizeDelta: {x: 685.6238, y: 0}
|
||||
m_AnchoredPosition: {x: 358.8119, y: -105.62375}
|
||||
m_SizeDelta: {x: 685.6238, y: 155.2475}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4552529476466259825
|
||||
CanvasRenderer:
|
||||
@@ -10113,7 +10113,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &627631504828013321
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -10763,6 +10763,7 @@ GameObject:
|
||||
- component: {fileID: 1200287659960010393}
|
||||
- component: {fileID: 3801278460223427377}
|
||||
- component: {fileID: 4150652358465390995}
|
||||
- component: {fileID: 7693362874457494086}
|
||||
m_Layer: 5
|
||||
m_Name: SkillImage
|
||||
m_TagString: Untagged
|
||||
@@ -10839,11 +10840,55 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 67fd391520cbfd44f84a1c6bb57673c0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
skillbutton: {fileID: 0}
|
||||
skillbutton: {fileID: 7693362874457494086}
|
||||
skillImage: {fileID: 3801278460223427377}
|
||||
borderImage: {fileID: 6819612505585264736}
|
||||
cooldownTime: 0
|
||||
m_ClockCounter: {fileID: 0}
|
||||
--- !u!114 &7693362874457494086
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 6819612505585264736}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 3801278460223427377}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &6884516146345372748
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -13124,7 +13169,7 @@ GameObject:
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5330897987501731450
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -13143,9 +13188,9 @@ RectTransform:
|
||||
- {fileID: 7084227105954184495}
|
||||
m_Father: {fileID: 2825516843822704547}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 342.81, y: -105.2475}
|
||||
m_SizeDelta: {x: 685.62, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &114056069577405476
|
||||
@@ -13829,9 +13874,9 @@ RectTransform:
|
||||
- {fileID: 911293677621153352}
|
||||
m_Father: {fileID: 1361524257611413148}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 288.8686, y: -31.05}
|
||||
m_SizeDelta: {x: 179.9124, y: 68.0217}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5623009994815814977
|
||||
|
||||
@@ -28,6 +28,7 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
public CDlgSkillSubOther m_pDlgSkillSubOther;
|
||||
CDlgMessageBox m_pDlgMessageBox;
|
||||
public CDlgSkillAction m_pDlgSkillAction;
|
||||
private CDlgInfoTooltip m_pDlgSkillTooltip;
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
@@ -131,6 +132,51 @@ public class CECUIManager : MonoSingleton<CECUIManager>
|
||||
}*/
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show skill tooltip with description near the clicked skill button.
|
||||
/// </summary>
|
||||
/// <param name="hintText">The skill description and requirements</param>
|
||||
/// <param name="sourceButton">The button RectTransform to position near</param>
|
||||
public void ShowSkillTooltip(string hintText, RectTransform sourceButton)
|
||||
{
|
||||
if (string.IsNullOrEmpty(hintText))
|
||||
{
|
||||
Debug.LogWarning("[CECUIManager] ShowSkillTooltip called with empty hint text");
|
||||
return;
|
||||
}
|
||||
|
||||
// Lazy-load the tooltip dialog
|
||||
if (m_pDlgSkillTooltip == null)
|
||||
{
|
||||
var tooltip = GetInGameUIMan().GetDialog("CDlgInfoTooltip") as CDlgInfoTooltip;
|
||||
if (tooltip != null)
|
||||
{
|
||||
m_pDlgSkillTooltip = tooltip;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("[CECUIManager] CDlgSkillTooltip not found in dialog resource. Tooltip will not be displayed.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (m_pDlgSkillTooltip != null)
|
||||
{
|
||||
m_pDlgSkillTooltip.ShowTooltip(hintText, sourceButton);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Hide the skill tooltip if it's currently visible.
|
||||
/// </summary>
|
||||
public void HideSkillTooltip()
|
||||
{
|
||||
if (m_pDlgSkillTooltip != null)
|
||||
{
|
||||
m_pDlgSkillTooltip.HideTooltip();
|
||||
}
|
||||
}
|
||||
|
||||
private void OnMessageBox(MessageBoxEvent messageBoxEvent)
|
||||
{
|
||||
BMLogger.LogError("CECUIManager OnMessageBox called");
|
||||
|
||||
+973
-9
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user