Table of Contents

Class AspectRatioContainer

A container that preserves the proportions of its child controls.

Inheritance
AspectRatioContainer

Remarks

A container type that arranges its child controls in a way that preserves their proportions automatically when the container is resized. Useful when a container has a dynamic size and the child nodes must adjust their sizes accordingly without losing their aspect ratios.

See Also

Properties

alignment_horizontal

Specifies the horizontal relative position of child controls.

var alignment_horizontal : int = 1

Property Value

int

Remarks

  • void set_alignment_horizontal(int value)
  • int get_alignment_horizontal

alignment_vertical

Specifies the vertical relative position of child controls.

var alignment_vertical : int = 1

Property Value

int

Remarks

  • void set_alignment_vertical(int value)
  • int get_alignment_vertical

ratio

The aspect ratio to enforce on child controls. This is the width divided by the height. The ratio depends on the stretch_mode.

var ratio : float = 1.0

Property Value

float

Remarks

stretch_mode

The stretch mode used to align child controls.

var stretch_mode : int = 2

Property Value

int

Remarks

  • void set_stretch_mode(int value)
  • int get_stretch_mode