pebxcvi's picture
update
ee7329c
Raw
History Blame Contribute Delete
28.4 kB
1.80 Screen .680
1.80.1 Screen.AreSceneSoundsMuted .680
1.80.2 Screen.Create .681
1.80.3 Screen.EnableBackground .681
1.80.4 Screen.GetCenter .682
1.80.5 Screen.GetContentCount .683
1.80.6 Screen.GetCurrentContentlndex
1.80.7 Screen.GetCurrentTime .
1.80.8 Screen.GetMatrix .
1.80.9 Screen.GetNormal .
1.80.10 Screen.GetSize .
1.80.11 Screen.GetTotalTime .
1.80.12 Screen.GetTriggerPosition . . .
1.80.13 Screen.GetTriggerRadius
1.80.14 Screen.GetVolume .
1.80.15 Screen.IsContentPlaying .
1.80.16 Screen.IsContentReady .
1.80.17 Screen.IsFogEnabled .
1.80.18 Screen.IsHDFullScreenModeSet
1.80.19 Screen.IsInFullScreenMode
1.80.20 Screen.IsProtected .
1.80.21 Screen.IsVisible .
1.80.22 Screen.Pause .
1.80.23 Screen.RestartStream .
1.80.24 Screen.Resume .
1.80.25 Screen.SetChannel .
1.80.26 Screen.SetContent .
1.80.27 Screen.SetCurrentContentlndex
1.80.28 Screen.SetCurrentTime .
1.80.29 Screen.SetData .
1.80.30 Screen.SetFogEnabled .
1.80.31 Screen. SetPIDFullScreenMode
1.80.32 Screen.SetHighPriority .
1.80.33 Screen.SetMuteSceneSounds
1.80.34 Screen.SetProtected .
1.80.35 Screen.SetTargetable .
1.80.36 Screen.SetTriggerPosition
1.80.37 Screen.SetTriggerRadius
1.80.38 Screen.SetType .
1.80.39 Screen.SetVisible .
1.80.40 Screen.SetVolume .
Screen
Screen. AreSceneSoundsMuted
Brief
Return if scene sound is muted while in fullscreen
Definition
! boolean Screen.AreSceneSoundsMuted(Screen screen)
Arguments
screen
Return Values
true if scene sound is muted while in fullscreen
Description
Return if scene sound is muted while in fullscreen
Examples
local screen = Scene.FindScreen( "videol" )
I screen.AreSceneSoundsMuted()
See Also
� Scene.FindScreen
Screen.Create
Brief
Creates a new screen.
Definition
Screen Screen.Create( Vector4 topLeft, Vector4 bottomRight, Vector4 bottomLeft, string type, string
source = nil )
Arguments
topLeft - World space coordinate of top left hand corner of the screen.bottomRight - World space coordinate of bottom right hand corner of the
screen.bottomLeft - World space coordinate of bottom left hand corner of the screen.type - String denoting the type of screen to be created. Can
be one of the following:
"HSML"
"IMAGE"
"LUA"
"MEDIARSS"
"VIDEO"
source - Source for the data to be displayed on the screen (a URL or file path).
Return Values
A new Screen instance.
Description
Creates a new screen. The screen type can be one of the following: "FISML" - for displaying 'Flome Screen Markup Language' pages. "IMAGE" -
for displaying a DDS, JPG or PNG file. "LUA" - for a screen that can have a Renderer object attached. These will be protected by default.
"MEDIARSS" - for displaying media syndicated via an RSS feed. "VIDEO" - for displaying video content.
Examples
� Create a screen for submitting graphical primitives from Lua
spriteScreen = Screen.Create( topLeft, bottomRight, bottomLeft, "LUA" )
renderer = Renderer.Create ()
Renderer.SetTarget(renderer, spriteScreen)
Renderer.DrawSprite(renderer, sprite)
� Create a video screen
url = "http://www.example.com/video.mp4"
vidScreen = Screen.Create( topLeft, bottomRight, bottomLeft, "VIDEO", url )
See Also
� Renderer.SetTarget
� Screen.SetProtected
Screen.EnableBackground
Brief
Enables the default background for IMAGE screen types.
Definition
Screen.EnableBackground( Screen screen, boolean disable )
Arguments
screen - The screen to toggle the background for.disable - true to enable the default background, false to disable it (default is enabled).
Return Values
None.
Description
Enables or disables the the default black background for IMAGE screen types.
Examples
! local screen = Scene.FindScreen ( "Poster" )
| screen.EnableBackground( false )
See Also
� Scene. FindScreen
Screen.GetCenter
Brief
Returns a vector holding the central position of the screen.
Definition
Vector4 Screen.GetCenter ( Screen screen )
Screen.GetCenter( Screen screen, Vector4 outPos )
Arguments
screen - The screen to query.outPos - (out) The vector to receive the position.
Return Values
A vector holding the central position of the screen.
Description
Returns a vector holding the central position of the screen. This vector is in world space.
Examples
screen = Scene.FindScreen( "MyVideoScreen" )
center = Screen.GetCenter( screen )
print( "The screen center point is " .. center )
See Also
� ArcadeGame.GetScreen
� Scene.FindScreen
� Screen.Create
Screen.GetContentCount
Brief
Returns the number of different content attached to the screen.
Definition
number Screen.GetContentCount( Screen screen )
Arguments
screen - The screen to query.
Return Values
The number of different content attached to the screen.
Description
Returns the number of different content attached to the screen.
Examples
� Step to the next content source if it has been downloaded
screen = Scene.FindScreen( "MyVideoScreen" )
contentCount = Screen.GetContentCount ( screen )
currentlndex = Screen.GetCurrentContentlndex( screen )
nextlndex = ( currentlndex + 1 ) % contentCount
if Screen.IsContentReady( screen, nextlndex ) then
Screen.SetCurrentContentlndex( screen, nextlndex )
end
See Also
� Scene. FindScreen
� Screen.GetCurrentContentlndex
� Screen.IsContentReady
� Screen.SetCurrentContentlndex
Screen.GetCurrentContentlndex
Brief
Returns the current source index of the screen.
Definition
! number Screen.GetCurrentContentIndex( Screen screen )
Arguments
screen - The screen to query.
Return Values
The current content index of the screen.
Description
Returns the current source index of the screen.
Examples
� Step to the next content source if it has been downloaded
screen = Scene.FindScreen( "MyVideoScreen" )
contentCount = Screen.GetContentCount ( screen )
currentlndex = Screen.GetCurrentContentlndex( screen )
nextlndex = ( currentlndex + 1 ) % contentCount
if Screen.IsContentReady( screen, nextlndex ) then
Screen.SetCurrentContentlndex( screen, nextlndex )
end
See Also
� Scene. FindScreen
� Screen.GetContentCount
� Screen.IsContentReady
� Screen.SetCurrentContentlndex
Screen. GetCurrentTime
Brief
Returns the current time of the screen in seconds.
Definition
number Screen.GetCurrentTime( Screen screen )
Arguments
screen - The screen to query.
Return Values
The current time of the screen in seconds.
Description
This is currently only supported on video screens and media-rss screens currently playing video content. Note: If the content is not ready it will
return 0. Use Screen.IsContentReady to check the status.
Examples
screen = Scene.FindScreen( "MyVideoScreen" )
if ( Screen.GetCurrentTime( screen ) >= 20 ) then
state = STATE_CHEER
end
See Also
� Scene.FindScreen
� Screen.GetTotalTime
Screen.GetMatrix
Brief
Returns the world matrix for the screen.
Definition
Screen.GetMatrix( Screen screen, Matrix44 matrix )
Arguments
screen - The screen to query.matrix - A matrix to set.
Return Values
None.
Description
Returns the world matrix for the screen. An identity matrix is returned if the screen is invalid. Note that the world matrix will scale the resolution of
the screen to the world-space size of the screen, and thus will typically include a large scale component, so do not assume that any row of the
matrix will be unit length. If only the screen normal is required, use Screen.GetNormal.
Examples
local matrix = Matrix44.Create()
screen = Scene.FindScreen( "MyVideoScreen" )
Screen.GetMatrix( screen, matrix )
print( 'Screen translation is ', matrix.GetRow( 4 ) )
See Also
� ArcadeGame.GetScreen
� Scene.FindScreen
� Screen.Create
� Screen.GetNormal
Screen.GetNormal
Brief
Returns the normal for the screen.
Definition
Screen.GetNormal( Screen screen, Vector4 vector )
Arguments
screen - The screen to query.vector - A vector to set to the normal.
Return Values
None.
Description
Returns the normal for the screen, that is, the vector pointing in the facing direction of the screen. The normal will be unit length.
Examples
local vector = Vector4.Create()
screen = Scene.FindScreen( "MyVideoScreen" )
Screen.GetNormal( screen, vector )
print( "The screen normal is ", vector )
See Also
� ArcadeGame.GetScreen
� Scene. FindScreen
� Screen.Create
Screen.GetSize
Brief
Returns a vector holding the screen size.
Definition
Vector4 Screen.GetSize( Screen screen )
Screen.GetSize( Screen scree, Vector4 outsize )
Arguments
screen - The screen to query.outSize - (out) The vector to receive the size.
Return Values
A vector holding the size of the screen's content in pixels. Only X and Y vector components are valid.
Description
Returns a vector holding the size of the screen's content in pixels. The X component of the returned vector holds the screen's content width and
the Y component holds the screen's content height.
Examples
screen = Scene.FindScreen( "MyVideoScreen" )
contentSize = Screen.GetSize( screen )
print( "The screen content size is " .. contentSize )
See Also
� ArcadeGame.GetScreen
� Scene. FindScreen
� Screen.Create
Screen. GetTotalTime
Brief
Returns the current time of the screen in seconds.
Definition
! number Screen.GetTotalTime( Screen screen )
Arguments
screen - The screen to query.
Return Values
The total time of the screen in seconds.
Description
This returns the total duration of the currently playing video. This is currently only supported on video screens and media-rss screens playing
video content. Note: If the content is not ready it will return 0. Use Screen.IsContentReady to check the status.
Examples
screen = Scene.FindScreen( "MyVideoScreen" )
if ( Screen.GetCurrentTime( screen ) / Screen.GetTotalTime( screen ) >= 0.5 ) then
state = STATE_HALF_WAY
end
See Also
� Scene.FindScreen
Screen.GetT riggerPosition
Brief
Retrieves the trigger position for the screen.
Definition
Screen.GetTriggerPosition( Screen screen, Vector4 position )
Arguments
screen - Screen object to query.position - The current trigger position.
Return Values
None.
Description
Retrieves the current trigger position, which determines where the user can target this screen. If a custom trigger position has not been set this
will return the same as Screen.GetCenter(). This will set a position of 0 if the screen is not valid.
Examples
local position = Vector4.Create()
screen = Scene.FindScreen( "MyVideoScreen" )
Screen.GetTriggerPosition( screen, position )
See Also
� Screen.SetTriggerPosition
� Screen.GetTriggerRadius
� Screen.Create
� Scene.FindScreen
Screen.GetTriggerRadius
Brief
Retrieves the trigger radius for the screen.
Definition
! number Screen.GetTriggerRadius( Screen object )
Arguments
object - Screen object to query.
Return Values
range - The current trigger radius in meters.
Description
Retrieves the current trigger radius, which determines from how far away the user can target this screen. Note that 0 is considered as an infinite
target radius.
Examples
! range = Screen.GetTriggerRadius( object )
See Also
� Screen.SetTriggerRadius
� Screen.Create
� Scene.FindScreen
Screen.GetVolume
Brief
Returns the volume of the screen.
Definition
Number Screen.GetVolume( Screen screen )
Arguments
screen - The screen to query.
Return Values
A number from 0.0 to 1.0 indicating the current volume of the screen.
Description
Returns the current volume of the screen. A value of 0.0 will be returned if the screen is invalid.
Examples
1 screen = Scene.FindScreen( "MyVideoScreen" )
; volume = Screen.Getvolume( screen )
j print( "The screen volume size is " .. volume )
See Also
� Scene.FindScreen
� Screen.Create
� Screen.SetVolume
Screen.IsContentPlaying
Brief
Returns true if the content is playing and false otherwise.
Definition
! boolean Screen.IsContentPlaying( Screen screen )
Arguments
screen - The screen to query.
Return Values
Returns true if the content is playing and false otherwise.
Description
This is currently only supported on video screens and media-rss screens currently playing video content. Note: If the content is not ready it will
return false. Use Screen.IsContentReady to check the status.
Examples
if Screen.IsContentPlaying( screen ) == true then
Screen.Pause ( screen )
end
See Also
� Screen.Pause
� Screen.Resume
Screen. IsContentReady
Brief
Reports whether the content is ready to be displayed.
Definition
boolean Screen.IsContentReady( Screen screen, number contentlndex )
Arguments
screen - The screen to query.contentlndex - The source index to query. Ranges from 1 to the content count.
Return Values
True if the content is ready and false otherwise.
Description
Reports whether the content is ready to be displayed. This is only supported for video screens and media-rss screens while playing video content.
Examples
� Step to the next content source if it has been downloaded
screen = Scene.FindScreen( "MyVideoScreen" )
contentCount = Screen.GetContentCount( screen )
currentlndex = Screen.GetCurrentContentlndex( screen )
nextlndex = ( currentlndex + 1 ) % contentCount
if Screen.IsContentReady( screen, nextlndex ) then
Screen.SetCurrentContentlndex( screen, nextlndex )
end
See Also
� Scene.FindScreen
� Screen.GetContentCount
� Screen.GetCurrentContentlndex
� Screen.SetCurrentContentlndex
Screen. IsFogEnabled
Brief
Retrieve the fog enable state for a screen.
Definition
! boolean Screen.IsFogEnabled(Screen screen)
Arguments
screen - the screen to access
Return Values
True if the screen is affected by the scene fog or false otherwise.
Description
Retrieve the fog enable state for a screen. If this value is true the screen will be affected by the fog settings in the scene.
Examples
! fogEnabled = myScreen:IsFogEnabled();
See Also
� Screen.SetFogEnabled
Screen.IsHDFullScreenModeSet
Brief
Return if a video is in real full screen mode
Definition
! boolean Screen.IsHDFullScreenModeSet(Screen screen)
Arguments
screen
Return Values
true if real full screen, false otherwise
Description
Return if a video is in real full screen mode
Examples
! local screen = Scene.FindScreen( "videol" )
; screen.IsHDFullScreenModeSet()
See Also
� Scene.FindScreen
Screen.IsInFullScreenMode
Brief
Returns true if the screen is in full screen mode and false otherwise.
Definition
boolean Screen.IsInFullScreenMode(Screen screen)
Arguments
Screen - The screen to query.
Return Values
True if the screen is in full screen mode and false otherwise.
Description
Examples
! screen = Scene.FindScreen("MyVideoScreen")
; isFullScreenMode = Screen.IsInFullScreenMode(screen)
See Also
None
Screen.IsProtected
Brief
Retrieve the protection state for a screen.
Definition
boolean Screen.IsProtected(Screen screen)
Arguments
screen - the screen to access
Return Values
True if the screen is protected or false otherwise.
Description
Retrieve the protection state for a screen. If this value is true the screen will not be rendered into any still or video captures performed by
PlayStation(R) Home.
Examples
! if (not myVidScreen:IsProtected()) then
myVidScreen:SetProtected(true)
| end
See Also
� Screen.SetProtected
Screen.IsVisible
Brief
Returns whether a screen is visible or not.
Definition
! Boolean Screen.IsVisible( Screen object )
Arguments
object - Screen object to affect.isVisible - true or false (defaults to true).
Return Values
Whether the screen is visible or not.
Description
This function returns whether a screen has been tagged as visible or invisible.
Examples
! isVisible = Screen.IsVisible( object )
See Also
� Screen.SetVisible
Screen.Pause
Brief
Pauses the currently playing screen.
Definition
! Screen.Pause ( Screen screen )
Arguments
screen - The screen to be paused.
Return Values
None.
Description
Pauses the currently playing screen.
Note: This is currently only supported for video, hsml and media-rss screens.
Examples
! s = Scene.FindScreen( "MyVideoScreen" )
; Screen.Pause( s )
See Also
� Screen.Resume
Screen. RestartStream
Brief
Restart the stream.
Definition
! boolean Screen.RestartStream( Screen object )
Arguments
object - Screen object to restart.
Return Values
true if succeeded
Description
Restart the current stream.
Examples
! boolReturn = Screen.RestartStream( object )
See Also
None
Screen.Resume
Brief
Resumes the currently paused screen.
Definition
! Screen.Resume( Screen screen )
Arguments
screen - The screen to be resumed.
Return Values
None.
Description
Resumes the currently paused screen.
Note: This is currently only supported for video, hsml and media-rss screens.
Examples
s = Scene.FindScreen( "MyVideoScreen" )
Screen.Resume( s )
See Also
� Screen.Pause
Screen.SetChannel
Brief
Sets the content channel for the screen.
Definition
Screen.SetChannel( Screen screen, string channelName )
Arguments
screen - The screen to be updated.channelName - the name of the content channel to display on the screen.
Return Values
None.
Description
Home stores a list of media content 'channels' - e.g. one channel might be "SonyAdChannell� - with each channel providing an indirection to the
screen type and content. The content for each channel can be updated independently of the main package and scene data.
Examples
! Screen.SetChannel( myScreen, "SonyAdChannell" )
See Also
� Screen.SetContent
� Screen.SetType
Screen.SetContent
Brief
Sets a content source or sources on the screen.
Definition
Screen.SetContent ( Screen screen, string[] contentList )
Screen.SetContent( Screen screen, string content, number contentlndex = 1 )
Arguments
screen - The screen to update.contentList - An array of strings specifying multiple content sources.content - A string for the content
source.contentlndex - The index to set the content to. Ranges from 1 to the number of content sources. Defaults to 1.
Return Values
None.
Description
Sets a content source or sources on the screen. The source string will either be a URL or a path relative to the HDK's build root directory. Note
that paths relative to the HDK's build root directory can only be used for testing/development purposes. Scripts uploaded to a content server must
reference content served over HTTP. Also note that HomeDeveloper.self must be launched in online mode in order for online sources to be
specified.
Examples
� Examplel: Testing a video served from the host PC's hard drive for debug
localSource = "localvideo/testvideo.mp4"
Debug.SetContent( myScreenl, localSource )
� Example 2: Play back a video served from an HTTP server
onlineSource = "http://mycontentserver.com/onlinevideo.mp4"
Screen.SetContent( myScreen2, onlineSource )
See Also
� Scene. FindScreen
Screen.SetCurrentContentlndex
Brief
Sets the screen to the specified content index.
Definition
Screen.SetCurrentContentIndex( Screen screen, number contentlndex )
Arguments
screen - The screen to update.contentlndex - The index of the content to set the screen to. Ranges from 1 to the content count.
Return Values
None.
Description
Sets the screen to the specified content index.
Examples
� Step to the next content source if it has been downloaded
screen = Scene.FindScreen( "MyVideoScreen" )
contentCount = Screen.GetContentCount ( screen )
currentlndex = Screen.GetCurrentContentlndex( screen )
nextlndex = ( currentlndex + 1 ) % contentCount
if Screen.IsContentReady( screen, nextlndex ) then
Screen.SetCurrentContentlndex( screen, nextlndex )
end
See Also
� Scene. FindScreen
� Screen.GetContentCount
� Screen.GetCurrentContentlndex
� Screen.IsContentReady
Screen.SetCurrentTime
Brief
Set the current time for the currently selected content.
Definition
! Screen.SetCurrentTime(Screen screen, number time)
Arguments
screen - the screen to modifytime - the time (in seconds) to set
Return Values
Description
Set the current playback time for the currently selected content. For a video this will set the playback time to "time� seconds from the beginning of
the video for example. This is currently only supported on video screens and media-rss screens playing video content. Note that setting the time
will necessarily cause the video to rebuffer, so there will be a delay before the movie changes to the new time. This is worth bearing in mind if you
are attempting to synchronize video playback between clients.
Examples
s = Screen.Create( 'video 1 , 'http://www.example.com/video.mp4' )
s:Pause()
s:SetCurrentContentlndex( 3 )
s:SetCurrentTime( timeOffset ) � timeOffset calculated to synchronise this user with the others
s:Resume()
See Also
� Screen.Pause
� Screen.Resume
� Screen. GetCurrentTime
Screen.SetData
Brief
Sets the data for an HSML screen.
Definition
Screen.SetData( Screen screen, <string|MemoryContainer|Resource> data, string contentRoot )
Arguments
screen - The screen to update.data - Different types depending on the type of the screen.contentRoot - Root path to which all content referenced
by the HSML is relative to.
Return Values
Description
Currently only supported for HSML screens. For HSML screens the data can be either a string, a MemoryContainer containing BasicGenx output,
or an XML Resource.
Examples
� Example 1: Setting HSML content from a string
hsmlScreen = Scene.FindScreen( "HsmlScreen" )
data = ' <XMLXPAGEXRECT X="0" Y="0" W="1280" H="720" col="#FF00C0" /XTEXT X="430" Y="20"
col="#FFFFFF" size="4">'
data = data .. Person.GetName( LocalPlayer.GetPerson() )
data = data .. ' </TEXTx/PAGEx/XML>'
Screen.SetData ( hsmlScreen, data )
� Example 2: Setting HSML content from a MemoryContainer
mem = MemoryContainer.Create ( 4096 )
writer = BasicGenx.Create ( mem )
BasicGenx.StartDocument( writer )
� Use BasicGenx to write HSML XML data here...
BasicGenx.EndDocument( writer )
Screen.SetData( hsmlScreen, mem )
� Example 3: Setting HSML content from a downloaded XML resource
url = "http://www.example.com/hsmlscreen.xml"
hsmlResource = Resource.Request( url, "xml" )
while Resource.IsLoading( hsmlResource ) do
coroutine.yield()
end
if Resource.IsLoaded( hsmlResource ) then
Screen.SetData( hsmlScreen, hsmlResource )
end
See Also
� BasicGenx.Create
� MemoryContainer.Create
� Resource. Request
� Scene.FindScreen
Screen.SetFog Enabled
Brief
Set whether this screen should be affected by fog (defaults to false)
Definition
! Screen.SetFogEnabled(Screen screen, boolean enable)
Arguments
screen - the screen to modifyenable - true to enable fogging or false otherwise
Return Values
None.
Description
Set whether this screen should be affected by fog. If this flag is set to true, the screen will be affected by the fog in the scene, and will therefore
need to be positioned in front of a solid backing in order to provide the z-value (screens themselves do not write to the depth buffer).
Examples
! myScreen:SetFogEnabled( true )
See Also
� Screen.IsFogEnabled
Screen.SetHDFullScreenMode
Brief
Set a video full screen mode to real full screen.
Definition
! Screen.SetHDFullScreenMode( Screen screen, boolean value )
Arguments
screen - The screen to toggle the background for.value - true to enable real full screen, false to disable it (default is disabled).
Return Values
None.
Description
Set a video full screen mode to real full screen.
Examples
! local screen = Scene.FindScreen( "video1" )
! screen.SetHDFullScreenMode( true )
See Also
� Scene. FindScreen
Screen.SetHighPriority
Brief
Set a video screen to high priority.
Definition
! Screen.SetHighPriority( Screen screen, boolean value )
Arguments
screen - The screen to toggle the background for.value - true to enable high priority, false to disable it (default is disabled).
Return Values
None.
Description
Set a video screen to high priority.
Examples
! local screen = Scene.FindScreen( "videol" )
| screen.SetHighPriority( false )
See Also
� Scene. FindScreen
Screen.SetMuteSceneSounds
Brief
Set the sounds in the scene to mute if video in full screen.
Definition
! Screen.SetMuteSceneSounds( Screen screen, boolean value )
Arguments
screenvalue - true to disable scene sound while in full screen, false to disable it (default is disabled).
Return Values
None.
Description
Set the sounds in the scene to mute if video in full screen.
Examples
local screen = Scene.FindScreen( "videol" )
screen.SetMuteSceneSounds( true )
See Also
� Scene.FindScreen
Screen.SetProtected
Brief
Enable or disable capture protection on a screen.
Definition
Screen.SetProtected(Screen screen, boolean protected)
Arguments
screen - the screen to modifyprotected - true to protect the screen or false otherwise
Return Values
None.
Description
Enable or disable capture of a screen's contents. If this flag is set to true, any capture process (screenshot or video) will cause the screen's
content to not be rendered, thus protecting any copyrighted or sensitive material. Setting to false will unprotect the screen's content. "LUA"
screens will default to protected, other screen types will default to unprotected.
Examples
� Create a screen for submitting graphical primitives from Lua
vidScreen = Screen.Create( topLeft, bottomRight, bottomLeft, "VIDEO",
"http://www.example.com/CopyrightedVideo.mp4" )
vidScreen:SetProtected( true )
See Also
� Screen.IsProtected
Screen.SetTargetable
Brief
Sets the screen to be targetable or not.
Definition
Screen.SetTargetable( Screen screen, boolean value )
Arguments
screen - The screen to update.value - If true then the screen is targetable and if false it is not targetable.
Return Values
None.
Description
Sets the screen to be targetable or not. Screens created in Lua default to have targeting disabled. Screens that appear in the HDK's Scene Editor
application default to have targeting enabled.
Examples
� Example 1: This type of screen defaults to targetable
screenl = Scene.FindScreen( "MyVideoScreen" )
Screen.SetTargetable( screenl, false )
� Example 2: This type of screen defaults to not targetable
screen2 = Screen.Create( topLeft, bottomRight, bottomLeft, "LUA" )
Screen.SetTargetable( screen2, true )
See Also
� Scene.FindScreen
� Screen.Create
Screen.SetT riggerPosition
Brief
Changes the trigger position for the screen.
Definition
Screen.SetTriggerPosition( Screen object, Vector4 position = nil )
Arguments
object - Screen object to modify.position - The new trigger position. If nil is specified the trigger position will reset to default.
Return Values
None.
Description
Modifies the default trigger position to affect where the user can target this screen. Specifying nil will reset the trigger position to be based on
Screen. GetCenterQ.
Examples
local position = Vector4.Create( 10, 0, 10 )
local screen = Scene.FindScreen( "MyVideoScreen" )
Screen.SetTriggerPosition( screen, position ) � set a custom trigger position
Screen.SetTriggerPosition( screen, nil ) � reset the position to default
See Also
� Screen.GetTriggerPosition
� Screen.SetTriggerRadius
� Screen.Create
� Scene. FindScreen
Screen.SetTriggerRadius
Brief
Changes the trigger radius for the screen.
Definition
j Screen.SetTriggerRadius( Screen object, number range )
Arguments
object - Screen object to modify.range - The new trigger radius in meters. Must be positive or 0, 0 is considered infinite.
Return Values
None.
Description
Modifies the default trigger radius to affect from how far away the user can target this screen. Specifying 0 will make the screen targetable from
any distance.
Examples
! Screen.SetTriggerRadius( screen, 10 )
See Also
� Screen.GetTriggerRadius
� Screen.Create
� Scene.FindScreen
Screen.SetType
Brief
Sets the content type for the screen.
Definition
Screen.SetType( Screen screen, string type )
Arguments
screen - The screen to update.type - The new screen type. Can be one of the following:
"HSML"
"IMAGES"
"LUA"
"MEDIARSS"
"VIDEO"
Return Values
None.
Description
Sets the content type for the screen.
Examples
! Screen.SetType( myScreen, "VIDEO" )
! Screen.SetContent( myScreen, "http://www.example.com/myvideo.mp4" )
See Also
� Screen.SetContent
Screen.SetVisible
Brief
Set screen to be visible or invisible.
Definition
Screen.SetVisible( Screen object, boolean isVisible )
Arguments
object - Screen object to affect.isVisible - true to make the screen visible and false otherwise.
Return Values
None.
Description
Set screen to be visible or invisible. This will also mute videos and remove the ability for the screen to be targetable. Will error when applied to a
geometry screen.
Examples
Screen.SetVisible( object, false )
See Also
� Screen.IsVisible
Screen.SetVolume
Brief
Sets the volume of the screen.
Definition
Screen.SetVolume( Screen screen, number volume )
Arguments
screen - The screen to query.volume - The volume to set, 0.0 to 1.0.
Return Values
None.
Description
Sets the volume of the screen. A value outside the 0.0 to 1.0 range will be capped.
Examples
1 screen = Scene.FindScreen( "MyVideoScreen" )
; Screen.SetVolume( screen, 0.5 )
See Also
� Scene.FindScreen
� Screen.Create
� Screen. GetVolume