From 4bf820268ea84dc7f9a840dac4c91d0cbb92f1aa Mon Sep 17 00:00:00 2001 From: yugecin Date: Sun, 28 May 2017 16:30:32 +0200 Subject: [PATCH] option menu: draw non-active section header slightly transparent --- src/yugecin/opsudance/ui/OptionsOverlay.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/yugecin/opsudance/ui/OptionsOverlay.java b/src/yugecin/opsudance/ui/OptionsOverlay.java index c6f9698d..54c4eb1b 100644 --- a/src/yugecin/opsudance/ui/OptionsOverlay.java +++ b/src/yugecin/opsudance/ui/OptionsOverlay.java @@ -401,9 +401,14 @@ public class OptionsOverlay extends OverlayOpsuState { } int lineStartY = (int) (y + Fonts.LARGE.getLineHeight() * 0.6f); if (section.options == null) { + float previousAlpha = COL_CYAN.a; + if (section != activeSection) { + COL_CYAN.a *= 0.2f; + } FontUtil.drawRightAligned(Fonts.XLARGE, width, -paddingRight, (int) (y + Fonts.XLARGE.getLineHeight() * 0.3f), section.name.toUpperCase(), COL_CYAN); + COL_CYAN.a = previousAlpha; } else { Fonts.MEDIUMBOLD.drawString(paddingTextLeft, lineStartY, section.name, COL_WHITE); }