User Tools

Site Tools


scripting:reference:scriptedosd

This is an old revision of the document!


ScriptedOSD Reference

Scripts run on the server can create an OSD layout that is transmitted to then executed by the client. See the ScriptedOSD Overview for a general description of how this system is used.

ScriptedOSD Commands

OSDCreate

Parameters OSD_TYPE, Name, Title
Example osdcreate(OSDBUILDING,“Main”, “” )
Description This function is used to start a new osd block.

The OSD_TYPE can be one of :
- OSDWINDOW
- OSDBUILDING
- OSDPOPUP
- OSDBLANK
- OSDLOWER
- OSDTUTORIAL
- OSDNOTIFICATION
- OSDSPEC
- OSDSPECLOWER
- OSDBLANKCENTER

If OSDWINDOW is used a background window is created 400×300, in the center of the screen. With OSDBUILDING, the OSD is displayed within the region of the building access window.

The Name of the OSD is used to identify its components : See [Responding to OSD Button Presses].

OSDAddItem

Parameters : OSD_ITEMTYPE, Name, Title
Example : OsdAddItem(OSDIMAGE,“”, “http://myweb.com/image.jpg” )
Description :

OSDAddAt

Parameters : OSD_ITEMTYPE, X, Y, W, H, Name, Title
Example : OsdAddAt(OSDBUTTON, 100, 100, 200, 20, “Option1”, “Press me” )
Description :

OSDSet

Parameters Flag to set
Example osdset( “BlockEscape” )
Description This function is used to set a specific OSD behaviour flag.

Currently, “BlockEscape” is the only valid flag and is used to remove the user control to press escape to close an osd screen. Example

osdcreate( OSDLOWER, "Help", "Help Guide" )
osdset( "BlockEscape" )
osdaddat( TEXT, 100,0, 400, 100, "", "Welcome to my world, press the button to start" )
osdaddat( BUTTON, 200, 70, 200, 35, "", "Start Game" )
osdactivate()

OSDActivate

Parameters : None Example : OsdActivate()
Description : Triggers the actual transmission of the OSD layout to the client.

ScriptedOSD Item Types

BUTTON

TEXT

IMAGE

BULLET

EXITBUTTON

LISTBUTTON

BIGTEXT

FADEDBUTTON

TEXTENTRY

BUTTONMINWIDTH

MINHEIGHT

FADEDIMAGE

FADEDTEXT

SMALLTEXT

TEXTRIGHT

SMALLTEXTRIGHT

BIGTEXTRIGHT

VALUE

APPLYBUTTON

APPLYEXITBUTTON

scripting/reference/scriptedosd.1402173541.txt.gz · Last modified: (external edit)