public class BarEventDialogPlugin extends java.lang.Object implements InteractionDialogPlugin
| Modifier and Type | Field and Description |
|---|---|
protected BarCMD |
cmd |
protected InteractionDialogAPI |
dialog |
protected PortsideBarEvent |
event |
protected java.util.Map<java.lang.String,MemoryAPI> |
memoryMap |
protected InteractionDialogPlugin |
originalPlugin |
| Constructor and Description |
|---|
BarEventDialogPlugin(BarCMD cmd,
InteractionDialogPlugin originalPlugin,
PortsideBarEvent event,
java.util.Map<java.lang.String,MemoryAPI> memoryMap) |
| Modifier and Type | Method and Description |
|---|---|
void |
advance(float amount)
Get's called every frame.
|
void |
backFromEngagement(EngagementResultAPI battleResult)
Get's called after a fleet battle connected to this dialog ends.
|
void |
endEvent() |
java.lang.Object |
getContext()
Usually, simply returning null is fine
|
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 |
optionMousedOver(java.lang.String optionText,
java.lang.Object optionData)
Get's called when the player hovers over an option.
|
void |
optionSelected(java.lang.String optionText,
java.lang.Object optionData)
This gets called when the player clicks on an option.
|
protected InteractionDialogAPI dialog
protected InteractionDialogPlugin originalPlugin
protected PortsideBarEvent event
public BarEventDialogPlugin(BarCMD cmd, InteractionDialogPlugin originalPlugin, PortsideBarEvent event, java.util.Map<java.lang.String,MemoryAPI> memoryMap)
public 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 optionSelected(java.lang.String optionText, java.lang.Object optionData)
InteractionDialogPluginoptionSelected in interface InteractionDialogPluginoptionText - 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 endEvent()
public void advance(float amount)
InteractionDialogPluginadvance in interface InteractionDialogPluginpublic void backFromEngagement(EngagementResultAPI battleResult)
InteractionDialogPluginbackFromEngagement in interface InteractionDialogPluginpublic java.lang.Object getContext()
InteractionDialogPlugingetContext in interface InteractionDialogPluginpublic java.util.Map<java.lang.String,MemoryAPI> getMemoryMap()
InteractionDialogPlugingetMemoryMap in interface InteractionDialogPluginpublic void optionMousedOver(java.lang.String optionText, java.lang.Object optionData)
InteractionDialogPluginoptionMousedOver in interface InteractionDialogPlugin