Make strings rendering ignore transparency (#33)

This commit is contained in:
Alexdoru authored and GitHub committed 2025-06-11 04:19:57 +02:00
1 parent 453a8f50a7
commit 490a176446
1 file changed
+7 -11
@@ -16,17 +16,13 @@ public class OverlayConfig {
public static int fontcolor;
public static float scale;
// spotless:off
public static void updateColors() {
OverlayConfig.alpha = (int) (ConfigHandler.instance()
.getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_ALPHA, 0) / 100.0f
* 256) << 24;
OverlayConfig.bgcolor = OverlayConfig.alpha
+ ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_BGCOLOR, 0);
OverlayConfig.gradient1 = OverlayConfig.alpha
+ ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_GRADIENT1, 0);
OverlayConfig.gradient2 = OverlayConfig.alpha
+ ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_GRADIENT2, 0);
OverlayConfig.fontcolor = OverlayConfig.alpha
+ ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_FONTCOLOR, 0);
alpha = (int) (ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_ALPHA, 0) / 100.0f * 256) << 24;
bgcolor = alpha + ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_BGCOLOR, 0);
gradient1 = alpha + ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_GRADIENT1, 0);
gradient2 = alpha + ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_GRADIENT2, 0);
fontcolor = ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_FONTCOLOR, 0);
}
// spotless:on
}