public void SaveAsProject()
    {
        if (LimSystem.ChartContainer == null)
        {
            return;
        }
        string ChartPath = WindowsDialogUtility.SaveFileDialog("", "Chart (*.txt)|*.txt", "");

        if (ChartPath == null)
        {
            return;
        }
        if (!ChartPath.EndsWith(".txt"))
        {
            ChartPath += ".txt";
        }
        File.WriteAllText(ChartPath, LimSystem.ChartContainer.ChartData.ToString());
        LimNotifyIcon.ShowMessage(LimLanguageManager.NotificationDict["Project_Saved"]);
        if (LimSystem.Preferences.CloudAutosave)
        {
            CloudManager.UploadChart();
        }
        ChartSaveLocation        = ChartPath;
        CurrentProject.ChartPath = ChartPath;
        SaveProjectFile();
    }
Beispiel #2
0
    public void CreateCatchRail()
    {
        if (LimSystem.ChartContainer == null)
        {
            return;
        }
        int Quantity;

        if (OperationManager.SelectedTapNote.Count != 2)
        {
            LimNotifyIcon.ShowMessage(LimLanguageManager.TextDict["Window_Creator_CreateCatchRail_ErrSelection"]); return;
        }
        if (!int.TryParse(CreateCatchRailQuantityInputField.text, out Quantity))
        {
            LimNotifyIcon.ShowMessage(LimLanguageManager.TextDict["Window_Creator_CreateCatchRail_ErrQuantity"]); return;
        }
        if (Quantity <= 0)
        {
            LimNotifyIcon.ShowMessage(LimLanguageManager.TextDict["Window_Creator_CreateCatchRail_ErrRange"]); return;
        }
        OperationManager.SelectedTapNote.Sort((Lanotalium.Chart.LanotaTapNote a, Lanotalium.Chart.LanotaTapNote b) => { return(a.Time.CompareTo(b.Time)); });
        float DeltaTime   = (OperationManager.SelectedTapNote[1].Time - OperationManager.SelectedTapNote[0].Time) / (Quantity + 1);
        float DeltaDegree = (OperationManager.SelectedTapNote[1].Degree - OperationManager.SelectedTapNote[0].Degree) / (Quantity + 1);

        for (int i = 1; i <= Quantity; ++i)
        {
            Lanotalium.Chart.LanotaTapNote New = OperationManager.SelectedTapNote[0].DeepCopy();
            New.Type    = 4;
            New.Time   += i * DeltaTime;
            New.Degree += i * DeltaDegree;
            OperationManager.AddTapNote(New, true, false, false);
        }
        LimNotifyIcon.ShowMessage(LimLanguageManager.TextDict["Window_Creator_CreateCatchRail_Success"]);
    }
Beispiel #3
0
 private void ReceiveUnityLog(string condition, string stackTrace, LogType type)
 {
     if (condition == _LastLog)
     {
         return;
     }
     LimNotifyIcon.ShowMessage(condition);
     _LastLog = condition;
 }
 private void VideoBackgroundInitialize()
 {
     BackgroundVideoPlayer.url = BackgroundData.VideoPath;
     BackgroundVideoPlayer.waitForFirstFrame = true;
     BackgroundVideoPlayer.Prepare();
     BackgroundVideoPlayer.prepareCompleted += BackgroundVideoPlayer_prepareCompleted;
     BackgroundVideoPlayer.seekCompleted    += BackgroundVideoPlayer_seekCompleted;
     ColorImg.material = BackgroundRenderTextureMaterial;
     ColorImg.color    = new Color(1, 1, 1, 1);
     GrayImg.color     = new Color(1, 1, 1, 0);
     LinearImg.color   = new Color(1, 1, 1, 0);
     LimNotifyIcon.ShowMessage(LimLanguageManager.NotificationDict["Background_VideoWarning"]);
 }
