Exemplo n.º 1
0
    public static void Show(ScriptableObject scriptableObject, Func <string, bool> newNameValidator, Action onDone)
    {
        if (window == null)
        {
            window = CreateInstance(typeof(ChangeTabNameWindow)) as ChangeTabNameWindow;
        }

        Debug.Assert(window != null, nameof(window) + " != null");
        window.titleContent.text = "Rename tab";
        window.Focus();
        window.SetScriptableObject(scriptableObject);
        window._newNameValidator = newNameValidator;
        window.ShowUtility();
        window._onDone = onDone;
    }
Exemplo n.º 2
0
 private void ChangeCatalogName(BaseCatalog selection) => ChangeTabNameWindow.Show(selection, nName => !MarketManager.DoesCatalogIDExists(nName), Render);
Exemplo n.º 3
0
 private void ChangeItemName(BaseItem selection) => ChangeTabNameWindow.Show(selection, nName => !MarketManager.DoesItemIDExists(nName), Render);
Exemplo n.º 4
0
 private void ChangeProductName(BaseProduct selection) => ChangeTabNameWindow.Show(selection, nName => !MarketManager.DoesProductIDExists(nName), Render);
Exemplo n.º 5
0
 private void RenameScriptableSetting(ScriptableSettings settings)
 {
     ChangeTabNameWindow.Show(settings, IsValidSettingsName, () => PopulatePresetList());
 }