001package com.fs.starfarer.api.util; 002 003import java.awt.Color; 004 005import com.fs.starfarer.api.campaign.SectorEntityToken; 006import com.fs.starfarer.api.campaign.TextPanelAPI; 007import com.fs.starfarer.api.campaign.comm.CommMessageAPI; 008 009public class FleetLog { 010 011 public static CommMessageAPI beginEntry(String subject, SectorEntityToken target) { 012 return beginEntry(subject, target, null, (String []) null); 013 } 014 015 public static CommMessageAPI beginEntry(String subject, SectorEntityToken target, Color highlight, String... highlights) { 016 return beginEntry(subject, target, Misc.getTextColor(), highlight, highlights); 017 } 018 019 public static CommMessageAPI beginEntry(String subject, SectorEntityToken target, Color color, Color highlight, String... highlights) { 020 return null; 021// CommMessageAPI message = Global.getFactory().createMessage(); 022// message.setSubject(subject); 023// if (color != null) { 024// message.setSubjectColor(color); 025// } 026// if (highlight != null) { 027// Highlights h = new Highlights(); 028// for (String curr : highlights) { 029// h.append(curr, highlight); 030// } 031// message.setSubjectHighlights(h); 032// } 033// 034// 035// message.getSection1().setTitle("Summary"); 036// 037// //message.setDeliveredBy("Delivered by"); 038// 039// CampaignFleetAPI player = Global.getSector().getPlayerFleet(); 040// if (target == null) target = player; 041// message.setLocationString(target.getContainingLocation().getNameWithLowercaseType()); 042// if (target.getContainingLocation() instanceof StarSystemAPI) { 043// message.setStarSystemId(target.getContainingLocation().getId()); 044// if (target != player) message.setCenterMapOnEntity(target); 045// } else { 046// message.setLocInHyper(target.getLocationInHyperspace()); 047// if (target != player) message.setCenterMapOnEntity(target); 048// } 049// 050// 051// message.setType("Log Entry"); 052// message.setShortType("Fleet log"); 053// //message.setSender("Exploration"); 054// 055// message.setTimeReceived(Global.getSector().getClock().getTimestamp()); 056// message.setTimeSent(Global.getSector().getClock().getTimestamp()); 057// 058//// message.getSection1().setTitle("Section 1"); 059//// message.getSection1().addPara("Test paragraph one"); 060// message.setSmallIcon(Global.getSettings().getSpriteName("intel_categories", "star_systems")); 061// return message; 062 } 063 064 065 public static void addToLog(CommMessageAPI message, TextPanelAPI panel) { 066// message.setShowInCampaignList(panel == null); 067// message.setAddToIntelTab(true); 068// message.setAction(MessageClickAction.INTEL_TAB); 069// message.addTag(Tags.FLEET_LOG); 070// 071// Global.getSector().getCampaignUI().addMessage(message); 072// 073// if (panel != null) { 074// panel.setFontSmallInsignia(); 075// panel.addParagraph("Fleet log entry added", Misc.getTooltipTitleAndLightHighlightColor()); 076// panel.setFontInsignia(); 077// } 078 } 079 080 081} 082 083 084 085 086