Interface: UICanvas

Renders 2d shapes in the UI.

Properties

Name Type Description
activationenabled boolean No description provided.
actuallayoutheight number No description provided.
actuallayoutwidth number No description provided.
actualuiscale_x number No description provided.
actualuiscale_y number No description provided.
actualxoffset number No description provided.
actualyoffset number No description provided.
checked boolean No description provided.
contentheight number No description provided.
contentwidth number No description provided.
defaultfocus string No description provided.
desiredlayoutheight number No description provided.
desiredlayoutwidth number No description provided.
enabled boolean No description provided.
hittest boolean No description provided.
hittestchildren boolean No description provided.
id string No description provided.
inputnamespace string No description provided.
layoutfile string No description provided.
paneltype UICanvas No description provided.
rememberchildfocus boolean No description provided.
scrolloffset_x number No description provided.
scrolloffset_y number No description provided.
selectionpos_x number No description provided.
selectionpos_y number No description provided.
style Style No description provided.
tabindex number No description provided.
visible boolean No description provided.

Functions

AcceptsFocus

UICanvas.AcceptsFocus(): boolean

No description provided.

AcceptsInput

UICanvas.AcceptsInput(): boolean

No description provided.

AddClass

UICanvas.AddClass(classname: string): void

No description provided.

Parameter

Name Type Description
classname string No description provided.

ApplyStyles

UICanvas.ApplyStyles(arg0: boolean): void

No description provided.

Parameter

Name Type Description
arg0 boolean No description provided.

BAscendantHasClass

UICanvas.BAscendantHasClass(arg0: string): boolean

No description provided.

Parameter

Name Type Description
arg0 string No description provided.

CanSeeInParentScroll

UICanvas.CanSeeInParentScroll(): boolean

No description provided.

Children

UICanvas.Children(): GenericPanel[]

No description provided.

Clear

UICanvas.Clear(color: string): void

Clear the canvas with the specified color

Parameter

Name Type Description
color string Clear color

ClearPanelEvent

UICanvas.ClearPanelEvent(event: string): void

No description provided.

Parameter

Name Type Description
event string No description provided.

ClearPropertyFromCode

UICanvas.ClearPropertyFromCode(arg0: unknown): void

No description provided.

Parameter

Name Type Description
arg0 unknown No description provided.

CreateChildren

UICanvas.CreateChildren(elements: string): boolean

No description provided.

Parameter

Name Type Description
elements string No description provided.

CreateCopyOfCSSKeyframes

UICanvas.CreateCopyOfCSSKeyframes(animation: string): unknown

No description provided.

Parameter

Name Type Description
animation string No description provided.

Data

UICanvas.Data(...args: any[]): void

No description provided.

Parameter

Name Type Description
...args any[] No description provided.

DeleteAsync

UICanvas.DeleteAsync(delay: number): void

No description provided.

Parameter

Name Type Description
delay number No description provided.

DeleteKeyframes

UICanvas.DeleteKeyframes(animation: unknown): void

No description provided.

Parameter

Name Type Description
animation unknown No description provided.

DrawFilledCircle

UICanvas.DrawFilledCircle(cX: number, cY: number, radius: number, color: string): void

Draws a filled circle

Parameters

Name Type Description
cX number X coord of center
cY number Y coord of center
radius number Radius of the circle
color string Color of the circle

DrawFilledWedge

UICanvas.DrawFilledWedge(cX: number, cY: number, radius: number, startAngle: number, angleDelta: number, color: string): void

Draws a filled wedge, basically a slice of a circle

Parameters

Name Type Description
cX number X coord of center
cY number Y coord of center
radius number Radius of the circle
startAngle number Starting angle (in radians)
angleDelta number Angle delta (in radians)
color string Color of the wedge

DrawLineCircle

UICanvas.DrawLineCircle(cX: number, cY: number, radius: number, color: string): void

Draws a circle with lines (i.e. not filled)

Parameters

Name Type Description
cX number X coord of center
cY number Y coord of center
radius number Radius of the circle
color string Color of the lines

DrawLinePoints

UICanvas.DrawLinePoints(count: number, coords: number[], thickness: number, color: string): void

No description provided.

Parameters

