Fix Note Viewport not scaling correctly on unscaled RadialGame

This commit is contained in:
Luke Hubmayer-Werner 2021-01-30 23:12:41 +10:30
parent 37da68fec9
commit acdc8510c1
1 changed files with 2 additions and 1 deletions

View File

@ -14,12 +14,13 @@ func set_render_scale(scale: Vector2):
func _ready(): func _ready():
Settings.connect('subsampling_changed', self, 'set_render_scale') Settings.connect('subsampling_changed', self, 'set_render_scale')
set_render_scale(Settings.subsampling) set_render_scale(Settings.subsampling)
_on_Square_item_rect_changed()
onready var Square := $'../../' onready var Square := $'../../'
onready var Root := $'/root' onready var Root := $'/root'
onready var Main := $'/root/main' onready var Main := $'/root/main'
func _on_Square_item_rect_changed() -> void: 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 container_size = Square.rect_size * winscale
set_render_scale(scale) set_render_scale(scale)