瀏覽代碼

Fix issue with color not propagating correctly in GUI

David Catuhe 8 年之前
父節點
當前提交
185b09e4ec

文件差異過大導致無法顯示
+ 5336 - 5336
dist/preview release/babylon.d.ts


文件差異過大導致無法顯示
+ 5336 - 5336
dist/preview release/babylon.module.d.ts


文件差異過大導致無法顯示
+ 676 - 676
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.d.ts


文件差異過大導致無法顯示
+ 676 - 676
dist/preview release/customConfigurations/minimalGLTFViewer/babylon.module.d.ts


+ 2 - 1
dist/preview release/gui/babylon.gui.js

@@ -238,6 +238,7 @@ var BABYLON;
                 }
                 // Render
                 context.font = "18px Arial";
+                context.strokeStyle = "white";
                 var measure = new GUI.Measure(0, 0, renderWidth, renderHeight);
                 this._rootContainer._draw(measure, context);
             };
@@ -663,7 +664,7 @@ var BABYLON;
                 this._fontSize = new GUI.ValueAndUnit(18, GUI.ValueAndUnit.UNITMODE_PIXEL, false);
                 this._width = new GUI.ValueAndUnit(1, GUI.ValueAndUnit.UNITMODE_PERCENTAGE, false);
                 this._height = new GUI.ValueAndUnit(1, GUI.ValueAndUnit.UNITMODE_PERCENTAGE, false);
-                this._color = "white";
+                this._color = "";
                 this._horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;
                 this._verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;
                 this._isDirty = true;

文件差異過大導致無法顯示
+ 3 - 3
dist/preview release/gui/babylon.gui.min.js


+ 1 - 0
gui/src/advancedDynamicTexture.ts

@@ -256,6 +256,7 @@ module BABYLON.GUI {
 
             // Render
             context.font = "18px Arial";
+            context.strokeStyle = "white";
             var measure = new Measure(0, 0, renderWidth, renderHeight);
             this._rootContainer._draw(measure, context);
         }

+ 1 - 1
gui/src/controls/control.ts

@@ -15,7 +15,7 @@ module BABYLON.GUI {
         public _height = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);
         private _lastMeasuredFont: string;
         protected _fontOffset: {ascent: number, height: number, descent: number};
-        private _color = "white";
+        private _color = "";
         protected _horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_CENTER;
         protected _verticalAlignment = Control.VERTICAL_ALIGNMENT_CENTER;
         private _isDirty = true;