Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public static CreateLabel (gui: AdvancedDynamicTexture, mesh: Mesh, str: string, lines: boolean, width: string, height: string): Rectangle {
// PBR GUI
const label = new Rectangle(str);
label.background = 'black'
label.height = height;
label.alpha = 0.5;
label.width = width;
label.cornerRadius = 20;
label.thickness = 1;
label.linkOffsetY = 30;
label.top = '0%';
label.zIndex = 5;
label.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;
label.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT;
gui.addControl(label);
const text = new TextBlock();
text.text = str;
text.color = 'white';
label.addControl(text);
if (!lines) {
label.linkWithMesh(mesh);
return label;
}
var line = new Line();
line.alpha = 0.5;
line.lineWidth = 5;
{this.state.showModal === true &&
<button height="75%" width="18%" background="white" name="close-icon">
</button>
{
<button width="{0.2}" background="#FFAF00" name="button">
</button>
{this.state.model &&
}