Hide text of RichTextLabel if BBCode is enabled
This commit is contained in:
@ -1001,6 +1001,12 @@ void RichTextLabel::_update_fx(RichTextLabel::ItemFrame *p_frame, float p_delta_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RichTextLabel::_validate_property(PropertyInfo &p_property) const {
|
||||||
|
if (use_bbcode && p_property.name == "text") {
|
||||||
|
p_property.usage &= ~PROPERTY_USAGE_EDITOR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RichTextLabel::_notification(int p_what) {
|
void RichTextLabel::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_MOUSE_EXIT: {
|
case NOTIFICATION_MOUSE_EXIT: {
|
||||||
@ -2726,6 +2732,7 @@ void RichTextLabel::set_use_bbcode(bool p_enable) {
|
|||||||
}
|
}
|
||||||
use_bbcode = p_enable;
|
use_bbcode = p_enable;
|
||||||
set_bbcode(bbcode);
|
set_bbcode(bbcode);
|
||||||
|
property_list_changed_notify();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RichTextLabel::is_using_bbcode() const {
|
bool RichTextLabel::is_using_bbcode() const {
|
||||||
|
|||||||
@ -414,6 +414,7 @@ private:
|
|||||||
bool fit_content_height;
|
bool fit_content_height;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual void _validate_property(PropertyInfo &p_property) const;
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user