mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Use const Array ref in set_structured_text_bidi_override_options
This commit is contained in:
parent
9283328fe7
commit
1a7be001d2
16 changed files with 36 additions and 36 deletions
|
|
@ -739,16 +739,16 @@ TextServer::StructuredTextParser Label3D::get_structured_text_bidi_override() co
|
||||||
return st_parser;
|
return st_parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Label3D::set_structured_text_bidi_override_options(Array p_args) {
|
void Label3D::set_structured_text_bidi_override_options(const Array &p_args) {
|
||||||
if (st_args != p_args) {
|
if (st_args != p_args) {
|
||||||
st_args = p_args;
|
st_args = Array(p_args);
|
||||||
dirty_text = true;
|
dirty_text = true;
|
||||||
_queue_update();
|
_queue_update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Array Label3D::get_structured_text_bidi_override_options() const {
|
Array Label3D::get_structured_text_bidi_override_options() const {
|
||||||
return st_args;
|
return Array(st_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Label3D::set_uppercase(bool p_uppercase) {
|
void Label3D::set_uppercase(bool p_uppercase) {
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ public:
|
||||||
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
||||||
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
||||||
|
|
||||||
void set_structured_text_bidi_override_options(Array p_args);
|
void set_structured_text_bidi_override_options(const Array &p_args);
|
||||||
Array get_structured_text_bidi_override_options() const;
|
Array get_structured_text_bidi_override_options() const;
|
||||||
|
|
||||||
void set_uppercase(bool p_uppercase);
|
void set_uppercase(bool p_uppercase);
|
||||||
|
|
|
||||||
|
|
@ -1114,12 +1114,12 @@ TextServer::StructuredTextParser Label::get_structured_text_bidi_override() cons
|
||||||
return st_parser;
|
return st_parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Label::set_structured_text_bidi_override_options(Array p_args) {
|
void Label::set_structured_text_bidi_override_options(const Array &p_args) {
|
||||||
if (st_args == p_args) {
|
if (st_args == p_args) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
st_args = p_args;
|
st_args = Array(p_args);
|
||||||
for (Paragraph ¶ : paragraphs) {
|
for (Paragraph ¶ : paragraphs) {
|
||||||
para.dirty = true;
|
para.dirty = true;
|
||||||
}
|
}
|
||||||
|
|
@ -1127,7 +1127,7 @@ void Label::set_structured_text_bidi_override_options(Array p_args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Array Label::get_structured_text_bidi_override_options() const {
|
Array Label::get_structured_text_bidi_override_options() const {
|
||||||
return st_args;
|
return Array(st_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
Control::TextDirection Label::get_text_direction() const {
|
Control::TextDirection Label::get_text_direction() const {
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ public:
|
||||||
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
||||||
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
||||||
|
|
||||||
void set_structured_text_bidi_override_options(Array p_args);
|
void set_structured_text_bidi_override_options(const Array &p_args);
|
||||||
Array get_structured_text_bidi_override_options() const;
|
Array get_structured_text_bidi_override_options() const;
|
||||||
|
|
||||||
void set_autowrap_mode(TextServer::AutowrapMode p_mode);
|
void set_autowrap_mode(TextServer::AutowrapMode p_mode);
|
||||||
|
|
|
||||||
|
|
@ -2148,14 +2148,14 @@ TextServer::StructuredTextParser LineEdit::get_structured_text_bidi_override() c
|
||||||
return st_parser;
|
return st_parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LineEdit::set_structured_text_bidi_override_options(Array p_args) {
|
void LineEdit::set_structured_text_bidi_override_options(const Array &p_args) {
|
||||||
st_args = p_args;
|
st_args = Array(p_args);
|
||||||
_shape();
|
_shape();
|
||||||
queue_redraw();
|
queue_redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
Array LineEdit::get_structured_text_bidi_override_options() const {
|
Array LineEdit::get_structured_text_bidi_override_options() const {
|
||||||
return st_args;
|
return Array(st_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LineEdit::clear() {
|
void LineEdit::clear() {
|
||||||
|
|
|
||||||
|
|
@ -344,7 +344,7 @@ public:
|
||||||
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
||||||
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
||||||
|
|
||||||
void set_structured_text_bidi_override_options(Array p_args);
|
void set_structured_text_bidi_override_options(const Array &p_args);
|
||||||
Array get_structured_text_bidi_override_options() const;
|
Array get_structured_text_bidi_override_options() const;
|
||||||
|
|
||||||
void set_placeholder(String p_text);
|
void set_placeholder(String p_text);
|
||||||
|
|
|
||||||
|
|
@ -75,14 +75,14 @@ TextServer::StructuredTextParser LinkButton::get_structured_text_bidi_override()
|
||||||
return st_parser;
|
return st_parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinkButton::set_structured_text_bidi_override_options(Array p_args) {
|
void LinkButton::set_structured_text_bidi_override_options(const Array &p_args) {
|
||||||
st_args = p_args;
|
st_args = Array(p_args);
|
||||||
_shape();
|
_shape();
|
||||||
queue_redraw();
|
queue_redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
Array LinkButton::get_structured_text_bidi_override_options() const {
|
Array LinkButton::get_structured_text_bidi_override_options() const {
|
||||||
return st_args;
|
return Array(st_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinkButton::set_text_direction(Control::TextDirection p_text_direction) {
|
void LinkButton::set_text_direction(Control::TextDirection p_text_direction) {
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ public:
|
||||||
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
||||||
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
||||||
|
|
||||||
void set_structured_text_bidi_override_options(Array p_args);
|
void set_structured_text_bidi_override_options(const Array &p_args);
|
||||||
Array get_structured_text_bidi_override_options() const;
|
Array get_structured_text_bidi_override_options() const;
|
||||||
|
|
||||||
void set_text_direction(TextDirection p_text_direction);
|
void set_text_direction(TextDirection p_text_direction);
|
||||||
|
|
|
||||||
|
|
@ -7187,11 +7187,11 @@ TextServer::StructuredTextParser RichTextLabel::get_structured_text_bidi_overrid
|
||||||
return st_parser;
|
return st_parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RichTextLabel::set_structured_text_bidi_override_options(Array p_args) {
|
void RichTextLabel::set_structured_text_bidi_override_options(const Array &p_args) {
|
||||||
if (st_args != p_args) {
|
if (st_args != p_args) {
|
||||||
_stop_thread();
|
_stop_thread();
|
||||||
|
|
||||||
st_args = p_args;
|
st_args = Array(p_args);
|
||||||
main->first_invalid_line.store(0); // Invalidate all lines.
|
main->first_invalid_line.store(0); // Invalidate all lines.
|
||||||
_invalidate_accessibility();
|
_invalidate_accessibility();
|
||||||
_validate_line_caches();
|
_validate_line_caches();
|
||||||
|
|
@ -7200,7 +7200,7 @@ void RichTextLabel::set_structured_text_bidi_override_options(Array p_args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Array RichTextLabel::get_structured_text_bidi_override_options() const {
|
Array RichTextLabel::get_structured_text_bidi_override_options() const {
|
||||||
return st_args;
|
return Array(st_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RichTextLabel::set_language(const String &p_language) {
|
void RichTextLabel::set_language(const String &p_language) {
|
||||||
|
|
@ -7318,13 +7318,13 @@ float RichTextLabel::get_visible_ratio() const {
|
||||||
return visible_ratio;
|
return visible_ratio;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RichTextLabel::set_effects(Array p_effects) {
|
void RichTextLabel::set_effects(const Array &p_effects) {
|
||||||
custom_effects = p_effects;
|
custom_effects = Array(p_effects);
|
||||||
reload_effects();
|
reload_effects();
|
||||||
}
|
}
|
||||||
|
|
||||||
Array RichTextLabel::get_effects() {
|
Array RichTextLabel::get_effects() {
|
||||||
return custom_effects;
|
return Array(custom_effects);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RichTextLabel::install_effect(const Variant effect) {
|
void RichTextLabel::install_effect(const Variant effect) {
|
||||||
|
|
|
||||||
|
|
@ -960,7 +960,7 @@ public:
|
||||||
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
||||||
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
||||||
|
|
||||||
void set_structured_text_bidi_override_options(Array p_args);
|
void set_structured_text_bidi_override_options(const Array &p_args);
|
||||||
Array get_structured_text_bidi_override_options() const;
|
Array get_structured_text_bidi_override_options() const;
|
||||||
|
|
||||||
void set_visible_characters(int p_visible);
|
void set_visible_characters(int p_visible);
|
||||||
|
|
@ -976,7 +976,7 @@ public:
|
||||||
TextServer::VisibleCharactersBehavior get_visible_characters_behavior() const;
|
TextServer::VisibleCharactersBehavior get_visible_characters_behavior() const;
|
||||||
void set_visible_characters_behavior(TextServer::VisibleCharactersBehavior p_behavior);
|
void set_visible_characters_behavior(TextServer::VisibleCharactersBehavior p_behavior);
|
||||||
|
|
||||||
void set_effects(Array p_effects);
|
void set_effects(const Array &p_effects);
|
||||||
Array get_effects();
|
Array get_effects();
|
||||||
|
|
||||||
void install_effect(const Variant effect);
|
void install_effect(const Variant effect);
|
||||||
|
|
|
||||||
|
|
@ -3810,12 +3810,12 @@ TextServer::StructuredTextParser TextEdit::get_structured_text_bidi_override() c
|
||||||
return st_parser;
|
return st_parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEdit::set_structured_text_bidi_override_options(Array p_args) {
|
void TextEdit::set_structured_text_bidi_override_options(const Array &p_args) {
|
||||||
if (st_args == p_args) {
|
if (st_args == p_args) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
st_args = p_args;
|
st_args = Array(p_args);
|
||||||
for (int i = 0; i < text.size(); i++) {
|
for (int i = 0; i < text.size(); i++) {
|
||||||
text.set(i, text[i], structured_text_parser(st_parser, st_args, text[i]));
|
text.set(i, text[i], structured_text_parser(st_parser, st_args, text[i]));
|
||||||
}
|
}
|
||||||
|
|
@ -3824,7 +3824,7 @@ void TextEdit::set_structured_text_bidi_override_options(Array p_args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Array TextEdit::get_structured_text_bidi_override_options() const {
|
Array TextEdit::get_structured_text_bidi_override_options() const {
|
||||||
return st_args;
|
return Array(st_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEdit::set_tab_size(const int p_size) {
|
void TextEdit::set_tab_size(const int p_size) {
|
||||||
|
|
|
||||||
|
|
@ -804,7 +804,7 @@ public:
|
||||||
|
|
||||||
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
||||||
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
||||||
void set_structured_text_bidi_override_options(Array p_args);
|
void set_structured_text_bidi_override_options(const Array &p_args);
|
||||||
Array get_structured_text_bidi_override_options() const;
|
Array get_structured_text_bidi_override_options() const;
|
||||||
|
|
||||||
void set_tab_size(const int p_size);
|
void set_tab_size(const int p_size);
|
||||||
|
|
|
||||||
|
|
@ -494,14 +494,14 @@ TextServer::StructuredTextParser TreeItem::get_structured_text_bidi_override(int
|
||||||
return cells[p_column].st_parser;
|
return cells[p_column].st_parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TreeItem::set_structured_text_bidi_override_options(int p_column, Array p_args) {
|
void TreeItem::set_structured_text_bidi_override_options(int p_column, const Array &p_args) {
|
||||||
ERR_FAIL_INDEX(p_column, cells.size());
|
ERR_FAIL_INDEX(p_column, cells.size());
|
||||||
|
|
||||||
if (cells[p_column].st_args == p_args) {
|
if (cells[p_column].st_args == p_args) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
cells.write[p_column].st_args = p_args;
|
cells.write[p_column].st_args = Array(p_args);
|
||||||
cells.write[p_column].dirty = true;
|
cells.write[p_column].dirty = true;
|
||||||
cells.write[p_column].cached_minimum_size_dirty = true;
|
cells.write[p_column].cached_minimum_size_dirty = true;
|
||||||
|
|
||||||
|
|
@ -510,7 +510,7 @@ void TreeItem::set_structured_text_bidi_override_options(int p_column, Array p_a
|
||||||
|
|
||||||
Array TreeItem::get_structured_text_bidi_override_options(int p_column) const {
|
Array TreeItem::get_structured_text_bidi_override_options(int p_column) const {
|
||||||
ERR_FAIL_INDEX_V(p_column, cells.size(), Array());
|
ERR_FAIL_INDEX_V(p_column, cells.size(), Array());
|
||||||
return cells[p_column].st_args;
|
return Array(cells[p_column].st_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TreeItem::set_language(int p_column, const String &p_language) {
|
void TreeItem::set_language(int p_column, const String &p_language) {
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ public:
|
||||||
void set_structured_text_bidi_override(int p_column, TextServer::StructuredTextParser p_parser);
|
void set_structured_text_bidi_override(int p_column, TextServer::StructuredTextParser p_parser);
|
||||||
TextServer::StructuredTextParser get_structured_text_bidi_override(int p_column) const;
|
TextServer::StructuredTextParser get_structured_text_bidi_override(int p_column) const;
|
||||||
|
|
||||||
void set_structured_text_bidi_override_options(int p_column, Array p_args);
|
void set_structured_text_bidi_override_options(int p_column, const Array &p_args);
|
||||||
Array get_structured_text_bidi_override_options(int p_column) const;
|
Array get_structured_text_bidi_override_options(int p_column) const;
|
||||||
|
|
||||||
void set_language(int p_column, const String &p_language);
|
void set_language(int p_column, const String &p_language);
|
||||||
|
|
|
||||||
|
|
@ -3952,16 +3952,16 @@ TextServer::StructuredTextParser TextMesh::get_structured_text_bidi_override() c
|
||||||
return st_parser;
|
return st_parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextMesh::set_structured_text_bidi_override_options(Array p_args) {
|
void TextMesh::set_structured_text_bidi_override_options(const Array &p_args) {
|
||||||
if (st_args != p_args) {
|
if (st_args != p_args) {
|
||||||
st_args = p_args;
|
st_args = Array(p_args);
|
||||||
dirty_text = true;
|
dirty_text = true;
|
||||||
request_update();
|
request_update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Array TextMesh::get_structured_text_bidi_override_options() const {
|
Array TextMesh::get_structured_text_bidi_override_options() const {
|
||||||
return st_args;
|
return Array(st_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextMesh::set_uppercase(bool p_uppercase) {
|
void TextMesh::set_uppercase(bool p_uppercase) {
|
||||||
|
|
|
||||||
|
|
@ -653,7 +653,7 @@ public:
|
||||||
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
void set_structured_text_bidi_override(TextServer::StructuredTextParser p_parser);
|
||||||
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
TextServer::StructuredTextParser get_structured_text_bidi_override() const;
|
||||||
|
|
||||||
void set_structured_text_bidi_override_options(Array p_args);
|
void set_structured_text_bidi_override_options(const Array &p_args);
|
||||||
Array get_structured_text_bidi_override_options() const;
|
Array get_structured_text_bidi_override_options() const;
|
||||||
|
|
||||||
void set_uppercase(bool p_uppercase);
|
void set_uppercase(bool p_uppercase);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue