Skip to content

Class: MockCUICheckButton ​

Mock check button.

Extends ​

Implements ​

  • CUICheckButton

Accessors ​

__name ​

Get Signature ​

ts
get __name(): string;
Returns ​

string

Implementation of ​

ts
CUICheckButton.__name

Inherited from ​

MockCUI3tButton.__name


__name ​

Get Signature ​

ts
get static __name(): string;
Returns ​

string

Inherited from ​

MockCUI3tButton.__name

Constructors ​

Constructor ​

ts
new MockCUICheckButton(): MockCUICheckButton;

Returns ​

MockCUICheckButton

Inherited from ​

MockCUI3tButton.constructor

Methods ​

GetHeight() ​

ts
GetHeight(): number;

Returns ​

number

Window height.

Implementation of ​

ts
CUICheckButton.GetHeight

Inherited from ​

MockCUI3tButton.GetHeight


GetWidth() ​

ts
GetWidth(): number;

Returns ​

number

Window width.

Implementation of ​

ts
CUICheckButton.GetWidth

Inherited from ​

MockCUI3tButton.GetWidth


OnKeyboard() ​

ts
OnKeyboard(): boolean;

Returns ​

boolean

Inherited from ​

MockCUI3tButton.OnKeyboard


Show() ​

ts
Show(isShown: boolean): void;

Show or hide the window.

Parameters ​

ParameterType
isShownboolean

Returns ​

void

Remarks ​

Visibility does not attach, detach, enable, or disable the window.

Implementation of ​

ts
CUICheckButton.Show

Inherited from ​

MockCUI3tButton.Show


create() ​

ts
static create(): MockCUICheckButton;

Returns ​

MockCUICheckButton

Overrides ​

MockCUI3tButton.create


mock() ​

ts
static mock(): CUICheckButton;

Returns ​

CUICheckButton

Overrides ​

MockCUI3tButton.mock

Properties ​

AttachChild ​

ts
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 ​

ts
CUICheckButton.AttachChild

Inherited from ​

MockCUI3tButton.AttachChild


children ​

ts
children: CUIWindow[] = [];

Inherited from ​

MockCUI3tButton.children


DetachChild ​

ts
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 ​

ts
CUICheckButton.DetachChild

Inherited from ​

MockCUI3tButton.DetachChild


Enable ​

ts
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 ​

ts
CUICheckButton.Enable

Inherited from ​

MockCUI3tButton.Enable


focusReceiveTime ​

ts
focusReceiveTime: number = 0;

Inherited from ​

MockCUI3tButton.focusReceiveTime


FocusReceiveTime ​

ts
FocusReceiveTime: Mock<() => number>;

Returns ​

Level time when this window received focus.

Implementation of ​

ts
CUICheckButton.FocusReceiveTime

Inherited from ​

MockCUI3tButton.FocusReceiveTime


GetAbsoluteRect ​

ts
GetAbsoluteRect: Mock<() => Frect>;

Returns ​

Window rectangle in screen coordinates.

Implementation of ​

ts
CUICheckButton.GetAbsoluteRect

Inherited from ​

MockCUI3tButton.GetAbsoluteRect


GetCheck ​

ts
GetCheck: Mock<() => boolean>;

Returns ​

Whether the button is checked.

Implementation of ​

ts
CUICheckButton.GetCheck

GetColor ​

ts
GetColor: Mock<() => number>;

Returns ​

Texture color.

Implementation of ​

ts
CUICheckButton.GetColor

Inherited from ​

MockCUI3tButton.GetColor


GetFont ​

ts
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 ​

ts
CUICheckButton.GetFont

Inherited from ​

MockCUI3tButton.GetFont


GetHeading ​

ts
GetHeading: Mock<() => number>;

Returns ​

Heading angle.

Implementation of ​

ts
CUICheckButton.GetHeading

Inherited from ​

MockCUI3tButton.GetHeading


GetMouseX ​

ts
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 ​

ts
CUICheckButton.GetMouseX

Inherited from ​

MockCUI3tButton.GetMouseX


GetMouseY ​

ts
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 ​

ts
CUICheckButton.GetMouseY

Inherited from ​

MockCUI3tButton.GetMouseY


GetOriginalRect ​

ts
GetOriginalRect: Mock<() => Frect>;

Returns ​

Original texture rectangle.

Implementation of ​

ts
CUICheckButton.GetOriginalRect

Inherited from ​

MockCUI3tButton.GetOriginalRect


GetStretchTexture ​

ts
GetStretchTexture: Mock<() => boolean>;

Returns ​

