Finalize Player Menu and UI scaling
This commit is contained in:
parent
5af84eaf47
commit
3900b46618
17 changed files with 1002 additions and 322 deletions
|
|
@ -484,24 +484,9 @@ func _cancel_backdrop_fade() -> void:
|
|||
func _update_responsive_pause_stage() -> void:
|
||||
if not is_node_ready():
|
||||
return
|
||||
var display_size := Vector2(
|
||||
maxf(1.0, size.x),
|
||||
maxf(1.0, size.y)
|
||||
)
|
||||
var reference_size: Vector2 = (
|
||||
PAUSE_COMPACT_REFERENCE_SIZE
|
||||
if display_size.y < COMPACT_HEIGHT_THRESHOLD
|
||||
else PAUSE_DESKTOP_REFERENCE_SIZE
|
||||
)
|
||||
var presentation_scale: float = minf(
|
||||
display_size.x / reference_size.x,
|
||||
display_size.y / reference_size.y
|
||||
)
|
||||
_presentation_scale_root.size = reference_size
|
||||
_presentation_scale_root.scale = Vector2.ONE * presentation_scale
|
||||
_presentation_scale_root.position = (
|
||||
display_size - reference_size * presentation_scale
|
||||
) * 0.5
|
||||
_presentation_scale_root.size = PAUSE_DESKTOP_REFERENCE_SIZE
|
||||
_presentation_scale_root.scale = Vector2.ONE
|
||||
_presentation_scale_root.position = Vector2.ZERO
|
||||
|
||||
|
||||
func _restore_controls() -> void:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue