mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Bind remaining theme properties to their respective classes
This adds binds for GraphEdit/GraphElement/GraphNode, which were skipped before due to a rework. This also adds binds for Window, which was skipped before due to a complicated code organization. Also adds theme cache entries/direct cache access to a few places that previously missed it. Some theme properties are now exposed to other classes via friendships or public getters for convenience. This removes all string-based theme access from scene/ classes.
This commit is contained in:
@@ -38,6 +38,8 @@ class HBoxContainer;
|
||||
class GraphNode : public GraphElement {
|
||||
GDCLASS(GraphNode, GraphElement);
|
||||
|
||||
friend class GraphEdit;
|
||||
|
||||
struct Slot {
|
||||
bool enable_left = false;
|
||||
int type_left = 0;
|
||||
@@ -74,9 +76,23 @@ class GraphNode : public GraphElement {
|
||||
Vector<PortCache> right_port_cache;
|
||||
|
||||
HashMap<int, Slot> slot_table;
|
||||
|
||||
Vector<int> slot_y_cache;
|
||||
|
||||
struct ThemeCache {
|
||||
Ref<StyleBox> panel;
|
||||
Ref<StyleBox> panel_selected;
|
||||
Ref<StyleBox> titlebar;
|
||||
Ref<StyleBox> titlebar_selected;
|
||||
Ref<StyleBox> slot;
|
||||
|
||||
int separation = 0;
|
||||
int port_h_offset = 0;
|
||||
|
||||
Ref<Texture2D> port;
|
||||
Ref<Texture2D> resizer;
|
||||
Color resizer_color;
|
||||
} theme_cache;
|
||||
|
||||
bool port_pos_dirty = true;
|
||||
|
||||
void _port_pos_update();
|
||||
|
||||
Reference in New Issue
Block a user