public EventCommandWarp(WarpCommand refCommand, FrmEvent editor) { InitializeComponent(); mMyCommand = refCommand; mEventEditor = editor; InitLocalization(); cmbMap.Items.Clear(); for (var i = 0; i < MapList.OrderedMaps.Count; i++) { cmbMap.Items.Add(MapList.OrderedMaps[i].Name); if (MapList.OrderedMaps[i].MapId == mMyCommand.MapId) { cmbMap.SelectedIndex = i; } } if (cmbMap.SelectedIndex == -1) { cmbMap.SelectedIndex = 0; } scrlX.Maximum = Options.MapWidth - 1; scrlY.Maximum = Options.MapHeight - 1; scrlX.Value = mMyCommand.X; scrlY.Value = mMyCommand.Y; lblX.Text = Strings.Warping.x.ToString(scrlX.Value); lblY.Text = Strings.Warping.y.ToString(scrlY.Value); cmbDirection.SelectedIndex = (int)mMyCommand.Direction; }
private static string GetCommandText(WarpCommand command, MapInstance map) { var mapName = Strings.EventCommandList.mapnotfound; for (var i = 0; i < MapList.OrderedMaps.Count; i++) { if (MapList.OrderedMaps[i].MapId == command.MapId) { mapName = MapList.OrderedMaps[i].Name; } } return(Strings.EventCommandList.warp.ToString( mapName, command.X, command.Y, Strings.Directions.dir[(int)command.Direction - 1] )); }