Whether texture stretching is enabled.

Implementation of ​

ts
CUICheckButton.GetStretchTexture

Inherited from ​

MockCUI3tButton.GetStretchTexture


GetText ​

ts
GetText: Mock<() => string>;

Returns ​

Current text.

Implementation of ​

ts
CUICheckButton.GetText

Inherited from ​

MockCUI3tButton.GetText


GetTextAlign ​

ts
GetTextAlign: Mock<() => number>;

Returns ​

Text alignment id.

Implementation of ​

ts
CUICheckButton.GetTextAlign

Inherited from ​

MockCUI3tButton.GetTextAlign


GetTextureColor ​

ts
GetTextureColor: Mock<() => number>;

Returns ​

Texture color.

Implementation of ​

ts
CUICheckButton.GetTextureColor

Inherited from ​

MockCUI3tButton.GetTextureColor


GetTextureRect ​

ts
GetTextureRect: Mock<() => Frect>;

Returns ​

Texture rectangle.

Implementation of ​

ts
CUICheckButton.GetTextureRect

Inherited from ​

MockCUI3tButton.GetTextureRect


GetTextX ​

ts
GetTextX: Mock<() => number>;

Returns ​

Text X offset.

Implementation of ​

ts
CUICheckButton.GetTextX

Inherited from ​

MockCUI3tButton.GetTextX


GetTextY ​

ts
GetTextY: Mock<() => number>;

Returns ​

Text Y offset.

Implementation of ​

ts
CUICheckButton.GetTextY

Inherited from ​

MockCUI3tButton.GetTextY


GetWndPos ​

ts
GetWndPos: Mock<() => vector2>;

Returns ​

Window position relative to its parent.

Implementation of ​

ts
CUICheckButton.GetWndPos

Inherited from ​

MockCUI3tButton.GetWndPos


heading ​

ts
heading: number = 0;

Inherited from ​

MockCUI3tButton.heading


Init ​

ts
Init: Mock<(rectOrX: number | Frect, y?: number, width?: number, height?: number) => void>;

Initialize window rectangle.

Param ​

frect

Window rectangle.

Implementation of ​

ts
CUICheckButton.Init

Inherited from ​

MockCUI3tButton.Init


InitTexture ​

ts
InitTexture: Mock<(texture: string) => void>;

Assign texture by atlas id.

Param ​

texture

Texture id.

Implementation of ​

ts
CUICheckButton.InitTexture

Inherited from ​

MockCUI3tButton.InitTexture


InitTextureEx ​

ts
InitTextureEx: Mock<(texture: string, shader: string) => void>;

Assign texture and shader by name.

Param ​

first

Texture id.

Param ​

second

Shader id.

Implementation of ​

ts
CUICheckButton.InitTextureEx

Inherited from ​

MockCUI3tButton.InitTextureEx


isAutoDelete ​

ts
isAutoDelete: boolean = false;

Inherited from ​

MockCUI3tButton.isAutoDelete


IsAutoDelete ​

ts
IsAutoDelete: Mock<() => boolean>;

Returns ​

Whether the engine owns and deletes this window with its parent.

Implementation of ​

ts
CUICheckButton.IsAutoDelete

Inherited from ​

MockCUI3tButton.IsAutoDelete


isChecked ​

ts
isChecked: boolean = false;

IsCursorOverWindow ​

ts
IsCursorOverWindow: Mock<() => boolean>;

Returns ​

Whether the UI cursor is currently over this window.

Implementation of ​

ts
CUICheckButton.IsCursorOverWindow

Inherited from ​

MockCUI3tButton.IsCursorOverWindow


isEnabled ​

ts
isEnabled: boolean = false;

Inherited from ​

MockCUI3tButton.isEnabled


IsEnabled ​

ts
IsEnabled: Mock<() => boolean>;

Returns ​

Whether the window accepts interaction.

Implementation of ​

ts
CUICheckButton.IsEnabled

Inherited from ​

MockCUI3tButton.IsEnabled


isPostProcessMode ​

ts
isPostProcessMode: boolean = false;

Inherited from ​

MockCUI3tButton.isPostProcessMode


isShown ​

ts
isShown: boolean = false;

Inherited from ​

MockCUI3tButton.isShown


IsShown ​

ts
IsShown: Mock<() => boolean>;

Returns ​

Whether the window is visible.

Implementation of ​

ts
CUICheckButton.IsShown

Inherited from ​

MockCUI3tButton.IsShown


mouseX ​

ts
mouseX: number = 0;

Inherited from ​

MockCUI3tButton.mouseX


mouseY ​

ts
mouseY: number = 0;

Inherited from ​

MockCUI3tButton.mouseY


originalRect ​

ts
originalRect: Frect;

Inherited from ​

MockCUI3tButton.originalRect


ResetPPMode ​

ts
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 ​

ts
CUICheckButton.ResetPPMode

Inherited from ​

MockCUI3tButton.ResetPPMode


SetAutoDelete ​

ts
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 ​

ts
CUICheckButton.SetAutoDelete

Inherited from ​

MockCUI3tButton.SetAutoDelete


SetCheck ​

ts
SetCheck: Mock<(isChecked: boolean) => void>;

Set checked state.

Param ​

value

New checked state.

Implementation of ​

ts
CUICheckButton.SetCheck

SetColor ​

ts
SetColor: Mock<(color: number) => void>;

Set texture color.

Param ​

color

ARGB color.

Implementation of ​

ts
CUICheckButton.SetColor

Inherited from ​

MockCUI3tButton.SetColor


SetDependControl ​

ts
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 ​

ts
CUICheckButton.SetDependControl

SetElipsis ​

ts
SetElipsis: Mock<UnknownFunction>;

Configure text ellipsis.

Param ​

a

Ellipsis mode.

Param ​

b

Indent.

Implementation of ​

ts
CUICheckButton.SetElipsis

Inherited from ​

MockCUI3tButton.SetElipsis


SetFont ​

ts
SetFont: Mock<(font: CGameFont) => void>;

Set the font used by this window.

Param ​

font

Font object.

Implementation of ​

ts
CUICheckButton.SetFont

Inherited from ​

MockCUI3tButton.SetFont


SetHeading ​

ts
SetHeading: Mock<(heading: number) => void>;

Set heading angle.

Param ​

number

Heading angle.

Implementation of ​

ts
CUICheckButton.SetHeading

Inherited from ​

MockCUI3tButton.SetHeading


SetHeight ​

ts
SetHeight: Mock<(height: number) => void>;

Set window height.

Param ​

height

New height.

Implementation of ​

ts
CUICheckButton.SetHeight

Inherited from ​

MockCUI3tButton.SetHeight


SetOriginalRect ​

ts
SetOriginalRect: Mock<(rect: Frect) => void>;

Set original texture rectangle.

Param ​

frect

Original rectangle.

Implementation of ​

ts
CUICheckButton.SetOriginalRect

Inherited from ​

MockCUI3tButton.SetOriginalRect


SetPPMode ​

ts
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 ​

ts
CUICheckButton.SetPPMode

Inherited from ​

MockCUI3tButton.SetPPMode


SetStretchTexture ​

ts
SetStretchTexture: Mock<(stretch: boolean) => void>;

Enable or disable texture stretching.

Param ​

stretch

Whether texture should stretch to the window rect.

Implementation of ​

ts
CUICheckButton.SetStretchTexture

Inherited from ​

MockCUI3tButton.SetStretchTexture


SetText ​

ts
SetText: Mock<(text: string) => void>;

Set raw text.

Param ​

text

Text value.

Implementation of ​

ts
CUICheckButton.SetText

Inherited from ​

MockCUI3tButton.SetText


SetTextAlign ​

ts
SetTextAlign: Mock<(align: number) => void>;

Set text alignment.

Param ​

align

Alignment id.

Implementation of ​

ts
CUICheckButton.SetTextAlign

Inherited from ​

MockCUI3tButton.SetTextAlign


SetTextColor ​

ts
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 ​

ts
CUICheckButton.SetTextColor

Inherited from ​

MockCUI3tButton.SetTextColor


SetTextST ​

ts
SetTextST: Mock<(text: string) => void>;

Set translated string-table text.

Param ​

string

String table id.

Implementation of ​

ts
CUICheckButton.SetTextST

Inherited from ​

MockCUI3tButton.SetTextST


SetTextureColor ​

ts
SetTextureColor: Mock<(color: number) => void>;

Set texture color.

Param ​

color

ARGB color.

Implementation of ​

ts
CUICheckButton.SetTextureColor

Inherited from ​

MockCUI3tButton.SetTextureColor


SetTextureOffset ​

ts
SetTextureOffset: Mock<(x: number, y: number) => void>;

Set texture drawing offset.

Param ​

x

X offset.

Param ​

y

Y offset.

Implementation of ​

ts
CUICheckButton.SetTextureOffset

Inherited from ​

MockCUI3tButton.SetTextureOffset


SetTextureRect ​

ts
SetTextureRect: Mock<(rect: Frect) => void>;

Set source texture rectangle.

Param ​

frect

Texture rectangle.

Implementation of ​

ts
CUICheckButton.SetTextureRect

Inherited from ​

MockCUI3tButton.SetTextureRect


SetTextX ​

ts
SetTextX: Mock<(x: number) => void>;

Set text X offset.

Param ​

x

X offset.

Implementation of ​

ts
CUICheckButton.SetTextX

Inherited from ​

MockCUI3tButton.SetTextX


SetTextY ​

ts
SetTextY: Mock<(y: number) => void>;

Set text Y offset.

Param ​

x

Y offset.

Implementation of ​

ts
CUICheckButton.SetTextY

Inherited from ​

MockCUI3tButton.SetTextY


SetWidth ​

ts
SetWidth: Mock<(width: number) => void>;

Set window width.

Param ​

width

New width.

Implementation of ​

ts
CUICheckButton.SetWidth

Inherited from ​

MockCUI3tButton.SetWidth


SetWindowName ​

ts
SetWindowName: Mock<(name: string) => void>;

Set debug/window name.

Param ​

name

Window name.

Implementation of ​

ts
CUICheckButton.SetWindowName

Inherited from ​

MockCUI3tButton.SetWindowName


SetWndPos ​

ts
SetWndPos: Mock<(positionOrX: number | vector2, y?: number) => void>;

Set window position.

Param ​

vector2

New position.

Implementation of ​

ts
CUICheckButton.SetWndPos

Inherited from ​

MockCUI3tButton.SetWndPos


SetWndRect ​

ts
SetWndRect: Mock<(rectOrX: number | Frect, y?: number, width?: number, height?: number) => void>;

Set window rectangle.

Param ​

rect

New rectangle.

Implementation of ​

ts
CUICheckButton.SetWndRect

Inherited from ​

MockCUI3tButton.SetWndRect


SetWndSize ​

ts
SetWndSize: Mock<(sizeOrWidth: number | vector2, height?: number) => void>;

Set window size.

Param ​

vector2

New size.

Implementation of ​

ts
CUICheckButton.SetWndSize

Inherited from ​

MockCUI3tButton.SetWndSize


shader ​

ts
shader: string | null = null;

Inherited from ​

MockCUI3tButton.shader


stretchTexture ​

ts
stretchTexture: boolean = false;

Inherited from ​

MockCUI3tButton.stretchTexture


text ​

ts
text: string = "";

Inherited from ​

MockCUI3tButton.text


textAlign ​

ts
textAlign: number = 0;

Inherited from ​

MockCUI3tButton.textAlign


textColor ​

ts
textColor: number = 0xffffffff;

Inherited from ​

MockCUI3tButton.textColor


textControl ​

ts
textControl: CUILines;

Inherited from ​

MockCUI3tButton.textControl


TextControl ​

ts
TextControl: Mock<() => CUILines>;

Returns ​

Text line controller.

Implementation of ​

ts
CUICheckButton.TextControl

Inherited from ​

MockCUI3tButton.TextControl


texture ​

ts
texture: string | null = null;

Inherited from ​

MockCUI3tButton.texture


textureColor ​

ts
textureColor: number = 0xffffffff;

Inherited from ​

MockCUI3tButton.textureColor


textureOffsetX ​

ts
textureOffsetX: number = 0;

Inherited from ​

MockCUI3tButton.textureOffsetX


textureOffsetY ​

ts
textureOffsetY: number = 0;

Inherited from ​

MockCUI3tButton.textureOffsetY


textureRect ​

ts
textureRect: Frect;

Inherited from ​

MockCUI3tButton.textureRect


textX ​

ts
textX: number = 0;

Inherited from ​

MockCUI3tButton.textX


textY ​

ts
textY: number = 0;

Inherited from ​

MockCUI3tButton.textY


windowFont ​

ts
windowFont: CGameFont | null = null;

Inherited from ​

MockCUI3tButton.windowFont


windowName ​

ts
windowName: string | null = null;

Inherited from ​

MockCUI3tButton.windowName


WindowName ​

ts
WindowName: Mock<() => string>;

Returns ​

Window name.

Implementation of ​

ts
CUICheckButton.WindowName

Inherited from ​

MockCUI3tButton.WindowName


windowPosition ​

ts
windowPosition: vector2;

Inherited from ​

MockCUI3tButton.windowPosition


windowRect ​

ts
windowRect: Frect | null = null;

Inherited from ​

MockCUI3tButton.windowRect


windowSize ​

ts
windowSize: vector2;

Inherited from ​

MockCUI3tButton.windowSize