fix: support tooltips in effect for native scene (#14812)

This commit is contained in:
dogeFu
2023-04-18 09:44:11 +08:00
committed by GitHub
parent be5e2edfde
commit 8d95d24ee0
3 changed files with 14 additions and 2 deletions
@@ -1013,6 +1013,18 @@ bool sevalue_to_native(const se::Value &from, ccstd::vector<bool> *to, se::Objec
return true;
}
// NOLINTNEXTLINE(readability-identifier-naming)
bool sevalue_to_native(const se::Value &from, ccstd::variant<ccstd::string, bool> *to, se::Object * /*ctx*/) {
if (from.isBoolean()) {
*to = from.toBoolean();
} else if (from.isString()) {
*to = from.toString();
} else {
CC_ASSERT(false);
}
return true;
}
// NOLINTNEXTLINE(readability-identifier-naming)
bool sevalue_to_native(const se::Value &from, ccstd::vector<unsigned char> *to, se::Object * /*ctx*/) {
if (from.isNullOrUndefined()) {
@@ -373,7 +373,7 @@ inline bool sevalue_to_native(const se::Value &from, ccstd::string **to, se::Obj
bool sevalue_to_native(const se::Value &from, cc::ValueMap *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming)
bool sevalue_to_native(const se::Value &from, ccstd::vector<bool> *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming)
bool sevalue_to_native(const se::Value &from, ccstd::variant<ccstd::string, bool> *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming)
bool sevalue_to_native(const se::Value &from, ccstd::vector<unsigned char> *to, se::Object * /*ctx*/); // NOLINT(readability-identifier-naming)
bool sevalue_to_native(const se::Value &from, cc::IPropertyValue *to, se::Object *ctx); // NOLINT(readability-identifier-naming)
inline bool sevalue_to_native(const se::Value & /*from*/, ccstd::monostate * /*to*/, se::Object * /*ctx*/) { // NOLINT(readability-identifier-naming)
+1 -1
View File
@@ -516,7 +516,7 @@ struct IDefineInfo {
ccstd::optional<ccstd::vector<ccstd::string>> options;
ccstd::optional<ccstd::string> defaultVal;
ccstd::optional<ccstd::vector<ccstd::string>> defines; // NOTE: it's only used in Editor
ccstd::optional<ccstd::unordered_map<ccstd::string, bool>> editor; // NOTE: it's only used in Editor
ccstd::optional<ccstd::unordered_map<ccstd::string, ccstd::variant<ccstd::string, bool>>> editor; // NOTE: it's only used in Editor
};
struct IBuiltin {