String: Add contains().
This commit is contained in:
@ -46,7 +46,7 @@ int Theme::fallback_font_size = 16;
|
||||
bool Theme::_set(const StringName &p_name, const Variant &p_value) {
|
||||
String sname = p_name;
|
||||
|
||||
if (sname.find("/") != -1) {
|
||||
if (sname.contains("/")) {
|
||||
String type = sname.get_slicec('/', 1);
|
||||
String theme_type = sname.get_slicec('/', 0);
|
||||
String name = sname.get_slicec('/', 2);
|
||||
@ -78,7 +78,7 @@ bool Theme::_set(const StringName &p_name, const Variant &p_value) {
|
||||
bool Theme::_get(const StringName &p_name, Variant &r_ret) const {
|
||||
String sname = p_name;
|
||||
|
||||
if (sname.find("/") != -1) {
|
||||
if (sname.contains("/")) {
|
||||
String type = sname.get_slicec('/', 1);
|
||||
String theme_type = sname.get_slicec('/', 0);
|
||||
String name = sname.get_slicec('/', 2);
|
||||
|
||||
Reference in New Issue
Block a user