AR_Engine_SDK
载入中...
搜索中...
未找到
函数 | 变量
XUIScene.lua 文件参考

#include <XUIScene.h>

类 XUIScene 继承关系图:
Inheritance graph

#include <XUIScene.h>

类 XUIScene::XUISceneWrapper 继承关系图:
Inheritance graph

函数

function XUIScene Render (pWorld) end
 
function XUIScene IsModal () end
 
function XUIScene Show (bModal) end
 
function XUIScene Hide () end
 
function XUIScene IsShow () end
 
function XUIScene SetDesignResolution (vDesignRes, rp) end
 
function XUIScene GetDesignResolution () end
 
function XUIScene GetResolutionPolicy () end
 
function XUIScene EnableCustomPolicy (bEnable) end
 
function XUIScene IsCustomPolicy () end
 
function XUIScene SetCustomAspect (fCustomAspect) end
 
function XUIScene GetCustomAspect () end
 
function XUIScene SetCustomUpperResolutionPolicy (rp) end
 
function XUIScene GetCustomUpperResolutionPolicy () end
 
function XUIScene SetCustomLowerResolutionPolicy (rp) end
 
function XUIScene GetCustomLowerResolutionPolicy () end
 
function XUIScene UpdateDesignResolutionSize () end
 
function XUIScene AdaptNotch (bSet) end
 
function XUIScene IsAdaptNotch () end
 
function XUIScene GetWorldToScreenMatrix () end
 
function XUIScene GetScaleMatrix () end
 
function XUIScene AddToRenderer (pNode, global_z_order) end
 
function XUIScene GetVersion () end
 
function XUIScene GetAllRttTextures () end
 
function XUIScene GetScenePath () end
 
function XUIScene IsUsePhysical () end
 
function XUIScene SetUsePhysical (bUsePhysical) end
 
function XUIScene SetGravity (vGravity) end
 
function XUIScene GetGravity () end
 
function XUIScene CanCollision2DLayerCollide (layer0, layer1) end
 
function XUIScene SetCollision2DLayerState (layer0, layer1, state) end
 
function XUIScene SetUseGlobalFont (bUseGlobal) end
 @type number @readonly
 
function XUIScene IsUseGlobalFont () end
 

变量

 XUIScene = {}
 

函数说明

◆ AdaptNotch()

function XUIScene AdaptNotch ( bSet  )

设置是否适应刘海屏。

参数
bSetboolean 是否适应刘海屏。
返回
void

◆ AddToRenderer()

function XUIScene AddToRenderer ( pNode  ,
global_z_order   
)

添加一个节点到场景中渲染

参数
pNodeXUINode 添加的节点指针
global_z_ordernumber 全局排序索引
返回
void

◆ CanCollision2DLayerCollide()

function XUIScene CanCollision2DLayerCollide ( layer0  ,
layer1   
)

两个层之间是否允许碰撞

参数
layer0number
layer1number
返回
boolean

XUIScene_CanCollision2DLayerCollide01

参数
layer0cppstring
layer1cppstring
返回
boolean

◆ EnableCustomPolicy()

function XUIScene EnableCustomPolicy ( bEnable  )

设置是否启用自定义适配 自定义适配,指的是给定一个高宽比,大于该高宽比使用一个策略,小于该高宽比使用另一个策略

参数
bEnableboolean 是否启用自定义适配策略
返回
void

◆ GetAllRttTextures()

function XUIScene GetAllRttTextures ( )

XUIScene_GetAllRttTextures00

返回
XUITexture[]

◆ GetCustomAspect()

function XUIScene GetCustomAspect ( )

获取自定义适配的高宽比

返回
number 自定义适配的高宽比

◆ GetCustomLowerResolutionPolicy()

function XUIScene GetCustomLowerResolutionPolicy ( )

获取小于给定高宽比时的适配策略

返回
number 小于给定高宽比时的适配策略

◆ GetCustomUpperResolutionPolicy()

function XUIScene GetCustomUpperResolutionPolicy ( )

获取大于给定高宽比时的适配策略

返回
number 大于给定高宽比时的适配策略

◆ GetDesignResolution()

function XUIScene GetDesignResolution ( )

获取场景的设计分辨率

返回
XVECTOR2 返回场景的设计分辨率

◆ GetGravity()

function XUIScene GetGravity ( )

XUIScene_GetGravity00

返回
XVECTOR2

◆ GetResolutionPolicy()

function XUIScene GetResolutionPolicy ( )

设置场景的设计分辨率

返回
number 场景的分辨率适应策略。

◆ GetScaleMatrix()

function XUIScene GetScaleMatrix ( )

获取缩放矩阵

返回
XMATRIX4 缩放矩阵

◆ GetScenePath()

function XUIScene GetScenePath ( )

XUIScene_GetScenePath00

返回
string

◆ GetVersion()

function XUIScene GetVersion ( )

获取版本号

返回
number 版本号

◆ GetWorldToScreenMatrix()

function XUIScene GetWorldToScreenMatrix ( )

把当前世界矩阵转成屏幕坐标系矩阵

返回
XMATRIX4 屏幕坐标系矩阵

◆ Hide()

function XUIScene Hide ( )

隐藏当前场景

返回
void

◆ IsAdaptNotch()

function XUIScene IsAdaptNotch ( )

获取是否适应刘海屏。

返回
boolean 是否适应刘海屏。

◆ IsCustomPolicy()

function XUIScene IsCustomPolicy ( )

是否使用自定义适配

返回
boolean 场景的分辨率适应策略。

◆ IsModal()

function XUIScene IsModal ( )

获取是否是模态场景。

返回
boolean 返回是否是模态场景。

◆ IsShow()

function XUIScene IsShow ( )

判断当前场景是否显示

返回
boolean

◆ IsUseGlobalFont()

function XUIScene IsUseGlobalFont ( )

XUIScene_IsUseGlobalFont00

返回
boolean

◆ IsUsePhysical()

function XUIScene IsUsePhysical ( )

XUIScene_IsUsePhysical00

返回
boolean

◆ Render()

function XUIScene Render ( pWorld  )

渲染场景

参数
pWorldIXRenderSet 指定的世界
返回
void

◆ SetCollision2DLayerState()

function XUIScene SetCollision2DLayerState ( layer0  ,
layer1  ,
state   
)

XUIScene_SetCollision2DLayerState00

参数
layer0number
layer1number
stateboolean
返回
void

◆ SetCustomAspect()

function XUIScene SetCustomAspect ( fCustomAspect  )

设定自定义适配的高宽比

参数
fCustomAspectnumber 自定义适配的高宽比
返回
void

◆ SetCustomLowerResolutionPolicy()

function XUIScene SetCustomLowerResolutionPolicy ( rp  )

设定小于给定高宽比时的适配策略

参数
rpnumber 小于给定高宽比时的适配策略
返回
void

◆ SetCustomUpperResolutionPolicy()

function XUIScene SetCustomUpperResolutionPolicy ( rp  )

设定大于给定高宽比时的适配策略

参数
rpnumber 大于给定高宽比时的适配策略
返回
void

◆ SetDesignResolution()

function XUIScene SetDesignResolution ( vDesignRes  ,
rp   
)

设置场景的设计分辨率 XUI_EXACTFIT 非等比拉伸致宽度和高度与屏幕分辨率一致。 XUI_NOBORDER 等比拉伸到没有边框的程度,可能会导致横向或者纵向有UI显示不全。 XUI_SHOWALL 等比拉伸以能够显示全部内容,可能会导致横向或者纵向有黑边。 XUI_FIXEDHEIGHT 等比拉伸到高度正好和屏幕分辨率一致。 XUI_FIXEDWIDTH 等比拉伸到宽度正好和屏幕分辨率一致。

参数
vDesignResXVECTOR2 场景的设计分辨率。
rpnumber 依据场景的设计分辨率自适应屏幕分辨率的策略。
返回
void

◆ SetGravity()

function XUIScene SetGravity ( vGravity  )

XUIScene_SetGravity00

参数
vGravityXVECTOR2
返回
void

◆ SetUseGlobalFont()

function XUIScene SetUseGlobalFont ( bUseGlobal  )

@type number @readonly

XUIScene_SetUseGlobalFont00

参数
bUseGlobalboolean
返回
void

◆ SetUsePhysical()

function XUIScene SetUsePhysical ( bUsePhysical  )

XUIScene_SetUsePhysical00

参数
bUsePhysicalboolean
返回
void

◆ Show()

function XUIScene Show ( bModal  )

显示当前场景,XUIScene需要手动调用Show函数来显示出来,即默认为隐藏状态。

参数
bModalboolean 是否是模态场景,true为当前场景会阻断触摸事件,其他场景无法响应。false触摸事件如果没被处理,则会往下传递。
返回
void

◆ UpdateDesignResolutionSize()

function XUIScene UpdateDesignResolutionSize ( )

手动让分辨率重新自适应一次。

返回
void

变量说明

◆ XUIScene

XUIScene = {}