khanat-client/scenes/interfaces/inventory_window/items_box.gd

8 lines
250 B
GDScript3
Raw Permalink Normal View History

2020-04-01 19:02:49 +00:00
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 )