Пример #1
0
            public override void UpdateText()
            {
                PrimitivePropertyData v = (PrimitivePropertyData)Data;
                string valueStr         = v.PrimitiveType.ToString();

                if (valueStr == "Integer")
                {
                    valueStr = v.SafeMemory ? "SafeInt" : "int";
                }
                if (valueStr == "Float")
                {
                    valueStr = v.SafeMemory ? "SafeFloat" : "float";
                }
                if (valueStr == "Boolean")
                {
                    valueStr = v.SafeMemory ? "SafeBool" : "bool";
                }
                if (valueStr == "String")
                {
                    valueStr = "string";
                }

                if (v.IsArray)
                {
                    base.Text = string.Format("{0}[] {1}", valueStr, v.Name);
                }
                else
                {
                    base.Text = string.Format("{0} {1}", valueStr, v.Name);
                }
            }
Пример #2
0
            public void AddPrimitiveProperty()
            {
                PrimitivePropertyData pd = new PrimitivePropertyData();

                pd.Name          = "NewValue";
                pd.PrimitiveType = Skill.Editor.PrimitiveDataType.Integer;
                var property = new PrimitivePropertyDataListItem(Editor, pd);

                _Properties.Add(property);
                RebuildProperties();
            }
Пример #3
0
 public PrimitivePropertyDataListItem(SaveDataEditorWindow editor, PrimitivePropertyData data)
     : base(editor, data)
 {
 }