Class: MockCUICheckButton
Mock check button.
Extends
Implements
CUICheckButton
Accessors
__name
Get Signature
get __name(): string;Returns
string
Implementation of
CUICheckButton.__nameInherited from
__name
Get Signature
get static __name(): string;Returns
string
Inherited from
Constructors
Constructor
new MockCUICheckButton(): MockCUICheckButton;Returns
MockCUICheckButton
Inherited from
Methods
GetHeight()
GetHeight(): number;Returns
number
Window height.
Implementation of
CUICheckButton.GetHeightInherited from
GetWidth()
GetWidth(): number;Returns
number
Window width.
Implementation of
CUICheckButton.GetWidthInherited from
OnKeyboard()
OnKeyboard(): boolean;Returns
boolean
Inherited from
Show()
Show(isShown: boolean): void;Show or hide the window.
Parameters
| Parameter | Type |
|---|---|
isShown | boolean |
Returns
void
Remarks
Visibility does not attach, detach, enable, or disable the window.
Implementation of
CUICheckButton.ShowInherited from
create()
static create(): MockCUICheckButton;Returns
MockCUICheckButton
Overrides
mock()
static mock(): CUICheckButton;Returns
CUICheckButton
Overrides
Properties
AttachChild
AttachChild: Mock<(window: CUIWindow) => void>;Attach a child window.
Remarks
The Lua binding adopts child; after attachment, treat the parent as owning its lifetime.
Param
child
Child window.
Implementation of
CUICheckButton.AttachChildInherited from
children
children: CUIWindow[] = [];Inherited from
DetachChild
DetachChild: Mock<(window: CUIWindow) => void>;Detach a child window.
Remarks
Detaching removes the parent relation. It does not reinitialize the window or attach it elsewhere.
Param
child
Child window.
Implementation of
CUICheckButton.DetachChildInherited from
Enable
Enable: Mock<(isEnabled: boolean) => void>;Enable or disable interaction.
Remarks
Enabled state and visibility are separate. Hidden controls can still be enabled.
Param
is_enabled
Whether the window should be enabled.
Implementation of
CUICheckButton.EnableInherited from
focusReceiveTime
focusReceiveTime: number = 0;Inherited from
MockCUI3tButton.focusReceiveTime
FocusReceiveTime
FocusReceiveTime: Mock<() => number>;Returns
Level time when this window received focus.
Implementation of
CUICheckButton.FocusReceiveTimeInherited from
MockCUI3tButton.FocusReceiveTime
GetAbsoluteRect
GetAbsoluteRect: Mock<() => Frect>;Returns
Window rectangle in screen coordinates.
Implementation of
CUICheckButton.GetAbsoluteRectInherited from
MockCUI3tButton.GetAbsoluteRect
GetCheck
GetCheck: Mock<() => boolean>;Returns
Whether the button is checked.
Implementation of
CUICheckButton.GetCheckGetColor
GetColor: Mock<() => number>;Returns
Texture color.
Implementation of
CUICheckButton.GetColorInherited from
GetFont
GetFont: Mock<() => CGameFont>;Get the font assigned to this window.
Remarks
Text controls need a font assigned before drawing custom text reliably.
Returns
Font assigned to this window.
Implementation of
CUICheckButton.GetFontInherited from
GetHeading
GetHeading: Mock<() => number>;Returns
Heading angle.
Implementation of
CUICheckButton.GetHeadingInherited from
GetMouseX
GetMouseX: Mock<() => number>;Get cursor X coordinate stored on this window.
Since
OpenXRay 2026-01-01, e3b0e3c5, PR #2028
Source
src/xrUICore/ui_export_script.cpp, CUIWindow.GetMouseX binding.
Returns
Current cursor X coordinate.
Implementation of
CUICheckButton.GetMouseXInherited from
GetMouseY
GetMouseY: Mock<() => number>;Get cursor Y coordinate stored on this window.
Since
OpenXRay 2026-01-01, e3b0e3c5, PR #2028
Source
src/xrUICore/ui_export_script.cpp, CUIWindow.GetMouseY binding.
Returns
Current cursor Y coordinate.
Implementation of
CUICheckButton.GetMouseYInherited from
GetOriginalRect
GetOriginalRect: Mock<() => Frect>;Returns
Original texture rectangle.
Implementation of
CUICheckButton.GetOriginalRectInherited from
MockCUI3tButton.GetOriginalRect
GetStretchTexture
GetStretchTexture: Mock<() => boolean>;Returns
Whether texture stretching is enabled.
Implementation of
CUICheckButton.GetStretchTextureInherited from
MockCUI3tButton.GetStretchTexture
GetText
GetText: Mock<() => string>;Returns
Current text.
Implementation of
CUICheckButton.GetTextInherited from
GetTextAlign
GetTextAlign: Mock<() => number>;Returns
Text alignment id.
Implementation of
CUICheckButton.GetTextAlignInherited from
GetTextureColor
GetTextureColor: Mock<() => number>;Returns
Texture color.
Implementation of
CUICheckButton.GetTextureColorInherited from
MockCUI3tButton.GetTextureColor
GetTextureRect
GetTextureRect: Mock<() => Frect>;Returns
Texture rectangle.
Implementation of
CUICheckButton.GetTextureRectInherited from
MockCUI3tButton.GetTextureRect
GetTextX
GetTextX: Mock<() => number>;Returns
Text X offset.
Implementation of
CUICheckButton.GetTextXInherited from
GetTextY
GetTextY: Mock<() => number>;Returns
Text Y offset.
Implementation of
CUICheckButton.GetTextYInherited from
GetWndPos
GetWndPos: Mock<() => vector2>;Returns
Window position relative to its parent.
Implementation of
CUICheckButton.GetWndPosInherited from
heading
heading: number = 0;Inherited from
Init
Init: Mock<(rectOrX: number | Frect, y?: number, width?: number, height?: number) => void>;Initialize window rectangle.
Param
frect
Window rectangle.
Implementation of
CUICheckButton.InitInherited from
InitTexture
InitTexture: Mock<(texture: string) => void>;Assign texture by atlas id.
Param
texture
Texture id.
Implementation of
CUICheckButton.InitTextureInherited from
InitTextureEx
InitTextureEx: Mock<(texture: string, shader: string) => void>;Assign texture and shader by name.
Param
first
Texture id.
Param
second
Shader id.
Implementation of
CUICheckButton.InitTextureExInherited from
isAutoDelete
isAutoDelete: boolean = false;Inherited from
IsAutoDelete
IsAutoDelete: Mock<() => boolean>;Returns
Whether the engine owns and deletes this window with its parent.
Implementation of
CUICheckButton.IsAutoDeleteInherited from
isChecked
isChecked: boolean = false;IsCursorOverWindow
IsCursorOverWindow: Mock<() => boolean>;Returns
Whether the UI cursor is currently over this window.
Implementation of
CUICheckButton.IsCursorOverWindowInherited from
MockCUI3tButton.IsCursorOverWindow
isEnabled
isEnabled: boolean = false;Inherited from
IsEnabled
IsEnabled: Mock<() => boolean>;Returns
Whether the window accepts interaction.
Implementation of
CUICheckButton.IsEnabledInherited from
isPostProcessMode
isPostProcessMode: boolean = false;Inherited from
MockCUI3tButton.isPostProcessMode
isShown
isShown: boolean = false;Inherited from
IsShown
IsShown: Mock<() => boolean>;Returns
Whether the window is visible.
Implementation of
CUICheckButton.IsShownInherited from
mouseX
mouseX: number = 0;Inherited from
mouseY
mouseY: number = 0;Inherited from
originalRect
originalRect: Frect;Inherited from
ResetPPMode
ResetPPMode: Mock<() => void>;Disable post-process mode for this window.
Remarks
Pair with CUIWindow.SetPPMode when a window no longer needs post-process rendering.
Implementation of
CUICheckButton.ResetPPModeInherited from
SetAutoDelete
SetAutoDelete: Mock<(isAutoDelete: boolean) => void>;Set whether the parent owns this child window.
Remarks
Use this for script-created windows that are attached to a parent and should be cleaned up with the UI tree.
Param
auto_delete
Whether the engine should delete the child automatically.
Implementation of
CUICheckButton.SetAutoDeleteInherited from
SetCheck
SetCheck: Mock<(isChecked: boolean) => void>;Set checked state.
Param
value
New checked state.
Implementation of
CUICheckButton.SetCheckSetColor
SetColor: Mock<(color: number) => void>;Set texture color.
Param
color
ARGB color.
Implementation of
CUICheckButton.SetColorInherited from
SetDependControl
SetDependControl: Mock<UnknownFunction>;Bind another control to this checkbox state.
Remarks
The dependent control follows this checkbox state in the UI.
Param
window
Dependent control.
Implementation of
CUICheckButton.SetDependControlSetElipsis
SetElipsis: Mock<UnknownFunction>;Configure text ellipsis.
Param
a
Ellipsis mode.
Param
b
Indent.
Implementation of
CUICheckButton.SetElipsisInherited from
SetFont
SetFont: Mock<(font: CGameFont) => void>;Set the font used by this window.
Param
font
Font object.
Implementation of
CUICheckButton.SetFontInherited from
SetHeading
SetHeading: Mock<(heading: number) => void>;Set heading angle.
Param
number
Heading angle.
Implementation of
CUICheckButton.SetHeadingInherited from
SetHeight
SetHeight: Mock<(height: number) => void>;Set window height.
Param
height
New height.
Implementation of
CUICheckButton.SetHeightInherited from
SetOriginalRect
SetOriginalRect: Mock<(rect: Frect) => void>;Set original texture rectangle.
Param
frect
Original rectangle.
Implementation of
CUICheckButton.SetOriginalRectInherited from
MockCUI3tButton.SetOriginalRect
SetPPMode
SetPPMode: Mock<() => void>;Enable post-process mode for this window.
Remarks
Use for windows meant to be drawn through the post-process UI path, and reset it when the window returns to normal UI rendering.
Implementation of
CUICheckButton.SetPPModeInherited from
SetStretchTexture
SetStretchTexture: Mock<(stretch: boolean) => void>;Enable or disable texture stretching.
Param
stretch
Whether texture should stretch to the window rect.
Implementation of
CUICheckButton.SetStretchTextureInherited from
MockCUI3tButton.SetStretchTexture
SetText
SetText: Mock<(text: string) => void>;Set raw text.
Param
text
Text value.
Implementation of
CUICheckButton.SetTextInherited from
SetTextAlign
SetTextAlign: Mock<(align: number) => void>;Set text alignment.
Param
align
Alignment id.
Implementation of
CUICheckButton.SetTextAlignInherited from
SetTextColor
SetTextColor: Mock<(a: number, r: number, g: number, b: number) => void>;Set text color from color channels.
Param
a
Alpha channel.
Param
r
Red channel.
Param
g
Green channel.
Param
b
Blue channel.
Implementation of
CUICheckButton.SetTextColorInherited from
SetTextST
SetTextST: Mock<(text: string) => void>;Set translated string-table text.
Param
string
String table id.
Implementation of
CUICheckButton.SetTextSTInherited from
SetTextureColor
SetTextureColor: Mock<(color: number) => void>;Set texture color.
Param
color
ARGB color.
Implementation of
CUICheckButton.SetTextureColorInherited from
MockCUI3tButton.SetTextureColor
SetTextureOffset
SetTextureOffset: Mock<(x: number, y: number) => void>;Set texture drawing offset.
Param
x
X offset.
Param
y
Y offset.
Implementation of
CUICheckButton.SetTextureOffsetInherited from
MockCUI3tButton.SetTextureOffset
SetTextureRect
SetTextureRect: Mock<(rect: Frect) => void>;Set source texture rectangle.
Param
frect
Texture rectangle.
Implementation of
CUICheckButton.SetTextureRectInherited from
MockCUI3tButton.SetTextureRect
SetTextX
SetTextX: Mock<(x: number) => void>;Set text X offset.
Param
x
X offset.
Implementation of
CUICheckButton.SetTextXInherited from
SetTextY
SetTextY: Mock<(y: number) => void>;Set text Y offset.
Param
x
Y offset.
Implementation of
CUICheckButton.SetTextYInherited from
SetWidth
SetWidth: Mock<(width: number) => void>;Set window width.
Param
width
New width.
Implementation of
CUICheckButton.SetWidthInherited from
SetWindowName
SetWindowName: Mock<(name: string) => void>;Set debug/window name.
Param
name
Window name.
Implementation of
CUICheckButton.SetWindowNameInherited from
SetWndPos
SetWndPos: Mock<(positionOrX: number | vector2, y?: number) => void>;Set window position.
Param
vector2
New position.
Implementation of
CUICheckButton.SetWndPosInherited from
SetWndRect
SetWndRect: Mock<(rectOrX: number | Frect, y?: number, width?: number, height?: number) => void>;Set window rectangle.
Param
rect
New rectangle.
Implementation of
CUICheckButton.SetWndRectInherited from
SetWndSize
SetWndSize: Mock<(sizeOrWidth: number | vector2, height?: number) => void>;Set window size.
Param
vector2
New size.
Implementation of
CUICheckButton.SetWndSizeInherited from
shader
shader: string | null = null;Inherited from
stretchTexture
stretchTexture: boolean = false;Inherited from
MockCUI3tButton.stretchTexture
text
text: string = "";Inherited from
textAlign
textAlign: number = 0;Inherited from
textColor
textColor: number = 0xffffffff;Inherited from
textControl
textControl: CUILines;Inherited from
TextControl
TextControl: Mock<() => CUILines>;Returns
Text line controller.
Implementation of
CUICheckButton.TextControlInherited from
texture
texture: string | null = null;Inherited from
textureColor
textureColor: number = 0xffffffff;Inherited from
textureOffsetX
textureOffsetX: number = 0;Inherited from
MockCUI3tButton.textureOffsetX
textureOffsetY
textureOffsetY: number = 0;Inherited from
MockCUI3tButton.textureOffsetY
textureRect
textureRect: Frect;Inherited from
textX
textX: number = 0;Inherited from
textY
textY: number = 0;Inherited from
windowFont
windowFont: CGameFont | null = null;Inherited from
windowName
windowName: string | null = null;Inherited from
WindowName
WindowName: Mock<() => string>;Returns
Window name.
Implementation of
CUICheckButton.WindowNameInherited from
windowPosition
windowPosition: vector2;Inherited from
MockCUI3tButton.windowPosition
windowRect
windowRect: Frect | null = null;Inherited from
windowSize
windowSize: vector2;