Skip to content

Function: FitInRect()

ts
function FitInRect(
   this: void, 
   window: CUIWindow, 
   rect: Frect, 
   horizontal_align: number, 
   vertical_align: number): boolean;

Move a window so it fits inside a rectangle.

Parameters

ParameterTypeDescription
thisvoid-
windowCUIWindowWindow to fit.
rectFrectBounding rectangle.
horizontal_alignnumberHorizontal alignment hint.
vertical_alignnumberVertical alignment hint.

Returns

boolean

Whether the window was adjusted.

Remarks

The window may be moved; its size is not changed.