Starsector API
Loading...
Searching...
No Matches
FleetLog.java
Go to the documentation of this file.
1package com.fs.starfarer.api.util;
2
3import java.awt.Color;
4
5import com.fs.starfarer.api.campaign.SectorEntityToken;
6import com.fs.starfarer.api.campaign.TextPanelAPI;
7import com.fs.starfarer.api.campaign.comm.CommMessageAPI;
8
9public class FleetLog {
10
11 public static CommMessageAPI beginEntry(String subject, SectorEntityToken target) {
12 return beginEntry(subject, target, null, (String []) null);
13 }
14
15 public static CommMessageAPI beginEntry(String subject, SectorEntityToken target, Color highlight, String... highlights) {
16 return beginEntry(subject, target, Misc.getTextColor(), highlight, highlights);
17 }
18
19 public static CommMessageAPI beginEntry(String subject, SectorEntityToken target, Color color, Color highlight, String... highlights) {
20 return null;
21// CommMessageAPI message = Global.getFactory().createMessage();
22// message.setSubject(subject);
23// if (color != null) {
24// message.setSubjectColor(color);
25// }
26// if (highlight != null) {
27// Highlights h = new Highlights();
28// for (String curr : highlights) {
29// h.append(curr, highlight);
30// }
31// message.setSubjectHighlights(h);
32// }
33//
34//
35// message.getSection1().setTitle("Summary");
36//
37// //message.setDeliveredBy("Delivered by");
38//
39// CampaignFleetAPI player = Global.getSector().getPlayerFleet();
40// if (target == null) target = player;
41// message.setLocationString(target.getContainingLocation().getNameWithLowercaseType());
42// if (target.getContainingLocation() instanceof StarSystemAPI) {
43// message.setStarSystemId(target.getContainingLocation().getId());
44// if (target != player) message.setCenterMapOnEntity(target);
45// } else {
46// message.setLocInHyper(target.getLocationInHyperspace());
47// if (target != player) message.setCenterMapOnEntity(target);
48// }
49//
50//
51// message.setType("Log Entry");
52// message.setShortType("Fleet log");
53// //message.setSender("Exploration");
54//
55// message.setTimeReceived(Global.getSector().getClock().getTimestamp());
56// message.setTimeSent(Global.getSector().getClock().getTimestamp());
57//
60// message.setSmallIcon(Global.getSettings().getSpriteName("intel_categories", "star_systems"));
61// return message;
62 }
63
64
65 public static void addToLog(CommMessageAPI message, TextPanelAPI panel) {
66// message.setShowInCampaignList(panel == null);
67// message.setAddToIntelTab(true);
68// message.setAction(MessageClickAction.INTEL_TAB);
69// message.addTag(Tags.FLEET_LOG);
70//
71// Global.getSector().getCampaignUI().addMessage(message);
72//
73// if (panel != null) {
74// panel.setFontSmallInsignia();
75// panel.addParagraph("Fleet log entry added", Misc.getTooltipTitleAndLightHighlightColor());
76// panel.setFontInsignia();
77// }
78 }
79
80
81}
82
83
84
85
86
static CommMessageAPI beginEntry(String subject, SectorEntityToken target, Color color, Color highlight, String... highlights)
Definition FleetLog.java:19
static CommMessageAPI beginEntry(String subject, SectorEntityToken target, Color highlight, String... highlights)
Definition FleetLog.java:15
static CommMessageAPI beginEntry(String subject, SectorEntityToken target)
Definition FleetLog.java:11
static void addToLog(CommMessageAPI message, TextPanelAPI panel)
Definition FleetLog.java:65
static Color getTextColor()
Definition Misc.java:832