Name Type Description
count number The number of points to draw.
coords number[] An array of float x/y coordinates.
thickness number The thickness of the line.
color string The color of the line as a string.

DrawPoly

UICanvas.DrawPoly(count: number, coords: number[], color: string): void

No description provided.

Parameters

Name Type Description
count number The number of points to draw.
coords number[] An array of float x/y coordinates.
color string The color of the line as a string.

DrawShadedPoly

UICanvas.DrawShadedPoly(count: number, coords: number[], colors: string[]): void

No description provided.

Parameters

Name Type Description
count number Number of points
coords number[] An array of float x/y coords. Must be count * 2 in length
colors string[] An array of colors for each point. Must be count in length

DrawSoftLinePoints

UICanvas.DrawSoftLinePoints(count: number, coords: number[], thickness: number, softness: number, color: string): void

Draws a line, but softer!

Parameters

Name Type Description
count number Number of points
coords number[] Array of float x/y coordinates. Must be count * 2 in length
thickness number Thickness of the line
softness number Softness of the line
color string Color of the line

DrawSoftLinePointsDisconnected

UICanvas.DrawSoftLinePointsDisconnected(count: number, coords: number[], thickness: number, softness: number, color: string): void

Draws a bunch of discrete points

Parameters

Name Type Description
count number Number of points
coords number[] Array of float x/y coordinates. Must be count * 2 in length
thickness number Thickness of the line
softness number Softness of the line
color string Color of the line

FindChild

UICanvas.FindChild(id: string): T

Searches this element's direct children and returns a child with the specified id.

Parameter

Name Type Description
id string No description provided.

FindChildInLayoutFile

UICanvas.FindChildInLayoutFile(id: string): T

No description provided.

Parameter

Name Type Description
id string No description provided.

FindChildrenWithClassTraverse

UICanvas.FindChildrenWithClassTraverse(classname: string): T[]

No description provided.

Parameter

Name Type Description
classname string No description provided.

FindChildTraverse

UICanvas.FindChildTraverse(id: string): T

No description provided.

Parameter

Name Type Description
id string No description provided.

GetAttributeInt

UICanvas.GetAttributeInt(attribute: string, fallback: number): number

No description provided.

Parameters

Name Type Description
attribute string No description provided.
fallback number No description provided.

GetAttributeString

UICanvas.GetAttributeString(attribute: string, fallback: string): string

No description provided.

Parameters

Name Type Description
attribute string No description provided.
fallback string No description provided.

GetAttributeUInt32

UICanvas.GetAttributeUInt32(attribute: string, fallback: number): number

No description provided.

Parameters

Name Type Description
attribute string No description provided.
fallback number No description provided.

GetChild

UICanvas.GetChild(index: number): T

No description provided.

Parameter

Name Type Description
index number No description provided.

GetChildCount

UICanvas.GetChildCount(): number

No description provided.

GetChildIndex

UICanvas.GetChildIndex(child: GenericPanel): number

No description provided.

Parameter

Name Type Description
child GenericPanel No description provided.

GetFirstChild

UICanvas.GetFirstChild(): T

No description provided.

GetLastChild

UICanvas.GetLastChild(): T

No description provided.

GetLayoutFileDefine

UICanvas.GetLayoutFileDefine(def: string): unknown

No description provided.

Parameter

Name Type Description
def string No description provided.

GetParent

UICanvas.GetParent(): T

No description provided.

GetPositionWithinWindow

UICanvas.GetPositionWithinWindow(): unknown

No description provided.

HasClass

UICanvas.HasClass(classname: string): boolean

No description provided.

Parameter

Name Type Description
classname string No description provided.

HasDescendantKeyFocus

UICanvas.HasDescendantKeyFocus(): boolean

No description provided.

HasHoverStyle

UICanvas.HasHoverStyle(): boolean

No description provided.

HasKeyFocus

UICanvas.HasKeyFocus(): boolean

No description provided.

IsDraggable

UICanvas.IsDraggable(): boolean

No description provided.

IsReadyForDisplay

UICanvas.IsReadyForDisplay(): boolean

No description provided.

IsSelected

UICanvas.IsSelected(): boolean

No description provided.

IsSizeValid

UICanvas.IsSizeValid(): boolean

