Exemple #1
0
        public static void DrawLayer(Override ovd, int num)
        {
            (string name, Type type, object obj) = ovd.GetOverrideAt(num);

            Cell.EmptyLinePx(2);
            using (Cell.LineStd)
            {
                Cell.EmptyRowPx(2);

                using (Cell.RowPx(20)) Draw.Icon(UI.current.textures.GetTexture("DPUI/Icons/Layer"));
                using (Cell.Row)
                {
                    obj = Draw.UniversalField(obj, type, name);

                    if (Cell.current.valChanged)
                    {
                        ovd.SetOverrideAt(num, name, type, obj);
                        RefreshMapMagic(name);
                    }
                }

                Cell.EmptyRowPx(2);
            }
            Cell.EmptyLinePx(2);
        }
Exemple #2
0
        public static void DrawStaticOverride(Override ovd)
        /// For inspector use only: will make it re-generate on change, so don't use in function
        {
            for (int i = 0; i < ovd.Count; i++)
            {
                (string name, Type type, object obj) = ovd.GetOverrideAt(i);

                using (Cell.LineStd)
                {
                    obj = Draw.UniversalField(obj, type, name);

                    if (Cell.current.valChanged)
                    {
                        ovd.SetOverrideAt(i, name, type, obj);
                        RefreshMapMagic(name);
                    }
                }
            }
        }