[id] = CreateDisplay(id[, table])
CreateDisplay()
will return a handle to the new
display which you can then use to refer to this display.
Furthermore, you should pass a table in the second argument to configure
the style for the new display. Please note that every display must have
a BGPic associated with it. Thus, it is advised that you always specify
the BGPic
tag in the optional table when creating a display. If you
do not specify the BGPic
tag, CreateDisplay()
will create a new BGPic
for the new display automatically. The newly created BGPic will be of
the size specified in Width
and Height
and it will be filled according
to the style specified in FillStyle
. If you specify the BGPic
tag,
Width
, Height
and FillStyle
are ignored.
Also note that the same BGPic cannot be associated with multiple displays. Each BGPic must only be associated with a single display. It is not possible to have BGPic 1 associated with display 1 and 2, for example. Simply make a copy of the BGPic using CopyBGPic() if you need to use a single BGPic with multiple displays.
The optional table argument recognizes the following tags:
BGPic:
Width
, Height
and FillStyle
tags. See
further notes above.
Width, Height:
BGPic
tag is set.
X, Y:
Mode:
Title:
Borderless:
Sizeable:
Fixed:
Backfill:
ScrWidth, ScrHeight:
ScrDepth:
NoHide:
NoModeSwitch:
NoClose:
Active:
HidePointer:
UseQuartz:
ScaleMode:
ScaleWidth, ScaleHeight:
SmoothScale:
DragRegion:
SizeRegion:
Layers:
FitScale:
KeepProportions:
FillStyle:
BGPic
tag is set.
Defaults to #FILLCOLOR
. (V5.0)
Color:
TextureBrush:
TextureX, TextureY:
GradientStyle:
GradientAngle:
GradientStartColor, GradientEndColor:
GradientCenterX, GradientCenterY:
GradientBalance:
GradientBorder:
GradientColors:
KeepScreenOn:
PubScreen:
HideFromTaskbar:
HideOptionsMenu:
Orientation:
DisableBlanker:
Menu:
Monitor:
XServer:
ScreenTitle:
ScreenName:
RememberPosition:
Maximized:
TrapRMB:
NoScaleEngine:
NoLiveResize:
NativeUnits:
AlwaysOnTop:
NoCyclerMenu:
HideTitleBar:
Subtitle:
SingleMenu:
ScaleFactor:
ImmersiveMode:
Palette:
FillPen:
SoftwareRenderer:
VSync:
ScaleSwitch:
UserTags:
After the display has been successfully created, you can open it by calling OpenDisplay(), you can draw to it by using SelectDisplay() and you can close it using CloseDisplay().
See SelectDisplay for an in-depth discussion of using multiple displays in Hollywood.
This command is also available from the preprocessor: Use @DISPLAY to create displays at startup time!
CreateDisplay(2, {BGPic = 2, Active = True}) OpenDisplay(2) NPrint("Hello World")The code above creates a new display and attaches BGPic number 2 to it. The display will inherit the size and graphics from BGPic. Then we open the display and print "Hello World" into it.
CreateDisplay(2, {Width = 800, Height = 600, Borderless = True, Color = #WHITE, Active = True}) OpenDisplay(2)The code above creates and opens a 800x600 borderless display with white background. Because we did not specify a BGPic for this display,
CreateDisplay()
will create one automatically and attach it to the new
display. You can get a handle to the automatically created BGPic by
querying #ATTRBGPIC
on the new display using GetAttribute().