No description provided.

IsTransparent

UICanvas.IsTransparent(): boolean

No description provided.

IsValid

UICanvas.IsValid(): boolean

Check if this panel is still valid

LoadLayout

UICanvas.LoadLayout(url: string, override: boolean, partial: boolean): boolean

No description provided.

Parameters

Name Type Description
url string No description provided.
override boolean No description provided.
partial boolean No description provided.

LoadLayoutAsync

UICanvas.LoadLayoutAsync(url: string, override: boolean, partial: boolean): void

No description provided.

Parameters

Name Type Description
url string No description provided.
override boolean No description provided.
partial boolean No description provided.

LoadLayoutFromString

UICanvas.LoadLayoutFromString(layout: string, override: boolean, partial: boolean): void

No description provided.

Parameters

Name Type Description
layout string No description provided.
override boolean No description provided.
partial boolean No description provided.

LoadLayoutFromStringAsync

UICanvas.LoadLayoutFromStringAsync(layout: string, override: boolean, partial: boolean): void

No description provided.

Parameters

Name Type Description
layout string No description provided.
override boolean No description provided.
partial boolean No description provided.

LoadLayoutSnippet

UICanvas.LoadLayoutSnippet(snippet: string): boolean

No description provided.

Parameter

Name Type Description
snippet string No description provided.

MoveChildAfter

UICanvas.MoveChildAfter(arg0: unknown, arg1: unknown): void

No description provided.

Parameters

Name Type Description
arg0 unknown No description provided.
arg1 unknown No description provided.

MoveChildBefore

UICanvas.MoveChildBefore(arg0: unknown, arg1: unknown): void

No description provided.

Parameters

Name Type Description
arg0 unknown No description provided.
arg1 unknown No description provided.

RegisterForReadyEvents

UICanvas.RegisterForReadyEvents(enable: boolean): void

Registers this panel to receive ready/unready events.

Parameter

Name Type Description
enable boolean Should this panel receive ready/unready events?

RemoveAndDeleteChildren

UICanvas.RemoveAndDeleteChildren(): void

No description provided.

RemoveClass

UICanvas.RemoveClass(classname: string): void

No description provided.

Parameter

Name Type Description
classname string No description provided.

ScrollParentToFitWhenFocused

UICanvas.ScrollParentToFitWhenFocused(): boolean

No description provided.

ScrollParentToMakePanelFit

UICanvas.ScrollParentToMakePanelFit(arg0: number, arg1: boolean): void

No description provided.

Parameters

Name Type Description
arg0 number No description provided.
arg1 boolean No description provided.

ScrollToBottom

UICanvas.ScrollToBottom(): void

No description provided.

ScrollToFitRegion

UICanvas.ScrollToFitRegion(arg0: number, arg1: number, arg2: number, arg3: number, arg4: unknown, arg5: boolean, arg6: boolean): void

No description provided.

Parameters

Name Type Description
arg0 number No description provided.
arg1 number No description provided.
arg2 number No description provided.
arg3 number No description provided.
arg4 unknown No description provided.
arg5 boolean No description provided.
arg6 boolean No description provided.

ScrollToLeftEdge

UICanvas.ScrollToLeftEdge(): void

No description provided.

ScrollToRightEdge

UICanvas.ScrollToRightEdge(): void

No description provided.

ScrollToTop

UICanvas.ScrollToTop(): void

No description provided.

SetAcceptsFocus

UICanvas.SetAcceptsFocus(istrue: boolean): void

No description provided.

Parameter

Name Type Description
istrue boolean No description provided.

SetAdditive

UICanvas.SetAdditive(additive: boolean): void

Set additive rendering mode

Parameter

Name Type Description
additive boolean No description provided.

SetAttributeInt

UICanvas.SetAttributeInt(attribute: string, value: number): void

No description provided.

Parameters

Name Type Description
attribute string No description provided.
value number No description provided.

SetAttributeString

UICanvas.SetAttributeString(attribute: string, value: string): void

No description provided.

Parameters

Name Type Description
attribute string No description provided.
value string No description provided.

SetAttributeUInt32

UICanvas.SetAttributeUInt32(attribute: string, value: number): void

No description provided.

Parameters

