Skip to content

Commit f4a4dfe

Browse files
committed
Fix some broken stuff.
1 parent d36f577 commit f4a4dfe

2 files changed

Lines changed: 35 additions & 0 deletions

File tree

core/src/main/java/oxy/bascenario/screens/renderer/dialogue/QuestionSelectionRenderer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ public void setValues(FontType type, String question, List<ShowQuestionSelection
4343
this.type = type;
4444
this.question = question;
4545

46+
this.flipped = false;
47+
this.releasedalready = false;
48+
4649
if (this.answers != null) {
4750
this.offset = AnimationUtils.build(400, -420, -86, EasingFunction.SINE);
4851
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package scenario;
2+
3+
import oxy.bascenario.api.Scenario;
4+
import oxy.bascenario.api.event.ShowButtonsEvent;
5+
import oxy.bascenario.api.event.background.SetBackgroundEvent;
6+
import oxy.bascenario.api.event.dialogue.ShowOptionsEvent;
7+
import oxy.bascenario.api.event.dialogue.ShowQuestionSelectionEvent;
8+
import oxy.bascenario.api.render.elements.text.font.FontType;
9+
import oxy.bascenario.api.utils.FileInfo;
10+
import oxy.bascenario.screens.ScenarioScreen;
11+
import oxy.bascenario.utils.Launcher;
12+
13+
import java.util.List;
14+
import java.util.Map;
15+
16+
public class ShowAnswerTest {
17+
public static void main(String[] args) {
18+
final Scenario.Builder scenario = new Scenario.Builder();
19+
scenario.add(0, new SetBackgroundEvent(FileInfo.internal("BG_ShoppingMall.jpg"), 0), new ShowButtonsEvent(true));
20+
21+
scenario.add(true, 0, new ShowQuestionSelectionEvent(FontType.NotoSans,
22+
"How is this a question?",
23+
List.of(
24+
new ShowQuestionSelectionEvent.Answer(0, "Why not?", false),
25+
new ShowQuestionSelectionEvent.Answer(0, "Why yes?", false),
26+
new ShowQuestionSelectionEvent.Answer(0, "Why why?", false)
27+
))
28+
);
29+
30+
Launcher.launch(new ScenarioScreen(scenario.build()), false);
31+
}
32+
}

0 commit comments

Comments
 (0)