From 24022f0ccc8477c2601f35d898c561ecea736906 Mon Sep 17 00:00:00 2001 From: Thijs Wenker Date: Tue, 8 Jan 2019 20:37:42 +0100 Subject: [PATCH] add missing Text properties to Create App --- .../system/assets/data/createAppTooltips.json | 18 ++++++++ scripts/system/html/js/entityProperties.js | 46 +++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/scripts/system/assets/data/createAppTooltips.json b/scripts/system/assets/data/createAppTooltips.json index 98e9088e1d..cb194c9d66 100644 --- a/scripts/system/assets/data/createAppTooltips.json +++ b/scripts/system/assets/data/createAppTooltips.json @@ -11,9 +11,15 @@ "textColor": { "tooltip": "The color of the text." }, + "textAlpha": { + "tooltip": "The alpha of the text." + }, "backgroundColor": { "tooltip": "The color of the background." }, + "backgroundAlpha": { + "tooltip": "The alpha of the background." + }, "lineHeight": { "tooltip": "The height of each line of text. This determines the size of the text." }, @@ -21,6 +27,18 @@ "tooltip": "If enabled, determines how the entity will face the camera.", "jsPropertyName": "billboardMode" }, + "topMargin": { + "tooltip": "The top margin, in meters." + }, + "rightMargin": { + "tooltip": "The right margin, in meters." + }, + "bottomMargin": { + "tooltip": "The bottom margin, in meters." + }, + "leftMargin": { + "tooltip": "The left margin, in meters." + }, "flyingAllowed": { "tooltip": "If enabled, users can fly in the zone." }, diff --git a/scripts/system/html/js/entityProperties.js b/scripts/system/html/js/entityProperties.js index a4322c0941..8b7264eeb1 100644 --- a/scripts/system/html/js/entityProperties.js +++ b/scripts/system/html/js/entityProperties.js @@ -111,11 +111,29 @@ const GROUPS = [ type: "color", propertyID: "textColor", }, + { + label: "Text Alpha", + type: "number-draggable", + min: 0, + max: 1, + step: 0.01, + decimals: 2, + propertyID: "textAlpha", + }, { label: "Background Color", type: "color", propertyID: "backgroundColor", }, + { + label: "Background Alpha", + type: "number-draggable", + min: 0, + max: 1, + step: 0.01, + decimals: 2, + propertyID: "backgroundAlpha", + }, { label: "Line Height", type: "number-draggable", @@ -132,6 +150,34 @@ const GROUPS = [ propertyID: "textBillboardMode", propertyName: "billboardMode", // actual entity property name }, + { + label: "Top Margin", + type: "number-draggable", + step: 0.01, + decimals: 2, + propertyID: "topMargin", + }, + { + label: "Right Margin", + type: "number-draggable", + step: 0.01, + decimals: 2, + propertyID: "rightMargin", + }, + { + label: "Bottom Margin", + type: "number-draggable", + step: 0.01, + decimals: 2, + propertyID: "bottomMargin", + }, + { + label: "Left Margin", + type: "number-draggable", + step: 0.01, + decimals: 2, + propertyID: "leftMargin", + }, ] }, {