Name Type Description
attribute string No description provided.
value number No description provided.

SetDialogVariable

UICanvas.SetDialogVariable(arg0: string, arg1: string): void

No description provided.

Parameters

Name Type Description
arg0 string No description provided.
arg1 string No description provided.

SetDialogVariableFloat

UICanvas.SetDialogVariableFloat(arg0: string, arg1: number): void

No description provided.

Parameters

Name Type Description
arg0 string No description provided.
arg1 number No description provided.

SetDialogVariableInt

UICanvas.SetDialogVariableInt(arg0: string, arg1: number): void

No description provided.

Parameters

Name Type Description
arg0 string No description provided.
arg1 number No description provided.

SetDialogVariableTime

UICanvas.SetDialogVariableTime(arg0: string, arg1: string | number): void

No description provided.

Parameters

Name Type Description
arg0 string No description provided.
arg1 string | number No description provided.

SetDisableFocusOnMouseDown

UICanvas.SetDisableFocusOnMouseDown(istrue: boolean): void

No description provided.

Parameter

Name Type Description
istrue boolean No description provided.

SetDraggable

UICanvas.SetDraggable(istrue: boolean): void

No description provided.

Parameter

Name Type Description
istrue boolean No description provided.

SetDrawColor

UICanvas.SetDrawColor(color: string): void

Set current draw color

Parameter

Name Type Description
color string No description provided.

SetDrawSize

UICanvas.SetDrawSize(size: number): void

Set current draw size

Parameter

Name Type Description
size number No description provided.

SetFocus

UICanvas.SetFocus(focus: boolean): boolean

No description provided.

Parameter

Name Type Description
focus boolean No description provided.

SetHasClass

UICanvas.SetHasClass(classname: string, hasclass: boolean): void

No description provided.

Parameters

Name Type Description
classname string No description provided.
hasclass boolean No description provided.

SetInputNamespace

UICanvas.SetInputNamespace(arg0: string): void

No description provided.

Parameter

Name Type Description
arg0 string No description provided.

SetMaxDrawCommands

UICanvas.SetMaxDrawCommands(max: number): void

No description provided.

Parameter

Name Type Description
max number No description provided.

SetPanelEvent

UICanvas.SetPanelEvent(event: string, callback: Func<any[], void>): void

Sets an event trigger for this panel.

Example

latestUpdateImage.SetPanelEvent('onactivate', () => SteamOverlayAPI.OpenURLModal(item.link));

Parameters

Name Type Description
event string No description provided.
callback Func<any[], void> No description provided.

See also

SetParent

UICanvas.SetParent(parent: GenericPanel): void

No description provided.

Parameter

Name Type Description
parent GenericPanel No description provided.

SetReadyForDisplay

UICanvas.SetReadyForDisplay(arg0: boolean): void

No description provided.

Parameter

Name Type Description
arg0 boolean No description provided.

SetScrollParentToFitWhenFocused

UICanvas.SetScrollParentToFitWhenFocused(arg0: boolean): void

No description provided.

Parameter

Name Type Description
arg0 boolean No description provided.

SetTopOfInputContext

UICanvas.SetTopOfInputContext(arg0: boolean): void

No description provided.

Parameter

Name Type Description
arg0 boolean No description provided.

SortChildrenOnAttribute

UICanvas.SortChildrenOnAttribute(attribute: string, ascending: boolean): void

No description provided.

Parameters

Name Type Description
attribute string No description provided.
ascending boolean No description provided.

SwitchClass

UICanvas.SwitchClass(oldclass: string, newclass: string): void

No description provided.

Parameters

Name Type Description
oldclass string No description provided.
newclass string No description provided.

ToggleClass

UICanvas.ToggleClass(classname: string): void

No description provided.

Parameter

Name Type Description
classname string No description provided.

TriggerClass

UICanvas.TriggerClass(classname: string): void

No description provided.

Parameter

Name Type Description
classname string No description provided.

UpdateCurrentAnimationKeyframes

UICanvas.UpdateCurrentAnimationKeyframes(animation: unknown): void

No description provided.

Parameter

Name Type Description
animation unknown No description provided.

UpdateFocusInContext

UICanvas.UpdateFocusInContext(): boolean

No description provided.