@@ -17,9 +17,11 @@ public class SubTab : MonoBehaviour
|
||||
private TimePointerModule timePointerModule;
|
||||
public TimelineTab father;
|
||||
private Timeline timeline;
|
||||
public RawImage ProgressImage;
|
||||
public RectTransform anotherTab;//Last
|
||||
public float time;
|
||||
|
||||
public void Set(IBaseElement Objs, float time)
|
||||
public void Set(IBaseElement Objs, float time, RectTransform anotherTab = null)
|
||||
{
|
||||
songInformation = EditorManager.instance.songInformation;
|
||||
timePointerModule = EditorManager.instance.uiManager.timeline.timePointerModule;
|
||||
@@ -27,10 +29,19 @@ public class SubTab : MonoBehaviour
|
||||
this.time = time;
|
||||
connectObj.Add(Objs);
|
||||
button.GetComponentInChildren<TMP_Text>().text = connectObj.Count().ToString();
|
||||
if (anotherTab != null)
|
||||
{
|
||||
this.anotherTab = anotherTab;
|
||||
ProgressImage.GetComponent<RectTransform>().sizeDelta = new Vector2((time - anotherTab.GetComponent<SubTab>().time) / timeline.timePerBeat * timePointerModule.timePointerInterval, ProgressImage.GetComponent<RectTransform>().sizeDelta.y);
|
||||
button.GetComponentInChildren<TMP_Text>().text = "E";
|
||||
anotherTab.GetComponent<SubTab>().button.GetComponentInChildren<TMP_Text>().text = "S";
|
||||
|
||||
}
|
||||
|
||||
transform.localPosition = new Vector3((this.time / timeline.timePerBeat * timePointerModule.timePointerInterval),
|
||||
-(42.5f + ((father.TabIndex + 1) * 25)), 0);
|
||||
//transform.position = new Vector3(transform.position.x, father.Title.transform.position.y + 12, 0);
|
||||
button.onClick.AddListener(GetClick);
|
||||
}
|
||||
void Update()
|
||||
{
|
||||
@@ -39,17 +50,17 @@ public class SubTab : MonoBehaviour
|
||||
transform.localScale = new Vector3(time > songInformation.songTime ? 1f : 0f, 1f, 1f);
|
||||
}
|
||||
}
|
||||
// public void GetClick()//?
|
||||
// {
|
||||
// if (connectObj[0] is GameElement)
|
||||
// {
|
||||
// EditorManager.instance.uiManager.hierarchy.FindTab((GameElement)connectObj[0]);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// EditorManager.instance.uiManager.hierarchy.FindTab(((SubmoduleBase)connectObj[0]).attachedGameElement);
|
||||
// }
|
||||
// }
|
||||
public void GetClick()//?
|
||||
{
|
||||
if (connectObj[0] is GameElement)
|
||||
{
|
||||
EditorManager.instance.uiManager.hierarchy.FindTab((GameElement)connectObj[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
EditorManager.instance.uiManager.hierarchy.FindTab(((SubmoduleBase)connectObj[0]).attachedGameElement);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user