|
@@ -699,6 +699,7 @@ var BABYLON;
|
|
|
this._zIndex = 0;
|
|
|
this._currentMeasure = GUI.Measure.Empty();
|
|
|
this._fontFamily = "Arial";
|
|
|
+ this._fontStyle = "";
|
|
|
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);
|
|
@@ -934,6 +935,20 @@ var BABYLON;
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
|
});
|
|
|
+ Object.defineProperty(Control.prototype, "fontStyle", {
|
|
|
+ get: function () {
|
|
|
+ return this._fontStyle;
|
|
|
+ },
|
|
|
+ set: function (value) {
|
|
|
+ if (this._fontStyle === value) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this._fontStyle = value;
|
|
|
+ this._fontSet = true;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
Object.defineProperty(Control.prototype, "fontSize", {
|
|
|
get: function () {
|
|
|
return this._fontSize.toString(this._host);
|
|
@@ -1484,7 +1499,7 @@ var BABYLON;
|
|
|
if (!this._font && !this._fontSet) {
|
|
|
return;
|
|
|
}
|
|
|
- this._font = this._fontSize.getValue(this._host) + "px " + this._fontFamily;
|
|
|
+ this._font = this._fontStyle + " " + this._fontSize.getValue(this._host) + "px " + this._fontFamily;
|
|
|
this._fontOffset = Control._GetFontOffset(this._font);
|
|
|
};
|
|
|
Control.prototype.dispose = function () {
|