From ce004fa9e439e4c7fb2cc1378df71ebadd218b79 Mon Sep 17 00:00:00 2001 From: "nathan.sweet" Date: Sun, 30 Oct 2011 23:33:31 +0000 Subject: [PATCH] [fixed] Window not respecting actor color, issue 548. --- gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Window.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Window.java b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Window.java index 2b556422ff6..b13eb579465 100644 --- a/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Window.java +++ b/gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Window.java @@ -153,6 +153,8 @@ public void draw (SpriteBatch batch, float parentAlpha) { batch.setColor(color.r, color.g, color.b, color.a * parentAlpha); backgroundPatch.draw(batch, 0, 0, width, height); float textY = height - (int)(backgroundPatch.getTopHeight() / 2) + (int)(textBounds.height / 2); + titleFont.setColor(color.r * titleFontColor.r, color.g * titleFontColor.g, color.b * titleFontColor.b, color.a + * parentAlpha * titleFontColor.a); titleFont.setColor(titleFontColor.r, titleFontColor.g, titleFontColor.b, titleFontColor.a * parentAlpha); titleFont.drawMultiLine(batch, title, (int)(width / 2), textY, 0, HAlignment.CENTER); batch.flush();