コード例 #1
0
        protected GameObject FileNameButtonRow(GameObject parent)
        {
            GameObject row = Row(parent, "FileNameButtonRow", TextAlignment.Left);

            Label(row, "FileNameLabel", "         FileName");
            ButtonProfile profile = Defaults.GetMomentaryButtonProfile(momentaryButtonProfile);

            GameObject fileNameObject = FileNameButton(fileSaveAs, row, profile, "FileName");

            fileNameButton            = fileNameObject.GetComponent <SaveAsFileNameButton>();
            fileSaveAs.fileNameButton = fileNameButton;
            Label(row, "ExtLabel", fileNameExtension);
            return(row);
        }
コード例 #2
0
        protected override void AddButton(GameObject target, AudioSource audioSourceDown, AudioSource audioSourceUp)
        {
            SaveAsFileNameButton button = Undoable.AddComponent <SaveAsFileNameButton>(target);

            if (audioSourceDown)
            {
                button.buttonClickDown = audioSourceDown;
            }
            if (audioSourceUp)
            {
                button.buttonClickUp = audioSourceUp;
            }
            button.buttonBody         = buttonBodyInstance;
            button.buttonText         = buttonTextLabelInstance;
            button.filePanel          = filePanel;
            button.clickOnTriggerExit = true;
            if (panel)
            {
                button.panel = panel;
            }
        }