Skip to content

Commit 0259c39

Browse files
committed
Some fixes and improvement to screen effects.
1 parent 0156564 commit 0259c39

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

core/src/main/java/oxy/bascenario/screens/ScenarioScreen.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,18 @@ public void render(float delta) {
257257

258258
this.questionSelectionRenderer.render(this);
259259

260+
if (getEffects().contains(ScreenEffect.SMOKE)) {
261+
ThinGL.renderer2D().filledRectangle(GLOBAL_RENDER_STACK, 0, 0, 1920, 1080, Color.fromRGB(0x4c413f).withAlphaF(0.6f));
262+
}
263+
if (getEffects().contains(ScreenEffect.GRAY_FILTER)) {
264+
ThinGL.renderer2D().filledRectangle(GLOBAL_RENDER_STACK, 0, 0, 1920, 1080, Color.BLACK.withAlphaF(0.3f));
265+
}
266+
260267
final Collection<ElementRenderer<?>> elements = this.elements.reversed().values();
261268
elements.stream().filter(element -> element.getLayer() == RenderLayer.BEHIND_DIALOGUE).forEach(e -> e.renderAll(this));
262269

270+
renderSmoke();
271+
263272
this.dialogueRenderer.render();
264273

265274
if (this.popup != null) {

core/src/main/java/oxy/bascenario/screens/ScreenEffectScreen.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ public void show() {
3232
this.tvNoiseEffectRenderer.init();
3333
}
3434

35+
protected void renderSmoke() {
36+
this.smokeEffectRenderer.render(effects.contains(ScreenEffect.SMOKE));
37+
}
38+
3539
@Override
3640
public void render(float delta) {
37-
this.smokeEffectRenderer.render(effects.contains(ScreenEffect.SMOKE));
3841
// Don't comment on this.
3942
if (effects.contains(ScreenEffect.GRAY_FILTER)) {
4043
ThinGL.renderer2D().coloredTexture(GLOBAL_RENDER_STACK, Base.instance().assetsManager().texture("assets/base/uis/effects/FX_TEX_GT_Circle_Blur_inv.png"), 0, 0, 1920, 1080, Color.BLACK.withAlphaF(0.4f));

0 commit comments

Comments
 (0)