작업 시간 분석 상세 정보 패널 기능 수정
This commit is contained in:
@@ -28,25 +28,26 @@ public class UI_BarChartData : UIBase
|
||||
WeighingTimeData.SetText(ConvertFloatToString(data.weighingTime));
|
||||
ETCData.SetText(ConvertFloatToString(data.etc));
|
||||
|
||||
DateTime.SetText(data._time);
|
||||
DateTime.SetText(SplitString(data._time));
|
||||
}
|
||||
private string ConvertFloatToString(float value)
|
||||
{
|
||||
float truncatedFloat = Mathf.Floor(value * 100f) / 100f;
|
||||
return truncatedFloat.ToString() + " ÃÊ";
|
||||
}
|
||||
private string SplitString(string value)
|
||||
{
|
||||
var splitText_1 = value.Substring(0, value.IndexOf("T") + 1);
|
||||
var splitText_2 = value.Substring(value.IndexOf("T") + 1).Trim();
|
||||
|
||||
var lineBreakText = splitText_1 + "\n" + splitText_2;
|
||||
return lineBreakText;
|
||||
}
|
||||
|
||||
|
||||
void ShowUINextToClickedUI(Vector3 topPosition)
|
||||
{
|
||||
RectTransform parentRectTransform = rectTransform.parent.GetComponent<RectTransform>();
|
||||
|
||||
var parentSize = parentRectTransform.rect.size;
|
||||
var uiSize = rectTransform.rect.size;
|
||||
|
||||
float clampedX = Mathf.Clamp(topPosition.x + offset.x, -parentSize.x / 2 + uiSize.x / 2, parentSize.x / 2 - uiSize.x / 2);
|
||||
|
||||
rectTransform.localPosition = new Vector2(clampedX, offset.y);
|
||||
rectTransform.localPosition = new Vector2(topPosition.x + offset.x, offset.y);
|
||||
gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,9 +57,6 @@ public class UI_GraphChartData : UIBase, ISingle
|
||||
{
|
||||
RectTransform parentRectTransform = rectTransform.parent.GetComponent<RectTransform>();
|
||||
|
||||
var parentSize = parentRectTransform.rect.size;
|
||||
var uiSize = rectTransform.rect.size;
|
||||
|
||||
Vector2 localPoint;
|
||||
RectTransformUtility.ScreenPointToLocalPointInRectangle(parentRectTransform, Input.mousePosition, null, out localPoint);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user