khanat-client/scenes/interfaces/inventory_window/items_box.gd
2020-04-01 21:02:49 +02:00

7 lines
250 B
GDScript

extends GridContainer
func _on_items_box_resized():
var inventory_window = self.find_parent("inventory_window")
if inventory_window:
var nb_columns = ( inventory_window.get_size().x - 32 ) / 32
self.set_columns( nb_columns )