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:
@ -80,6 +80,23 @@ Vector<int> MarginContainer::get_allowed_size_flags_vertical() const {
|
||||
return flags;
|
||||
}
|
||||
|
||||
int MarginContainer::get_margin_size(Side p_side) const {
|
||||
ERR_FAIL_INDEX_V((int)p_side, 4, 0);
|
||||
|
||||
switch (p_side) {
|
||||
case SIDE_LEFT:
|
||||
return theme_cache.margin_left;
|
||||
case SIDE_RIGHT:
|
||||
return theme_cache.margin_right;
|
||||
case SIDE_TOP:
|
||||
return theme_cache.margin_top;
|
||||
case SIDE_BOTTOM:
|
||||
return theme_cache.margin_bottom;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MarginContainer::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_SORT_CHILDREN: {
|
||||
|
||||
Reference in New Issue
Block a user