mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Merge pull request #55225 from bruvzg/fix_ligature_cursor_and_ot_features
This commit is contained in:
@@ -499,7 +499,7 @@ bool Button::_set(const StringName &p_name, const Variant &p_value) {
|
||||
if (str.begins_with("opentype_features/")) {
|
||||
String name = str.get_slicec('/', 1);
|
||||
int32_t tag = TS->name_to_tag(name);
|
||||
double value = p_value;
|
||||
int value = p_value;
|
||||
if (value == -1) {
|
||||
if (opentype_features.has(tag)) {
|
||||
opentype_features.erase(tag);
|
||||
@@ -507,7 +507,7 @@ bool Button::_set(const StringName &p_name, const Variant &p_value) {
|
||||
update();
|
||||
}
|
||||
} else {
|
||||
if ((double)opentype_features[tag] != value) {
|
||||
if (!opentype_features.has(tag) || (int)opentype_features[tag] != value) {
|
||||
opentype_features[tag] = value;
|
||||
_shape();
|
||||
update();
|
||||
@@ -539,7 +539,7 @@ bool Button::_get(const StringName &p_name, Variant &r_ret) const {
|
||||
void Button::_get_property_list(List<PropertyInfo> *p_list) const {
|
||||
for (const Variant *ftr = opentype_features.next(nullptr); ftr != nullptr; ftr = opentype_features.next(ftr)) {
|
||||
String name = TS->tag_to_name(*ftr);
|
||||
p_list->push_back(PropertyInfo(Variant::FLOAT, "opentype_features/" + name));
|
||||
p_list->push_back(PropertyInfo(Variant::INT, "opentype_features/" + name));
|
||||
}
|
||||
p_list->push_back(PropertyInfo(Variant::NIL, "opentype_features/_new", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_EDITOR));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user