Beispiel #5
0
 public void SetLanguage(string LanguageName)
 {
     CurrentLanguage = LanguageName;
     if (!LanguagePackages.ContainsKey(LanguageName))
     {
         LimNotifyIcon.ShowMessage("Language Not Found !");
         return;
     }
     TextDict         = LanguagePackages[LanguageName].TextDict;
     NotificationDict = LanguagePackages[LanguageName].NotificationDict;
     HintDict         = LanguagePackages[LanguageName].HintDict;
     TutorialDict     = LanguagePackages[LanguageName].TutorialDict;
     CallAllSetTexts();
 }
    public void SaveProject()
    {
        if (LimSystem.ChartContainer == null)
        {
            return;
        }
        LimAutosaver.Autosave();
        string ChartPath = ChartSaveLocation;

        File.WriteAllText(ChartPath, LimSystem.ChartContainer.ChartData.ToString());
        CloudManager.UploadChart();
        LimNotifyIcon.ShowMessage(LimLanguageManager.NotificationDict["Project_Saved"]);
        SaveProjectFile();
    }
    public void CopySelectedMotion()
    {
        if (!OperationManager.TunerManager.isInitialized)
        {
            return;
        }
        if (!ValidateCopyInstruction())
        {
            return;
        }
        if (OperationManager.SelectedMotions.Count < 1)
        {
            return;
        }
        OperationManager.SelectedMotions.Sort((Lanotalium.Chart.LanotaCameraBase a, Lanotalium.Chart.LanotaCameraBase b) => { return(a.Time.CompareTo(b.Time)); });
        float FirstTime = OperationManager.SelectedMotions[0].Time;

        foreach (float Target in CopyTargets)
        {
            foreach (Lanotalium.Chart.LanotaCameraBase Base in OperationManager.SelectedMotions)
            {
                switch (Base.Type)
                {
                case 8:
                case 11:
                    Lanotalium.Chart.LanotaCameraXZ NewH = (Base as Lanotalium.Chart.LanotaCameraXZ).DeepCopy();
                    NewH.Time = Base.Time - FirstTime + Target;
                    OperationManager.AddHorizontal(NewH, false, true, false); break;

                case 10:
                    Lanotalium.Chart.LanotaCameraY NewV = (Base as Lanotalium.Chart.LanotaCameraY).DeepCopy();
                    NewV.Time = Base.Time - FirstTime + Target;
                    OperationManager.AddVertical(NewV, false, true, false); break;

                case 13:
                    Lanotalium.Chart.LanotaCameraRot NewR = (Base as Lanotalium.Chart.LanotaCameraRot).DeepCopy();
                    NewR.Time = Base.Time - FirstTime + Target;
                    OperationManager.AddRotation(NewR, false, true, false); break;
                }
            }
        }
        LimNotifyIcon.ShowMessage(LimLanguageManager.TextDict["Copier_Msg_Success"]);
    }
    public void CopySelectedNotes()
    {
        if (!OperationManager.TunerManager.isInitialized)
        {
            return;
        }
        if (!ValidateCopyInstruction())
        {
            return;
        }

        bool  HasTap = false, HasHold = false;
        float FirstNoteTime = 0;

        if (OperationManager.SelectedTapNote.Count != 0)
        {
            OperationManager.SelectedTapNote.Sort((Lanotalium.Chart.LanotaTapNote a, Lanotalium.Chart.LanotaTapNote b) => { return(a.Time.CompareTo(b.Time)); });
            FirstNoteTime = OperationManager.SelectedTapNote[0].Time;
            HasTap        = true;
        }
        if (OperationManager.SelectedHoldNote.Count != 0)
        {
            OperationManager.SelectedHoldNote.Sort((Lanotalium.Chart.LanotaHoldNote a, Lanotalium.Chart.LanotaHoldNote b) => { return(a.Time.CompareTo(b.Time)); });
            FirstNoteTime = OperationManager.SelectedHoldNote[0].Time;
            HasHold       = true;
        }
        if (HasTap && HasHold)
        {
            FirstNoteTime = Mathf.Min(OperationManager.SelectedTapNote[0].Time, OperationManager.SelectedHoldNote[0].Time);
        }
        if (!HasTap && !HasHold)
        {
            return;
        }
        if (HasTap)
        {
            foreach (float Target in CopyTargets)
            {
                float Delta = Target - FirstNoteTime;
                foreach (Lanotalium.Chart.LanotaTapNote Tap in OperationManager.SelectedTapNote)
                {
                    Lanotalium.Chart.LanotaTapNote New = Tap.DeepCopy();
                    New.Time += Delta;
                    OperationManager.AddTapNote(New, true, false, false);
                }
            }
        }
        if (HasHold)
        {
            foreach (float Target in CopyTargets)
            {
                float Delta = Target - FirstNoteTime;
                foreach (Lanotalium.Chart.LanotaHoldNote Hold in OperationManager.SelectedHoldNote)
                {
                    Lanotalium.Chart.LanotaHoldNote New = Hold.DeepCopy();
                    New.Time += Delta;
                    OperationManager.AddHoldNote(New, true, false, false);
                }
            }
        }
        OperationManager.SelectNothing();
        LimNotifyIcon.ShowMessage(LimLanguageManager.TextDict["Copier_Msg_Success"]);
    }