Esempio n. 1
0
    public void deleteYarnLine()
    {
        //TODO: Remove this line and add save bellow creating a save state
        YarnLineHandler yarnLineHandler = new YarnLineHandler();

        yarnLineHandler.Delete(yarnEditor.selection);
        YarnList.Remove(yarnEditor.selection);
    }
Esempio n. 2
0
    void Awake()
    {
        this._YarnHandler     = new YarnHandler();
        this._YarnLineHandler = new YarnLineHandler();
        //dbgPanel.SetActive(false);

        searchTog  = false;
        contentTog = false;

        dimmerPanel.gameObject.SetActive(false);
        snippetDetailsPanel.gameObject.SetActive(false);
        disableSnippetEditing();
        snippetEditEnabled = false;

        yarnSelectionDropdownAdd.gameObject.SetActive(false);
        yarnNameField.gameObject.SetActive(false);
        saveYarnButton.gameObject.SetActive(false);
    }
Esempio n. 3
0
    public void saveYarn()
    {
        YarnHandler yarnHandler = new YarnHandler();
        Yarn        newYarn     = new Yarn();

        newYarn.Yarn_Name = uiManager.yarnNameField.text;

        //If we're adding a new yarn
        if (yarnEditor.getID() == -1)
        {
            newYarn = yarnHandler.Post(newYarn);
        }
        //If we're adding to an existing yarn group
        else
        {
            newYarn.Yarn_Id = yarnEditor.getID();
        }

        //TODO: Remove this line and add save bellow creating a save state
        YarnLineHandler yarnLineHandler = new YarnLineHandler();

        yarnLineHandler.Post(new YarnLine(yarnEditor.getTo(), yarnEditor.getFrom(), newYarn.Yarn_Id));
        this.YarnList.Add(new YarnLine(yarnEditor.getTo(), yarnEditor.getFrom(), newYarn.Yarn_Id));
    }