|
@@ -7,6 +7,8 @@ import { LineContainerComponent } from "../../../lineContainerComponent";
|
|
import { TextInputLineComponent } from "../../../lines/textInputLineComponent";
|
|
import { TextInputLineComponent } from "../../../lines/textInputLineComponent";
|
|
import { LockObject } from "../lockObject";
|
|
import { LockObject } from "../lockObject";
|
|
import { OptionsLineComponent } from "../../../lines/optionsLineComponent";
|
|
import { OptionsLineComponent } from "../../../lines/optionsLineComponent";
|
|
|
|
+import { CheckBoxLineComponent } from "../../../lines/checkBoxLineComponent";
|
|
|
|
+import { FloatLineComponent } from "../../../lines/floatLineComponent";
|
|
|
|
|
|
interface ITextBlockPropertyGridComponentProps {
|
|
interface ITextBlockPropertyGridComponentProps {
|
|
textBlock: TextBlock,
|
|
textBlock: TextBlock,
|
|
@@ -34,6 +36,12 @@ export class TextBlockPropertyGridComponent extends React.Component<ITextBlockPr
|
|
{ label: "Center", value: BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER },
|
|
{ label: "Center", value: BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER },
|
|
];
|
|
];
|
|
|
|
|
|
|
|
+ var wrappingOptions = [
|
|
|
|
+ { label: "Clip", value: BABYLON.GUI.TextWrapping.Clip },
|
|
|
|
+ { label: "Ellipsis", value: BABYLON.GUI.TextWrapping.Ellipsis },
|
|
|
|
+ { label: "Word wrap", value: BABYLON.GUI.TextWrapping.WordWrap },
|
|
|
|
+ ];
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<div className="pane">
|
|
<div className="pane">
|
|
<CommonControlPropertyGridComponent lockObject={this.props.lockObject} control={textBlock} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
<CommonControlPropertyGridComponent lockObject={this.props.lockObject} control={textBlock} onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
@@ -41,6 +49,13 @@ export class TextBlockPropertyGridComponent extends React.Component<ITextBlockPr
|
|
<TextInputLineComponent lockObject={this.props.lockObject} label="Text" target={textBlock} propertyName="text" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
<TextInputLineComponent lockObject={this.props.lockObject} label="Text" target={textBlock} propertyName="text" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
<OptionsLineComponent label="Horizontal text alignment" options={horizontalOptions} target={textBlock} propertyName="textHorizontalAlignment" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
<OptionsLineComponent label="Horizontal text alignment" options={horizontalOptions} target={textBlock} propertyName="textHorizontalAlignment" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
<OptionsLineComponent label="Vertical text alignment" options={verticalOptions} target={textBlock} propertyName="textVerticalAlignment" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
<OptionsLineComponent label="Vertical text alignment" options={verticalOptions} target={textBlock} propertyName="textVerticalAlignment" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
|
|
+ <CheckBoxLineComponent label="Resize to fit" target={textBlock} propertyName="resizeToFit" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
|
|
+ <OptionsLineComponent label="Wrapping" options={wrappingOptions} target={textBlock} propertyName="textWrapping" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
|
|
+ <TextInputLineComponent lockObject={this.props.lockObject} label="Line spacing" target={textBlock} propertyName="lineSpacing" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
|
|
+ </LineContainerComponent>
|
|
|
|
+ <LineContainerComponent title="OUTLINE">
|
|
|
|
+ <FloatLineComponent lockObject={this.props.lockObject} label="Outline width" target={textBlock} propertyName="outlineWidth" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
|
|
+ <TextInputLineComponent lockObject={this.props.lockObject} label="Outline color" target={textBlock} propertyName="outlineColor" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
|
|
</LineContainerComponent>
|
|
</LineContainerComponent>
|
|
</div>
|
|
</div>
|
|
);
|
|
);
|