diff options
author | Thomas Dinges <blender@dingto.org> | 2009-05-11 15:31:10 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2009-05-11 15:31:10 +0400 |
commit | 02c81ff5404fb35e9d68053f2fd5175a3646e145 (patch) | |
tree | 26ee035c24a80fc3ac4d5b7868752784b5ef2a5f /source/blender | |
parent | 9f012ead0c83435bb279dbcc71da4eebaf361fc1 (diff) |
2.5 RNA: Curve
* Changed the font align booleans into 1 enum.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 719c6cb3c89..275a11377e2 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -291,6 +291,19 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna) { PropertyRNA *prop; + static EnumPropertyItem prop_align_items[] = { + {CU_LEFT, "LEFT", "Left Align", "Align text to the left"}, + {CU_MIDDLE, "CENTRAL", "Central Align", "Center text"}, + {CU_RIGHT, "RIGHT", "Right Align", "Align text to the right"}, + {CU_JUSTIFY, "JUSTIFY", "Justify", "Align to the left and the right"}, + {CU_FLUSH, "FLUSH", "Flush", "Align to the left and the right, with equal character spacing"}, + {0, NULL, NULL, NULL}}; + + /* Enums */ + prop= RNA_def_property(srna, "spacemode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, prop_align_items); + RNA_def_property_ui_text(prop, "Text Align", "Text align from the object center."); + /* number values */ prop= RNA_def_property(srna, "text_size", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "fsize"); @@ -375,26 +388,6 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna) prop= RNA_def_property(srna, "fast", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FAST); RNA_def_property_ui_text(prop, "Fast", "Don't fill polygons while editing."); - - prop= RNA_def_property(srna, "left_align", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "spacemode", CU_LEFT); - RNA_def_property_ui_text(prop, "Left Align", "Left align the text from the object center."); - - prop= RNA_def_property(srna, "middle_align", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "spacemode", CU_MIDDLE); - RNA_def_property_ui_text(prop, "Middle Align", "Middle align the text from the object center."); - - prop= RNA_def_property(srna, "right_align", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "spacemode", CU_RIGHT); - RNA_def_property_ui_text(prop, "Right Align", "Right align the text from the object center."); - - prop= RNA_def_property(srna, "justify", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "spacemode", CU_JUSTIFY); - RNA_def_property_ui_text(prop, "Justify", "Fill complete lines to maximum textframe width."); - - prop= RNA_def_property(srna, "flush", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "spacemode", CU_FLUSH); - RNA_def_property_ui_text(prop, "Left Align", "Fill every line to maximum textframe width distributing space among all characters."); } void rna_def_textbox(BlenderRNA *brna) |