1package com.fs.starfarer.api.impl.campaign.eventide;
6import org.lwjgl.opengl.GL11;
8import com.fs.starfarer.api.campaign.BaseCustomUIPanelPlugin;
9import com.fs.starfarer.api.campaign.CustomVisualDialogDelegate.DialogCallbacks;
10import com.fs.starfarer.api.campaign.InteractionDialogAPI;
11import com.fs.starfarer.api.input.InputEventAPI;
12import com.fs.starfarer.api.ui.CustomPanelAPI;
13import com.fs.starfarer.api.ui.LabelAPI;
14import com.fs.starfarer.api.ui.PositionAPI;
15import com.fs.starfarer.api.ui.TooltipMakerAPI;
16import com.fs.starfarer.api.util.FaderUtil;
17import com.fs.starfarer.api.util.Misc;
21 public static enum TutStage {
29 private static TutStage [] vals = values();
30 public TutStage next() {
31 int index = this.ordinal() + 1;
32 if (index >= vals.length) index = vals.length - 1;
42 protected TutStage
curr =
null;
60 if (
curr == TutStage.LEAVE)
return;
70 if (
curr == TutStage.MOVE_FORWARD) {
71 info.
addPara(
"Press RIGHT to move forward.", 0f, h,
"RIGHT");
72 }
else if (
curr == TutStage.MOVE_BACK) {
73 info.
addPara(
"Press LEFT to move backwards.", 0f, h,
"LEFT");
74 }
else if (
curr == TutStage.ATTACK) {
75 info.
addPara(
"Press SPACE to attack.", 0f, h,
"SPACE");
76 }
else if (
curr == TutStage.BLOCK) {
78 +
"A skilled fighter can also execute a quick attack, or a \"riposte\", by attacking immediately after deflecting their opponent's attack.", 0f, h,
"UP");
81 }
else if (
curr == TutStage.LEAVE) {
82 info.
addPara(
"Your health is in the top left of the screen.\n\n"
83 +
"Make a few practice moves, then press ESCAPE to continue.", 0f, h,
"ESCAPE");
91 boolean triggered =
false;
119 if (
p ==
null)
return;
127 GL11.glDisable(GL11.GL_TEXTURE_2D);
128 GL11.glEnable(GL11.GL_BLEND);
129 GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
141 Misc.
renderQuad(x + 1, y + 1, w - 2, h - 2, Color.black, a * 0.67f);
143 GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
149 if (
p ==
null)
return;
161 if (
p ==
null)
return;
static final String MOVE_BACK
static final String BLOCK
static final String MOVE_FORWARD
static final String ATTACK
void positionChanged(PositionAPI position)
void processInput(List< InputEventAPI > events)
CustomPanelAPI getPanel()
void init(CustomPanelAPI panel, DialogCallbacks callbacks, InteractionDialogAPI dialog)
PositionAPI getPosition()
void render(float alphaMult)
void advance(float amount)
void reportAction(String actionId)
void renderBelow(float alphaMult)
DialogCallbacks callbacks
InteractionDialogAPI dialog
void advance(float amount)
static Color getStoryOptionColor()
static void renderQuad(float x, float y, float width, float height, Color color, float alphaMult)
static Color getBasePlayerColor()
static Color getBrightPlayerColor()
static Color getHighlightColor()
TooltipMakerAPI createUIElement(float width, float height, boolean withScroller)
PositionAPI addUIElement(TooltipMakerAPI element)
void setHighlight(int start, int end)
void setHighlightColors(Color ... colors)
PositionAPI inTL(float xPad, float yPad)
void removeComponent(UIComponentAPI component)