-
Notifications
You must be signed in to change notification settings - Fork 289
Expand file tree
/
Copy pathCanvas.lua
More file actions
71 lines (55 loc) · 1.97 KB
/
Copy pathCanvas.lua
File metadata and controls
71 lines (55 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---@meta
--- Defines how a Canvas scales UI elements
---@enum CanvasScalerMode
CanvasScalerMode = {
CONSTANT_PIXEL_SIZE = 0,
SCALE_WITH_SCREEN_SIZE = 1
}
---@enum CanvasScreenMatchMode
CanvasScreenMatchMode = {
MATCH_WIDTH_OR_HEIGHT = 0,
EXPAND = 1,
SHRINK = 2
}
--- Represents a root canvas for in-game user interface elements
---@class Canvas : Component
Canvas = {}
--- Returns the actor that owns this component
---@return Actor
function Canvas:GetOwner() end
--- Returns the reference resolution used by the canvas
---@return Vector2
function Canvas:GetReferenceResolution() end
--- Defines the reference resolution used by the canvas
---@param referenceResolution Vector2
function Canvas:SetReferenceResolution(referenceResolution) end
--- Returns the canvas scale factor
---@return number
function Canvas:GetScaleFactor() end
--- Defines the canvas scale factor
---@param scaleFactor number
function Canvas:SetScaleFactor(scaleFactor) end
--- Returns the number of UI pixels represented by one world unit
---@return number
function Canvas:GetPixelsPerUnit() end
--- Defines the number of UI pixels represented by one world unit
---@param pixelsPerUnit number
function Canvas:SetPixelsPerUnit(pixelsPerUnit) end
--- Returns the canvas scaler mode
---@return CanvasScalerMode
function Canvas:GetScalerMode() end
--- Defines the canvas scaler mode
---@param scalerMode CanvasScalerMode
function Canvas:SetScalerMode(scalerMode) end
--- Returns the screen match mode used with SCALE_WITH_SCREEN_SIZE
---@return CanvasScreenMatchMode
function Canvas:GetScreenMatchMode() end
--- Defines the screen match mode used with SCALE_WITH_SCREEN_SIZE
---@param screenMatchMode CanvasScreenMatchMode
function Canvas:SetScreenMatchMode(screenMatchMode) end
--- Returns the match width/height factor in range [0, 1]
---@return number
function Canvas:GetMatchWidthOrHeight() end
--- Defines the match width/height factor in range [0, 1]
---@param value number
function Canvas:SetMatchWidthOrHeight(value) end