Package com.fs.starfarer.api.campaign
Interface OptionPanelAPI
public interface OptionPanelAPI
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
addOptionConfirmation
(Object data, StoryPointActionDelegate confirmDelegate) void
addOptionConfirmation
(Object optionId, String text, String yes, String no) void
addOptionTooltipAppender
(Object data, OptionPanelAPI.OptionTooltipCreator optionTooltipCreator) void
addSelector
(String text, Object data, Color color, float width, float maxValueWidth, float minValue, float maxValue, ValueDisplayMode mode, String tooltip) A user-adjustable bar useful for picking a value from a range.void
float
getMaxSelectorValue
(Object data) float
getMinSelectorValue
(Object data) float
getSelectorValue
(Object data) boolean
boolean
boolean
boolean
hasSelector
(Object data) boolean
void
removeOption
(Object data) void
restoreSavedOptions
(List list) void
setEnabled
(Object data, boolean enabled) Only works for options, not selectors.void
setOptionText
(String text, Object data) void
setSelectorValue
(Object data, float value) void
setShortcut
(Object data, int code, boolean ctrl, boolean alt, boolean shift, boolean putLast) Sets an alternate shortcut that works in addition to the number key.void
setStoryOptionParams
(Object data, SetStoryOption.StoryOptionParams params, StoryPointActionDelegate delegate) void
setTooltip
(Object data, String tooltipText) void
setTooltipHighlightColors
(Object data, Color... colors) void
setTooltipHighlights
(Object data, String... highlights)
-
Method Details
-
setTooltipHighlights
-
setTooltipHighlightColors
-
clearOptions
void clearOptions() -
addOption
-
addOption
-
addOption
-
setShortcut
Sets an alternate shortcut that works in addition to the number key.- Parameters:
data
-code
- constant from org.lwjgl.input.Keyboardctrl
- whether Control needs to be down to trigger this shortcut.alt
- whether Alt needs to be down to trigger this shortcut.shift
- whether Shift needs to be down to trigger this shortcut.putLast
- ignored
-
setEnabled
Only works for options, not selectors.- Parameters:
data
-enabled
-
-
setTooltip
-
addSelector
void addSelector(String text, Object data, Color color, float width, float maxValueWidth, float minValue, float maxValue, ValueDisplayMode mode, String tooltip) A user-adjustable bar useful for picking a value from a range.- Parameters:
text
- Text to show above the bar.data
- ID of the bar, used to get/set its state.color
- Bar color.width
- Width in pixels, including value label on the right.maxValueWidth
- Width of the value label on the right.minValue
- Minimum value (when bar is all the way to the left).maxValue
- Maximum value (bar all the way to the right).mode
- How to display the value - as a percentage, X/Y, etc.tooltip
- Tooltip text. Can be null.
-
hasSelector
-
setSelectorValue
-
getSelectorValue
-
getMinSelectorValue
-
getMaxSelectorValue
-
hasOptions
boolean hasOptions() -
getSavedOptionList
List getSavedOptionList() -
restoreSavedOptions
-
addOptionConfirmation
-
hasOption
-
addOptionConfirmation
-
addOptionTooltipAppender
void addOptionTooltipAppender(Object data, OptionPanelAPI.OptionTooltipCreator optionTooltipCreator) -
setOptionText
-
hasOptionTooltipAppender
-
optionHasConfirmDelegate
-
getOptionDataBeingConfirmed
Object getOptionDataBeingConfirmed() -
removeOption
-
setStoryOptionParams
void setStoryOptionParams(Object data, SetStoryOption.StoryOptionParams params, StoryPointActionDelegate delegate)
-