static void OnRemoveSelectedImagesSucess(ref RemoveSelectedImagesMsg msg, MyNetworkClient sender) { MyEntity entity = null; MyEntities.TryGetEntityById(msg.EntityId, out entity); MyTextPanel block = entity as MyTextPanel; if (block != null) { block.RemoveItems(msg.Selection); } }
static void OnRemoveSelectedImageRequest(ref RemoveSelectedImagesMsg msg, MyNetworkClient sender) { MyEntity entity = null; MyEntities.TryGetEntityById(msg.EntityId, out entity); MyTextPanel block = entity as MyTextPanel; if (block != null) { block.RemoveItems(msg.Selection); Sync.Layer.SendMessageToAll(ref msg, MyTransportMessageEnum.Success); } }