1package com.fs.starfarer.api.impl.campaign.intel.misc;
7import org.lwjgl.input.Keyboard;
9import com.fs.starfarer.api.Global;
10import com.fs.starfarer.api.campaign.CampaignFleetAPI;
11import com.fs.starfarer.api.campaign.CampaignTerrainAPI;
12import com.fs.starfarer.api.campaign.FactionAPI;
13import com.fs.starfarer.api.campaign.SectorEntityToken;
14import com.fs.starfarer.api.campaign.TextPanelAPI;
15import com.fs.starfarer.api.impl.campaign.ids.Tags;
16import com.fs.starfarer.api.impl.campaign.terrain.DebrisFieldTerrainPlugin;
17import com.fs.starfarer.api.loading.Description;
18import com.fs.starfarer.api.loading.Description.Type;
19import com.fs.starfarer.api.ui.ButtonAPI;
20import com.fs.starfarer.api.ui.IntelUIAPI;
21import com.fs.starfarer.api.ui.SectorMapAPI;
22import com.fs.starfarer.api.ui.TooltipMakerAPI;
23import com.fs.starfarer.api.util.Misc;
38 private boolean withDesc;
40 private boolean withDeleteButton =
true;
41 private boolean withTimestamp =
true;
57 this.withDesc = withDesc;
91 super.reportRemovedIntel();
135 this.withDesc = withDesc;
155 if (mode == ListInfoMode.IN_DESC) initPad = opad;
161 if (
text !=
null && !
text.isEmpty()) {
164 str = str.substring(0, str.length() - 1);
166 info.
addPara(str, tc, initPad);
177 protected boolean endsInPunct(String str,
boolean forBulletPoint) {
178 String punct =
",.?!:;";
179 if (forBulletPoint) {
182 String end =
"" + str.charAt(str.length() - 1);
183 return punct.contains(end);
210 return withDeleteButton;
214 this.withDeleteButton = withDeleteButton;
218 return withTimestamp;
222 this.withTimestamp = withTimestamp;
234 boolean addedDesc =
false;
271 (
int)(width), 20f, opad * 2f);
290 super.buttonPressConfirmed(buttonId, ui);
295 return super.doesButtonHaveConfirmDialog(buttonId);
300 Set<String> tags = super.getIntelTags(map);
308 return super.getSortString();
324 prefix =
"Discovered: ";
329 return prefix +
title;
334 return super.getFactionForUIColors();
354 return super.shouldRemoveIntel();
static SettingsAPI getSettings()
static SectorAPI getSector()
void addLogTimestamp(TooltipMakerAPI info, Color tc, float opad)
void setListInfoParam(Object listInfoParam)
void unindent(TooltipMakerAPI info)
void addDeleteButton(TooltipMakerAPI info, float width)
Object getListInfoParam()
Color getBulletColorForMode(ListInfoMode mode)
void bullet(TooltipMakerAPI info)
Color getTitleColor(ListInfoMode mode)
static Object DISCOVERED_PARAM
void setRemoveTrigger(SectorEntityToken removeTrigger)
void setIcon(String icon)
void setKeepExploredDebrisField(Boolean keepExploredDebrisField)
boolean withCustomVisual()
void setText(String text)
SectorEntityToken getMapLocation(SectorMapAPI map)
void setWithDeleteButton(boolean withDeleteButton)
void setEntity(SectorEntityToken entity)
void addBulletPoints(TooltipMakerAPI info, ListInfoMode mode)
static SectorEntityToken makeDoubleWithSameOrbit(SectorEntityToken entity)
transient String discoveredPrefixOverride
void addPostDescriptionSection(TooltipMakerAPI info, float width, float height, float opad)
void setWithDesc(boolean withDesc)
FactionAPI getFactionForUIColors()
void reportRemovedIntel()
boolean endsInPunct(String str, boolean forBulletPoint)
void init(SectorEntityToken entity, String title, String text, String icon, boolean withDesc, TextPanelAPI textPanel)
boolean isWithDeleteButton()
boolean doesButtonHaveConfirmDialog(Object buttonId)
String getSmallDescriptionTitle()
void addCustomDescription(TooltipMakerAPI info, float width, float height)
void createSmallDescription(TooltipMakerAPI info, float width, float height)
void init(SectorEntityToken entity, String title, String text, String icon, boolean withDesc)
void buttonPressConfirmed(Object buttonId, IntelUIAPI ui)
Set< String > getIntelTags(SectorMapAPI map)
SectorEntityToken getEntity()
void setTitle(String title)
String getDiscoveredPrefixOverride()
static String BUTTON_EDIT
boolean isWithTimestamp()
void createIntelInfo(TooltipMakerAPI info, ListInfoMode mode)
void addCustomVisual(TooltipMakerAPI info, float width, float height)
boolean shouldRemoveIntel()
boolean withCustomDescription()
void setWithTimestamp(boolean withTimestamp)
MapMarkerIntel(SectorEntityToken entity, String title, String text, String icon, boolean withDesc)
void setDiscoveredPrefixOverride(String discoveredPrefixOverride)
void addExtraBulletPoints(TooltipMakerAPI info, Color tc, float initPad, ListInfoMode mode)
static Color getTextColor()
static Color getGrayColor()
static Color getHighlightColor()
Description getDescription(String id, Type type)
CampaignTerrainPlugin getPlugin()
void addEntity(SectorEntityToken entity)
SectorEntityToken createToken(float x, float y)
void removeEntity(SectorEntityToken entity)
IntelManagerAPI getIntelManager()
LocationAPI getContainingLocation()
void setOrbit(OrbitAPI orbit)
String getCustomDescriptionId()
InteractionDialogImageVisual getCustomInteractionDialogImageVisual()
void addIntel(IntelInfoPlugin plugin)
void showEditIntelMarkerDialog(MapMarkerIntel intel)