public class RuleBasedInteractionDialogPluginImpl extends java.lang.Object implements InteractionDialogPlugin, RuleBasedDialog
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FAILSAFE_LEAVE |
| Constructor and Description |
|---|
RuleBasedInteractionDialogPluginImpl() |
RuleBasedInteractionDialogPluginImpl(java.lang.String initialTrigger) |
| Modifier and Type | Method and Description |
|---|---|
void |
advance(float amount)
Get's called every frame.
|
void |
backFromEngagement(EngagementResultAPI result)
Get's called after a fleet battle connected to this dialog ends.
|
boolean |
fireAll(java.lang.String trigger) |
boolean |
fireBest(java.lang.String trigger) |
java.lang.Object |
getContext()
Usually, simply returning null is fine
|
java.lang.Object |
getCustom1() |
java.lang.Object |
getCustom2() |
java.lang.Object |
getCustom3() |
java.util.Map<java.lang.String,MemoryAPI> |
getMemoryMap()
Usually, simply returning null or an empty map is fine.
|
void |
init(InteractionDialogAPI dialog)
Initialize your GUI in here, by populating options, texts and images *
|
void |
notifyActivePersonChanged() |
void |
optionMousedOver(java.lang.String optionText,
java.lang.Object optionData)
Get's called when the player hovers over an option.
|
void |
optionSelected(java.lang.String text,
java.lang.Object optionData)
This gets called when the player clicks on an option.
|
void |
reinit(boolean withContinueOnRuleFound) |
void |
setActiveMission(CampaignEventPlugin mission) |
void |
setCustom1(java.lang.Object custom1) |
void |
setCustom2(java.lang.Object custom2) |
void |
setCustom3(java.lang.Object custom3) |
void |
setEmbeddedMode(boolean embeddedMode) |
void |
updateMemory() |
public static final java.lang.String FAILSAFE_LEAVE
public RuleBasedInteractionDialogPluginImpl()
public RuleBasedInteractionDialogPluginImpl(java.lang.String initialTrigger)
public void setEmbeddedMode(boolean embeddedMode)
public void reinit(boolean withContinueOnRuleFound)
reinit in interface RuleBasedDialogpublic void init(InteractionDialogAPI dialog)
InteractionDialogPlugininit in interface InteractionDialogPlugindialog - entry point for interacting with the dialog. You should probably store this in a member variablepublic void updateMemory()
updateMemory in interface RuleBasedDialogpublic void notifyActivePersonChanged()
notifyActivePersonChanged in interface RuleBasedDialogpublic void setActiveMission(CampaignEventPlugin mission)
setActiveMission in interface RuleBasedDialogpublic boolean fireAll(java.lang.String trigger)
public boolean fireBest(java.lang.String trigger)
public void backFromEngagement(EngagementResultAPI result)
InteractionDialogPluginbackFromEngagement in interface InteractionDialogPluginpublic void optionSelected(java.lang.String text, java.lang.Object optionData)
InteractionDialogPluginoptionSelected in interface InteractionDialogPlugintext - the name of the option, i.e. the first argument passed to addOptionoptionData - the data/identifier of the selected option. Cast this to the correct type. Don't forget to
null-check the result of the cast.public void optionMousedOver(java.lang.String optionText, java.lang.Object optionData)
InteractionDialogPluginoptionMousedOver in interface InteractionDialogPluginpublic void advance(float amount)
InteractionDialogPluginadvance in interface InteractionDialogPluginpublic java.lang.Object getContext()
InteractionDialogPlugingetContext in interface InteractionDialogPluginpublic java.util.Map<java.lang.String,MemoryAPI> getMemoryMap()
InteractionDialogPlugingetMemoryMap in interface InteractionDialogPlugingetMemoryMap in interface RuleBasedDialogpublic java.lang.Object getCustom1()
public void setCustom1(java.lang.Object custom1)
public java.lang.Object getCustom2()
public void setCustom2(java.lang.Object custom2)
public java.lang.Object getCustom3()
public void setCustom3(java.lang.Object custom3)