Dynamic properties.
| 42 | |
| 43 | // Dynamic properties. |
| 44 | bool Theme::_set(const StringName &p_name, const Variant &p_value) { |
| 45 | String sname = p_name; |
| 46 | |
| 47 | if (sname.contains_char('/')) { |
| 48 | String type = sname.get_slicec('/', 1); |
| 49 | String theme_type = sname.get_slicec('/', 0); |
| 50 | String prop_name = sname.get_slicec('/', 2); |
| 51 | |
| 52 | if (type == "icons") { |
| 53 | set_icon(prop_name, theme_type, p_value); |
| 54 | } else if (type == "styles") { |
| 55 | set_stylebox(prop_name, theme_type, p_value); |
| 56 | } else if (type == "fonts") { |
| 57 | set_font(prop_name, theme_type, p_value); |
| 58 | } else if (type == "font_sizes") { |
| 59 | set_font_size(prop_name, theme_type, p_value); |
| 60 | } else if (type == "colors") { |
| 61 | set_color(prop_name, theme_type, p_value); |
| 62 | } else if (type == "constants") { |
| 63 | set_constant(prop_name, theme_type, p_value); |
| 64 | } else if (type == "base_type") { |
| 65 | set_type_variation(theme_type, p_value); |
| 66 | } else { |
| 67 | return false; |
| 68 | } |
| 69 | |
| 70 | return true; |
| 71 | } |
| 72 | |
| 73 | return false; |
| 74 | } |
| 75 | |
| 76 | bool Theme::_get(const StringName &p_name, Variant &r_ret) const { |
| 77 | String sname = p_name; |
nothing calls this directly
no test coverage detected