You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Merge pull request #105890 from Calinou/editor-doctool-textserverfallback
Fix class reference discrepancy when using `--doctool` with TextServerFallback
This commit is contained in:
@@ -39,6 +39,10 @@ void TextLine::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("get_inferred_direction"), &TextLine::get_inferred_direction);
|
ClassDB::bind_method(D_METHOD("get_inferred_direction"), &TextLine::get_inferred_direction);
|
||||||
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "direction", PROPERTY_HINT_ENUM, "Auto,Left-to-right,Right-to-left"), "set_direction", "get_direction");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "direction", PROPERTY_HINT_ENUM, "Auto,Left-to-right,Right-to-left"), "set_direction", "get_direction");
|
||||||
|
// If compiling the editor with TextServerFallback only,
|
||||||
|
// `--doctool` would change the default value to `TextServer::DIRECTION_LTR`.
|
||||||
|
// Force it so that it's consistent regardless of the backend.
|
||||||
|
ADD_PROPERTY_DEFAULT("direction", TextServer::DIRECTION_AUTO);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("set_orientation", "orientation"), &TextLine::set_orientation);
|
ClassDB::bind_method(D_METHOD("set_orientation", "orientation"), &TextLine::set_orientation);
|
||||||
ClassDB::bind_method(D_METHOD("get_orientation"), &TextLine::get_orientation);
|
ClassDB::bind_method(D_METHOD("get_orientation"), &TextLine::get_orientation);
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ void TextParagraph::_bind_methods() {
|
|||||||
ClassDB::bind_method(D_METHOD("get_inferred_direction"), &TextParagraph::get_inferred_direction);
|
ClassDB::bind_method(D_METHOD("get_inferred_direction"), &TextParagraph::get_inferred_direction);
|
||||||
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "direction", PROPERTY_HINT_ENUM, "Auto,Light-to-right,Right-to-left"), "set_direction", "get_direction");
|
ADD_PROPERTY(PropertyInfo(Variant::INT, "direction", PROPERTY_HINT_ENUM, "Auto,Light-to-right,Right-to-left"), "set_direction", "get_direction");
|
||||||
|
// If compiling the editor with TextServerFallback only,
|
||||||
|
// `--doctool` would change the default value to `TextServer::DIRECTION_LTR`.
|
||||||
|
// Force it so that it's consistent regardless of the backend.
|
||||||
|
ADD_PROPERTY_DEFAULT("direction", TextServer::DIRECTION_AUTO);
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("set_custom_punctuation", "custom_punctuation"), &TextParagraph::set_custom_punctuation);
|
ClassDB::bind_method(D_METHOD("set_custom_punctuation", "custom_punctuation"), &TextParagraph::set_custom_punctuation);
|
||||||
ClassDB::bind_method(D_METHOD("get_custom_punctuation"), &TextParagraph::get_custom_punctuation);
|
ClassDB::bind_method(D_METHOD("get_custom_punctuation"), &TextParagraph::get_custom_punctuation);
|
||||||
|
|||||||
Reference in New Issue
Block a user