From 25dcc5e2fae5d9bd8c8353ebc5b62b1f5e653f4f Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Fri, 1 Jan 2021 23:51:41 +1030 Subject: [PATCH] Softcode base scaling factor --- scripts/NoteViewport.gd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/NoteViewport.gd b/scripts/NoteViewport.gd index 347d8ae..f8895e8 100644 --- a/scripts/NoteViewport.gd +++ b/scripts/NoteViewport.gd @@ -4,13 +4,14 @@ export var SubsampleXControl = @'/root/main/InputHandler/SSXSlider' export var SubsampleYControl = @'/root/main/InputHandler/SSYSlider' onready var SSX = get_node(SubsampleXControl) onready var SSY = get_node(SubsampleYControl) +onready var base_height = ProjectSettings.get_setting('display/window/size/height') func set_render_scale(scale: Vector2): var ws = OS.window_size var dim = min(ws.x, ws.y) size = Vector2(dim, dim) * scale $Center.position = size * 0.5 - $Center.scale = size/1080 + $Center.scale = size/base_height func slider_slot(arg1): set_render_scale(Vector2(SSX.value, SSY.value))