From 1cf9055fd1a6811f48e83589a49f56cd498fca24 Mon Sep 17 00:00:00 2001 From: tpart Date: Sat, 20 Jul 2024 18:40:03 +0200 Subject: Fix book scaling --- client/menu/book/book.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'client/menu') diff --git a/client/menu/book/book.gd b/client/menu/book/book.gd index 594d0a4b..43df3ebe 100644 --- a/client/menu/book/book.gd +++ b/client/menu/book/book.gd @@ -18,8 +18,11 @@ extends Menu func _ready(): super() for i in range(1, 6): - var texture = TextureRect.new() + var texture := TextureRect.new() texture.texture = load("res://menu/book/book_%d.webp" % i) + texture.expand_mode = TextureRect.EXPAND_FIT_WIDTH + texture.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED + texture.custom_minimum_size = get_viewport_rect().size $ScrollContainer/VBoxContainer.add_child(texture) func menu_anim_open(): pass -- cgit v1.2.3-70-g09d2