Browse Source

Return the base color for BitmapText.getColor() because
other things make less sense... though no answer is
exactly "right".


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7859 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

PSp..om 14 years ago
parent
commit
dd5d56ab42

+ 1 - 1
engine/src/core/com/jme3/font/BitmapText.java

@@ -133,7 +133,7 @@ public class BitmapText extends Node {
      * @return color of the text
      */
     public ColorRGBA getColor() {
-        return block.getColor();
+        return letters.getBaseColor();
     }
 
     /**

+ 4 - 0
engine/src/core/com/jme3/font/Letters.java

@@ -311,6 +311,10 @@ class Letters {
         setColor( 0, block.getText().length(), color );
     }
 
+    ColorRGBA getBaseColor() {
+        return baseColor;
+    }
+
     /**
      * @param start start index to set style. inclusive.
      * @param end   end index to set style. EXCLUSIVE.