Files
open-insight/LSL2/OIEVENT/CLICK/RDS_LAYERS.BUTTON_2.json
2024-03-25 15:12:53 -07:00

11 lines
1.7 KiB
JSON

{
"header": {
"version": 1,
"type": "record"
},
"body": {
"record1": {
"<1>": "declare subroutine end_dialog\r\ndeclare function msg\r\n$insert msg_equates\r\n\r\nLayerPromptCnt = get_property( @window, '@LayerPromptCnt' )\r\nLayerControls = get_property( @window, '@LayerControls' )\r\nLayerDataOnWindow = get_property( LayerControls, 'INVALUE' )\r\nconvert @rm to @fm in LayerDataOnWindow\r\nCurLayerNo = get_property( @window, '@CurLayer' )\r\nAllLayers = get_property( @window, '@LayerInfo' )\r\nif LayerDataOnWindow = str( @fm, LayerPromptCnt-1 ) then\r\n * do not store and delete blank layer\r\n convert char(248) to @fm in AllLayers\r\n AllLayers = delete( AllLayers, CurLayerNo, 0, 0 )\r\n convert @fm to char(248) in AllLayers\r\n Void = set_property( @window, '@LayerInfo', AllLayers )\r\nend else\r\n\tAllLayers = fieldstore( AllLayers, char(248), CurLayerNo, 1, LayerDataOnWindow )\r\n\tVoid = set_property( @window, '@LayerInfo', AllLayers )\r\nend\r\n*\r\nOrigLayerData = get_property( @window, '@OrigLayerInfo' )\r\nLayerData = get_property( @window, '@LayerInfo' )\r\nif LayerData <> OrigLayerData then\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'You have changed RDS layer information. Do you wish to save?'\r\n\tMsgInfo<mtype$> = 'BNYC'\r\n\tMsgInfo<micon$> = '?'\r\n\tResponse = msg( '', MsgInfo )\r\n\tif Response = 1 then \r\n\t convert @vm to @svm in LayerData\r\n\t convert @fm to @vm in LayerData\r\n\t end_dialog( @window, LayerData )\r\n\tend else\r\n\t if Response = 0 then\r\n\t end_dialog( @window, 'CANCEL' )\r\n\t end\r\n\tend\r\nend else \r\n end_dialog( @window, 'CANCEL' )\r\nend\r\n\r\nRETURN 0"
}
}
}