You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Register theme properties with ThemeDB
This commit is contained in:
@@ -29,14 +29,9 @@
|
||||
/**************************************************************************/
|
||||
|
||||
#include "grid_container.h"
|
||||
|
||||
#include "core/templates/rb_set.h"
|
||||
|
||||
void GridContainer::_update_theme_item_cache() {
|
||||
Container::_update_theme_item_cache();
|
||||
|
||||
theme_cache.h_separation = get_theme_constant(SNAME("h_separation"));
|
||||
theme_cache.v_separation = get_theme_constant(SNAME("v_separation"));
|
||||
}
|
||||
#include "scene/theme/theme_db.h"
|
||||
|
||||
void GridContainer::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
@@ -269,6 +264,9 @@ void GridContainer::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_columns"), &GridContainer::get_columns);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "columns", PROPERTY_HINT_RANGE, "1,1024,1"), "set_columns", "get_columns");
|
||||
|
||||
BIND_THEME_ITEM(Theme::DATA_TYPE_CONSTANT, GridContainer, h_separation);
|
||||
BIND_THEME_ITEM(Theme::DATA_TYPE_CONSTANT, GridContainer, v_separation);
|
||||
}
|
||||
|
||||
Size2 GridContainer::get_minimum_size() const {
|
||||
|
||||
Reference in New Issue
Block a user