Beispiel #1
0
 private static void ProcessPropertySchema(IGameTextProcessor processor, CustomPropertySchema schema,
                                           CompileMessages errors)
 {
     foreach (var def in schema.PropertyDefinitions.Where(n => n.Type == CustomPropertyType.Text))
     {
         def.DefaultValue = processor.ProcessText(def.DefaultValue, GameTextType.ItemDescription);
     }
 }
        public CustomPropertiesEditor(CustomPropertySchema schema, CustomProperties properties, CustomPropertyAppliesTo showPropertiesThatApplyTo)
        {
            InitializeComponent();
            _properties = properties;
            _schema     = schema;
            _showPropertiesThatApplyTo = showPropertiesThatApplyTo;

            propertyGrid.SelectedObject = new CustomPropertyBag(schema, _properties, _showPropertiesThatApplyTo);
        }
Beispiel #3
0
 public static void ProcessProperties(IGameTextProcessor processor, CustomPropertySchema schema,
                                      CustomProperties props, CompileMessages errors)
 {
     foreach (var def in schema.PropertyDefinitions.Where(n => n.Type == CustomPropertyType.Text))
     {
         CustomProperty prop;
         if (props.PropertyValues.TryGetValue(def.Name, out prop))
         {
             prop.Value = processor.ProcessText(prop.Value, GameTextType.ItemDescription);
         }
     }
 }
 public CustomPropertyBag(CustomPropertySchema schema, CustomProperties properties, CustomPropertyAppliesTo showPropertiesThatApplyTo)
 {
     _properties = properties;
     _schema     = schema;
     _showPropertiesThatApplyTo = showPropertiesThatApplyTo;
 }
Beispiel #5
0
 public CustomPropertySchemaEditor(CustomPropertySchema schema)
 {
     InitializeComponent();
     _schema = schema;
 }