# Multiplayer: Web Client

The Web Client is the website used to manage the multiplayer room. The Web Client will read the webConfig data from the shared data and create an experience based on the configuration.

You can show lists of data, click buttons and open a dialog with various list/text/slider controls. You can also have icons and text on the map as well as lines and range rings.

# list (WebConfig)

The list widget will create an entry for every key within the source object. Each entry can have multiple rows, and each row is made up of items which can be of the following type:

text
icon
button

# map_point (WebConfig)

map_point will generate an element for the specified location. The element can be

  1. range ring. Always used if range is specified (even if zero). Not compatible with icon or text (they will be ignored)
  2. icon. Can be any URI including a data uri.
  3. text which will be displayed next to the icon (icon itself is not required).

See stroke and fill to style.

# map_line (WebConfig)

map_line will generate a line string from a given array of points.

See stroke to style.

# event (WebConfig)

event can be used to execute a command list when keys are added/removed/updated within a given source. You might use this to play a sound, to activate a dialog, or even to execute logic or update locals. Most logic should live within the aircraft but this tool is available.

# Dialog widgets

You can use show_dialog to display a list of widgets in a modal fashion. Normally triggered as a result of a button click.

text
icon
button
textbox
listbox
textarea
slider

# WEB COMMANDS

The web commands are a limited subset of the mission command set.

Web commands:

set_map_center
show_dialog
close_dialog
play_sound

Available commands from the normal mission command set:

set (param and local only)
sleep
if
while
switch
try
for_each
modify_array
create_thread
throw_error
debug_write
break
continue
set_shared_data
fetch

# WEB QUERY

The web query commands are a limited subset of the mission query command set.

create_array
create_struct
struct
string:split
string:join
json:stringify
json:parse
json:copy
object:keys
create_number
param
has_param
static
has_static
local
has_local
rand
add
add360
subtract
multiply
right_shift
left_shift
remainder
xor
exponent
divide
round
tofixed
floor
Math.* (same)
ceil
abs
clamp
scale
and
or
not
if
switch
require
compare
text
typeof
isNaN
parseInt
parseFloat
convert (weight & length units)
no_resolve
fn.create_guid
fn.create_date
fn.get_time_string
fn.has_selected_poi
fn.selected_poi_info
fn.selected_poi_location
fn.is_dialog_open