From acdc8510c1b2f3c49db95c1846a5db983afaa83a Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Sat, 30 Jan 2021 23:12:41 +1030 Subject: [PATCH] Fix Note Viewport not scaling correctly on unscaled RadialGame --- scripts/NoteViewport.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/NoteViewport.gd b/scripts/NoteViewport.gd index df4165f..583bf92 100644 --- a/scripts/NoteViewport.gd +++ b/scripts/NoteViewport.gd @@ -14,12 +14,13 @@ func set_render_scale(scale: Vector2): func _ready(): Settings.connect('subsampling_changed', self, 'set_render_scale') set_render_scale(Settings.subsampling) + _on_Square_item_rect_changed() onready var Square := $'../../' onready var Root := $'/root' onready var Main := $'/root/main' func _on_Square_item_rect_changed() -> void: - var winscale = Root.size.x/Main.rect_size.x + var winscale = min(Root.size.x, Root.size.y)/base_height container_size = Square.rect_size * winscale set_render_scale(scale)