You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Add ThemeDB, expose previously static Theme methods
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include "editor/editor_settings.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/theme/theme_db.h"
|
||||
|
||||
namespace gdmono {
|
||||
|
||||
@@ -195,7 +196,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr
|
||||
Node *base = _try_find_owner_node_in_tree(script);
|
||||
if (base && Object::cast_to<Control>(base)) {
|
||||
List<StringName> sn;
|
||||
Theme::get_default()->get_color_list(base->get_class(), &sn);
|
||||
ThemeDB::get_singleton()->get_default_theme()->get_color_list(base->get_class(), &sn);
|
||||
|
||||
for (const StringName &E : sn) {
|
||||
suggestions.push_back(quoted(E));
|
||||
@@ -207,7 +208,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr
|
||||
Node *base = _try_find_owner_node_in_tree(script);
|
||||
if (base && Object::cast_to<Control>(base)) {
|
||||
List<StringName> sn;
|
||||
Theme::get_default()->get_constant_list(base->get_class(), &sn);
|
||||
ThemeDB::get_singleton()->get_default_theme()->get_constant_list(base->get_class(), &sn);
|
||||
|
||||
for (const StringName &E : sn) {
|
||||
suggestions.push_back(quoted(E));
|
||||
@@ -219,7 +220,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr
|
||||
Node *base = _try_find_owner_node_in_tree(script);
|
||||
if (base && Object::cast_to<Control>(base)) {
|
||||
List<StringName> sn;
|
||||
Theme::get_default()->get_font_list(base->get_class(), &sn);
|
||||
ThemeDB::get_singleton()->get_default_theme()->get_font_list(base->get_class(), &sn);
|
||||
|
||||
for (const StringName &E : sn) {
|
||||
suggestions.push_back(quoted(E));
|
||||
@@ -231,7 +232,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr
|
||||
Node *base = _try_find_owner_node_in_tree(script);
|
||||
if (base && Object::cast_to<Control>(base)) {
|
||||
List<StringName> sn;
|
||||
Theme::get_default()->get_font_size_list(base->get_class(), &sn);
|
||||
ThemeDB::get_singleton()->get_default_theme()->get_font_size_list(base->get_class(), &sn);
|
||||
|
||||
for (const StringName &E : sn) {
|
||||
suggestions.push_back(quoted(E));
|
||||
@@ -243,7 +244,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr
|
||||
Node *base = _try_find_owner_node_in_tree(script);
|
||||
if (base && Object::cast_to<Control>(base)) {
|
||||
List<StringName> sn;
|
||||
Theme::get_default()->get_stylebox_list(base->get_class(), &sn);
|
||||
ThemeDB::get_singleton()->get_default_theme()->get_stylebox_list(base->get_class(), &sn);
|
||||
|
||||
for (const StringName &E : sn) {
|
||||
suggestions.push_back(quoted(E));
|
||||
|
||||
Reference in New Issue
Block a user