mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
fix: support tooltips in effect for native scene (#14812)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user