10 lines
189 B
GDScript
10 lines
189 B
GDScript
@tool
|
|
extends AspectRatioContainer
|
|
|
|
func _ready() -> void:
|
|
resized.connect(_update_height)
|
|
_update_height()
|
|
|
|
func _update_height() -> void:
|
|
custom_minimum_size.y = ceilf(size.x / ratio)
|