Exemplo n.º 1
0
        public void Bind(CompopulateWindow window, List <Field> items, int index)
        {
            this.window     = window;
            field           = items[index];
            itemNumber.text = index.ToString();
            string flags = "";

            for (int i = 0; i < field.flags.Count; i++)
            {
                flags += field.flags[i];
            }

            icon1.image = GetImageFromCheck(field.preCheck);

            text.text = $"{field.script.gameObject.scene.name}:{objectName}:{scriptType}.{fieldName}({fieldType})({flags}) = {field.preCheck}";

            if (field.processed)
            {
                Field.Check postCheck = field.GetCheck(field.value, field.after);
                icon2.image         = GetImageFromCheck(postCheck);
                icon1.style.opacity = 0.4f;
                text.style.opacity  = this.postCheckLabel.style.opacity = 0.6f;
                if (postCheck != field.preCheck)
                {
                    postCheckLabel.text = $" -> {postCheck}";
                }
                else
                {
                    postCheckLabel.text = " (no change)";
                }
            }

            RegisterCallback <MouseDownEvent>(MouseDown, TrickleDown.TrickleDown);
        }
Exemplo n.º 2
0
 private static void Changed(PlayModeStateChange state)
 {
     if (state == PlayModeStateChange.EnteredEditMode)
     {
         EditorApplication.playModeStateChanged -= Changed;
         CompopulateWindow.ShowWindow();
     }
 }
Exemplo n.º 3
0
 public FieldView(CompopulateWindow window)
 {
     this.window = window;
 }