HeavenStudioPlus/Assets/Scripts/LevelEditor/Timeline/SpecialTmeline/SectionDialog.cs
minenice55 d74fe11e68 Beatmap Sections & Latency Reduction (#170)
* prep UI for chart section

* all special layers now on one area

todo: have buttons toggle between special layers  (selection mode shows all?), use the tabs system for this

* swapping between special timelines - prelim

* special entities can be placed

* spec. timeline base functions complete

music volume changes should work now

* attempt at input lag reduction

needs testing

* fix dsp issues

* smaller DSP buffer?

* Revert "smaller DSP buffer?"

This reverts commit 9d36db5ff90cf4e2d7bb8db9b4b7376cb493e02b.

* make conductor clock use real time (double)

change order of execution of input-related scripts to further attempt a reduction in input latency

* start values can be changed

make the old special entity bar visible when the corresponding type is selected

* creation of Chart Sections (TODO: GO REFERENCE)

* added GO references

* section edit dialog

* disable wrapping on chart section obj

* backspace can now delete entities

* entities don't shift when duplicated

* fix PlayerActionEvent order of operations

- fixed remix loading trying to clear special timeline while it's writing to itself

* make oop check match parity

* more operation order fix

* fix Karate Man BG initialization

* show section progress in editor

todo: section progress in-game

* more fix for entity duping
2022-09-18 16:48:14 -04:00

51 lines
1.3 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using HeavenStudio;
using HeavenStudio.Editor;
using HeavenStudio.Editor.Track;
using TMPro;
public class SectionDialog : Dialog
{
SectionTimelineObj sectionObj;
[SerializeField] TMP_InputField sectionName;
public void SwitchSectionDialog()
{
if(dialog.activeSelf) {
sectionObj = null;
dialog.SetActive(false);
Editor.instance.inAuthorativeMenu = false;
} else {
Editor.instance.inAuthorativeMenu = true;
ResetAllDialogs();
dialog.SetActive(true);
}
}
public void SetSectionObj(SectionTimelineObj sectionObj)
{
this.sectionObj = sectionObj;
sectionName.text = sectionObj.chartSection.sectionName;
}
public void DeleteSection()
{
if(dialog.activeSelf) {
dialog.SetActive(false);
Editor.instance.inAuthorativeMenu = false;
}
if (sectionObj == null) return;
GameManager.instance.Beatmap.beatmapSections.Remove(sectionObj.chartSection);
sectionObj.DeleteObj();
}
public void ChangeSectionName(string name)
{
if (sectionObj == null) return;
sectionObj.chartSection.sectionName = name;
sectionObj.UpdateLabel();
}
}