예제 #1
0
    //
    // Protected Methods
    //

    protected void Ask(string question, PropertyBase property, UnityAction yes, UnityAction no)
    {
        if (property.IsSet || activeSite == null || dataManager.sites.Count == 1)
        {
            yes();
        }
        else
        {
            dialogManager.Ask(question, yes, no);
        }
    }
예제 #2
0
    private void AskToDeleteActiveSite()
    {
        if (activeSite == null)
        {
            return;
        }
#if UNITY_WEBGL
        dialogManager.Warn(translator.Get("This feature is not available for the Web version"));
#else
        var directories = dataManager.GetDataDirectories();
        var files       = activeSite.GetFiles(directories);

        string question =
            translator.Get("Are you sure you want to delete this site?") +
            "\n\n<b>" + activeSite.Name + "</b>\n\n" +
            translator.Get("The following data will be deleted") + ":\n\n" +
            translator.Get("Layers") + ": " + activeSite.layers.Count +
            "\n" +
            translator.Get("Files") + ": " + files.Count;

        dialogManager.Ask(question, () => DeleteActiveSite(files));
#endif
    }