Fix Note Viewport not scaling correctly on unscaled RadialGame
This commit is contained in:
parent
37da68fec9
commit
acdc8510c1
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue