commit
b154f445d5
9 changed files with 1059 additions and 11 deletions
1
editor/icons/TextMesh.svg
Normal file
1
editor/icons/TextMesh.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg stroke-miterlimit="10" style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:vectornator="http://vectornator.io"><g fill="#ffca5f" fill-rule="evenodd" vectornator:layerName="Untitled"><path d="M1 1h14v2H1V1Z"/><path d="M7 1h2v14H7V1Z"/><path d="M5 14h6v1H5v-1ZM2 1v4H1V1h1Zm13 0v4h-1V1h1ZM2 3v2a2 2 0 0 1 2-2H2Zm10 0a2 2 0 0 1 2 2V3h-2ZM5 14a2 2 0 0 0 2-2v2H5Zm6 0a2 2 0 0 1-2-2v2h2Z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 517 B |
|
|
@ -31,6 +31,7 @@
|
|||
#include "ot_features_plugin.h"
|
||||
|
||||
#include "scene/3d/label_3d.h"
|
||||
#include "scene/resources/primitive_meshes.h"
|
||||
|
||||
void OpenTypeFeaturesEditor::_value_changed(double val) {
|
||||
if (setting) {
|
||||
|
|
@ -124,11 +125,14 @@ void OpenTypeFeaturesAdd::setup(Object *p_object) {
|
|||
Control *ctrl = Object::cast_to<Control>(edited_object);
|
||||
if (ctrl != nullptr) {
|
||||
font = ctrl->get_theme_font(SNAME("font"));
|
||||
} else {
|
||||
Label3D *l3d = Object::cast_to<Label3D>(edited_object);
|
||||
if (l3d != nullptr) {
|
||||
font = l3d->_get_font_or_default();
|
||||
}
|
||||
}
|
||||
Label3D *l3d = Object::cast_to<Label3D>(edited_object);
|
||||
if (l3d != nullptr) {
|
||||
font = l3d->_get_font_or_default();
|
||||
}
|
||||
TextMesh *tm = Object::cast_to<TextMesh>(edited_object);
|
||||
if (tm != nullptr) {
|
||||
font = tm->_get_font_or_default();
|
||||
}
|
||||
|
||||
if (font.is_null()) {
|
||||
|
|
@ -205,7 +209,7 @@ OpenTypeFeaturesAdd::OpenTypeFeaturesAdd() {
|
|||
/*************************************************************************/
|
||||
|
||||
bool EditorInspectorPluginOpenTypeFeatures::can_handle(Object *p_object) {
|
||||
return (Object::cast_to<Control>(p_object) != nullptr) || (Object::cast_to<Label3D>(p_object) != nullptr);
|
||||
return (Object::cast_to<Control>(p_object) != nullptr) || (Object::cast_to<Label3D>(p_object) != nullptr) || (Object::cast_to<TextMesh>(p_object) != nullptr);
|
||||
}
|
||||
|
||||
bool EditorInspectorPluginOpenTypeFeatures::parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue