DashboardItemDate

Inherits DashboardItem

Members

Name

Documentation

Type

Description

Optional

FormatString

The format text describing how this dashboard item renders its text. This text must contain exactly one {} which is a placeholder that will contain the date.

String

Value of type ‘String’

Yes

TimeFormat

The format string used for formatting the date/time before being passed to the string in FormatString. See https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/timout_c.html for full information about how to structure this format.

String

Value of type ‘String’

Yes

Asset Examples

 1local Dashboard = {
 2  Identifier = "ScreenSpaceTime",
 3  Name = "Time",
 4  Type = "ScreenSpaceDashboard",
 5  FaceCamera = false,
 6  Scale = 3.0,
 7  Items = {
 8    {
 9      Type = "DashboardItemDate",
10      Identifier = "Date",
11      GuiName = "Date",
12      FontSize = 72,
13      FormatString = "{}",
14      TimeFormat = "YYYY MON DD HR:MN:SC.### ::RND"
15    }
16  }
17}
18
19
20asset.onInitialize(function()
21  openspace.addScreenSpaceRenderable(Dashboard)
22
23  openspace.setPropertyValueSingle("ScreenSpace.ScreenSpaceTime.Size", {0.000000,0.000000,640.000000,320.000000})
24end)
25
26asset.onDeinitialize(function()
27  openspace.removeScreenSpaceRenderable(Dashboard)
28end)
29
30asset.export(Dashboard)
31
32
33
34asset.meta = {
35  Name = "ScreenSpace - Date",
36  Description = [[
37    This asset provides a Date dashboard item that is shown on a screen space object.
38    This can be place on a dome surface to show the current time to the audience.
39  ]],
40  Author = "OpenSpace Team",
41  URL = "http://openspaceproject.com",
42  License = "MIT license"
43}