public interface IMaritimeTradeOverlay extends IOverlayView
Modifier and Type | Method and Description |
---|---|
void |
hideGetOptions()
Hides the "get" resources and undo components.
|
void |
hideGiveOptions()
Hides the "give" resources and undo components.
|
void |
reset()
Resets the view to its initial state.
|
void |
selectGetOption(ResourceType selectedResource,
int amount)
Selects the resource the user has selected to receive.
|
void |
selectGiveOption(ResourceType selectedResource,
int amount)
Selects the resource the user has selected to give.
|
void |
setCancelEnabled(boolean enabled)
Enables or disables the cancel button.
|
void |
setStateMessage(java.lang.String message)
Sets the message on the button indicating the state of the trade.
|
void |
setTradeEnabled(boolean enable)
Enables or disables the trade button.
|
void |
showGetOptions(ResourceType[] enabledResources)
Shows all the "get" resources, enabling the ones the player can receive,
and disabling the ones he can't.
|
void |
showGiveOptions(ResourceType[] enabledResources)
Shows all the "give" resources, enabling the ones the player can give,
and disabling the ones he can't.
|
closeModal, isModalShowing, showModal
getController, setController
void reset()
void hideGetOptions()
void hideGiveOptions()
void selectGetOption(ResourceType selectedResource, int amount)
selectedResource
- The "get" resource selected by the useramount
- The amount of the specified "get" resource the user will
receive (e.g., 1)void selectGiveOption(ResourceType selectedResource, int amount)
selectedResource
- The "give" resource selected by the useramount
- The amount of the specified "give" resource the user will give
(e.g., 3)void setStateMessage(java.lang.String message)
message
- The new state messagevoid setTradeEnabled(boolean enable)
enable
- Whether or not the user may currently execute the tradevoid setCancelEnabled(boolean enabled)
enabled
- Whether or not the user may cancel the trade operationvoid showGetOptions(ResourceType[] enabledResources)
enabledResources
- Array of "get" resources that should be enabled.void showGiveOptions(ResourceType[] enabledResources)
enabledResources
- Array of "give" resources that should be enabled.