Update JSON UI Schema (#357)

* Add permutations description

* Adjust grammar

* Update description of "num_mip_levels"

* Update "atlas_tile" and "blend_frames" property

Some properties had completely incorrect titles as well, those were fixed in this commit too.

* Update JSON UI schema

* Update item schema

* Update terrain_texture schema

* Update animations schema

* Update go_home.json

* Update textures schemas

* Update bindings schema

* Add some missing JSON UI from vanilla controls

And modify some that incorrectly make vanilla JSON UI wrong.

* Update modifications property

Modifications now understand the difference between element and array operations, and requires different things for different operations.

* Update vec2 equation definition

Made the regex pattern much more robust and able to handle niche units like %sm, as well as the add and subtract operators

* Add to enums

There were several enum values that were valid in the vanilla JSON UI but not listed in the schemas. This has now been amended.

* Add new general types

Animation and texture file path types

* Add a few missing vanilla properties

At this point pretty much the only thing left to do is add all of the rest of the vanilla properties, there are  196 "problems" left in the vanilla JSON UI in the 1.21.80.3 Minecraft version and 189 of which are missing properties. That is not to say there are 189 properties to add, there are only 65 that are missing. Those missing properties are, in order of most to least commonly referenced in the vanilla JSON UI files from the vanilla 1.21.80.3 Minecraft resource pack:

[
  {
    "propertyName": "use_selected_skin",
    "count": 16
  },
  {
    "propertyName": "clip_state_change_event",
    "count": 14
  },
  {
    "propertyName": "gesture_tracking_button",
    "count": 11
  },
  {
    "propertyName": "use_priority",
    "count": 11
  },
  {
    "propertyName": "rotation",
    "count": 9
  },
  {
    "propertyName": "use_skin_gui_scale",
    "count": 9
  },
  {
    "propertyName": "always_handle_controller_direction",
    "count": 7
  },
  {
    "propertyName": "starting_rotation",
    "count": 7
  },
  {
    "propertyName": "focus_container_custom_left",
    "count": 7
  },
  {
    "propertyName": "text_tts",
    "count": 6
  },
  {
    "propertyName": "enable_scissor_test",
    "count": 6
  },
  {
    "propertyName": "tts_skip_message",
    "count": 5
  },
  {
    "propertyName": "should_be_skipped_during_automation",
    "count": 4
  },
  {
    "propertyName": "notify_on_ellipses",
    "count": 4
  },
  {
    "propertyName": "tiled_scale",
    "count": 3
  },
  {
    "propertyName": "debug",
    "count": 3
  },
  {
    "propertyName": "tts_play_on_unchanged_focus_control",
    "count": 3
  },
  {
    "propertyName": "focus_container_custom_right",
    "count": 3
  },
  {
    "propertyName": "always_accepts_input",
    "count": 2
  },
  {
    "propertyName": "use_player_paperdoll",
    "count": 2
  },
  {
    "propertyName": "reset_event",
    "count": 2
  },
  {
    "propertyName": "size",
    "count": 2
  },
  {
    "propertyName": "consume_event",
    "count": 2
  },
  {
    "propertyName": "inner_radius",
    "count": 2
  },
  {
    "propertyName": "outer_radius",
    "count": 2
  },
  {
    "propertyName": "state_controls",
    "count": 2
  },
  {
    "propertyName": "resettable",
    "count": 2
  },
  {
    "propertyName": "focus_container_custom_up",
    "count": 2
  },
  {
    "propertyName": "inline_modal",
    "count": 2
  },
  {
    "propertyName": "rotation_x",
    "count": 2
  },
  {
    "propertyName": "rotation_y",
    "count": 2
  },
  {
    "propertyName": "activated",
    "count": 2
  },
  {
    "propertyName": "always_listening",
    "count": 1
  },
  {
    "propertyName": "grid_fill_direction",
    "count": 1
  },
  {
    "propertyName": "end_event",
    "count": 1
  },
  {
    "propertyName": "text_color",
    "count": 1
  },
  {
    "propertyName": "background_color",
    "count": 1
  },
  {
    "propertyName": "load_screen_immediately",
    "count": 1
  },
  {
    "propertyName": "gamepad_cursor_deflection_mode",
    "count": 1
  },
  {
    "propertyName": "renderer_properties",
    "count": 1
  },
  {
    "propertyName": "color_corrected",
    "count": 1
  },
  {
    "propertyName": "notify_ellipses_sibling",
    "count": 1
  },
  {
    "propertyName": "target_cycler_to_compare",
    "count": 1
  },
  {
    "propertyName": "grid_item_when_current",
    "count": 1
  },
  {
    "propertyName": "grid_item_when_not_current",
    "count": 1
  },
  {
    "propertyName": "cycler_manager_size_control_target",
    "count": 1
  },
  {
    "propertyName": "slice_count",
    "count": 1
  },
  {
    "propertyName": "select_button_name",
    "count": 1
  },
  {
    "propertyName": "hover_button_name",
    "count": 1
  },
  {
    "propertyName": "analog_button_name",
    "count": 1
  },
  {
    "propertyName": "iterate_left_button_name",
    "count": 1
  },
  {
    "propertyName": "iterate_right_button_name",
    "count": 1
  },
  {
    "propertyName": "initial_button_slice",
    "count": 1
  },
  {
    "propertyName": "gamepad_deflection_mode",
    "count": 1
  },
  {
    "propertyName": "looping",
    "count": 1
  },
  {
    "propertyName": "wait_until_rendered_to_play",
    "count": 1
  },
  {
    "propertyName": "clip_ratio",
    "count": 1
  },
  {
    "propertyName": "grayscale",
    "count": 1
  },
  {
    "propertyName": "tts_skip_children",
    "count": 1
  },
  {
    "propertyName": "$main_content_fo",
    "count": 1
  },
  {
    "propertyName": "selected",
    "count": 1
  },
  {
    "propertyName": "can_be_deselected",
    "count": 1
  },
  {
    "propertyName": "ignoreCollectionItem",
    "count": 1
  },
  {
    "propertyName": "factory_variables",
    "count": 1
  },
  {
    "propertyName": "start_event",
    "count": 1
  }
]

* Fix PR Error

Until issue https://github.com/Blockception/Minecraft-bedrock-json-schemas/issues/358 is resolved $refs may not refer to JSON definitions of other files.
This commit is contained in:
BrodBlox09
2025-06-29 20:03:09 +02:00
committed by GitHub
parent 4e6f730320
commit 108d85e9ee
31 changed files with 290 additions and 128 deletions

View File

@@ -3,7 +3,7 @@
"description": "Global variables that can be used in any JSON file.", "description": "Global variables that can be used in any JSON file.",
"type": "object", "type": "object",
"propertyNames": { "propertyNames": {
"pattern": "^\\$[a-zA-Z0-9_]+$" "pattern": "^\\$[a-zA-Z0-9_-]+$"
}, },
"additionalProperties": { "additionalProperties": {
"title": "Global Variable", "title": "Global Variable",

View File

@@ -2,15 +2,11 @@
"$schema": "http://json-schema.org/draft-07/schema", "$schema": "http://json-schema.org/draft-07/schema",
"title": "Bindings", "title": "Bindings",
"description": "The bindings that are contained within this element.", "description": "The bindings that are contained within this element.",
"anyOf": [ "definitions": {
{ "binding": {
"$ref": "../../general/item_ref.json"
},
{
"type": "array",
"items": {
"type": "object", "type": "object",
"title": "Bindings", "title": "Binding",
"description": "A binding that is contained within this element.",
"additionalProperties": false, "additionalProperties": false,
"properties": { "properties": {
"binding_collection_name": { "binding_collection_name": {
@@ -28,10 +24,10 @@
"description": "The condition that must be met for the binding to be applied.", "description": "The condition that must be met for the binding to be applied.",
"anyOf": [ "anyOf": [
{ {
"enum": ["once", "always", "always_when_visible", "visible"] "enum": ["once", "always", "always_when_visible", "visible", "visibility_changed", "none"]
}, },
{ {
"$ref": "../../general/item_ref.json" "$ref": "../../general/variable.json"
} }
] ]
}, },
@@ -83,8 +79,34 @@
"description": "The name of the property that the binding is in.", "description": "The name of the property that the binding is in.",
"$ref": "../../general/string.json" "$ref": "../../general/string.json"
} }
},
"if": {
"required": ["binding_type"],
"properties": {
"binding_type": {
"const": "view"
} }
} }
},
"then": {
"required": ["source_property_name", "target_property_name"]
}
}
},
"anyOf": [
{
"$ref": "../../general/item_ref.json"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/binding"
}
},
{
"$ref": "#/definitions/binding",
"title": "Binding",
"description": "The binding that is contained within this element."
} }
] ]
} }

View File

@@ -0,0 +1,5 @@
{
"title": "Camera Tilt Degrees",
"description": "The degrees the camera is tilted for a paper doll renderer.",
"$ref": "../../general/integer.json"
}

View File

@@ -0,0 +1,4 @@
{
"title": "Constrain To Rect",
"$ref": "../../general/boolean.json"
}

View File

@@ -1,12 +1,6 @@
{ {
"title": "Destroy At End", "title": "Destroy At End",
"description": "If true, the element will be destroyed at the end of the animation.", "description": "If set, the given element will be destroyed at the end of the animation.",
"anyOf": [ "$ref": "../../general/item_ref.json",
{ "examples": ["popup", "details_bubble_control", "bundle_mode_popup_control", "selected_item_details"]
"enum": ["popup", "details_bubble_control", "bundle_mode_popup_control", "selected_item_details"]
},
{
"$ref": "../../general/variable.json"
}
]
} }

View File

@@ -39,6 +39,10 @@
"title": "Name", "title": "Name",
"description": "The name of the factory.", "description": "The name of the factory.",
"type": "string" "type": "string"
},
"max_children_size": {
"title": "Max Children Size",
"$ref": "../../general/integer.json"
} }
} }
}, },

View File

@@ -0,0 +1,18 @@
{
"title": "Focus Mapping",
"description": "If true, the element will be focus magnet enabled.",
"$comment": "The only place this is used in vanilla is in beacon_screen.json and it doesn't give much information",
"type": "array",
"items": {
"type": "object",
"properties": {
"focus_identifier": {
"$ref": "../../general/string.json"
},
"focus_change_right": {
"$ref": "../../general/string.json",
"examples": ["FOCUS_OVERRIDE_STOP"]
}
}
}
}

View File

@@ -3,7 +3,7 @@
"description": "The type of the font.", "description": "The type of the font.",
"anyOf": [ "anyOf": [
{ {
"enum": ["smooth", "MinecraftTen", "MinecraftTenEmoticon"] "enum": ["smooth", "MinecraftTen", "MinecraftTenEmoticon", "rune", "default"]
}, },
{ {
"$ref": "../../general/variable.json" "$ref": "../../general/variable.json"

View File

@@ -1,5 +1,6 @@
{ {
"title": "FPS", "title": "FPS",
"description": "The FPS of the animation.", "description": "The FPS of the animation.",
"$ref": "../../general/integer.json" "$ref": "../../general/number.json",
"multipleOf": 1
} }

View File

@@ -8,7 +8,21 @@
{ {
"type": "array", "type": "array",
"items": { "items": {
"oneOf": [
{
"$ref": "../../general/item_ref.json" "$ref": "../../general/item_ref.json"
},
{
"title": "Texture",
"type": "object",
"properties": {
"texture_path": {
"title": "Texture Path",
"$ref": "../../general/texture_file_path.json"
}
}
}
]
} }
} }
] ]

View File

@@ -0,0 +1,4 @@
{
"title": "Line Padding",
"$ref": "../../general/number.json"
}

View File

@@ -3,7 +3,7 @@
"description": "The control that will be pressed.", "description": "The control that will be pressed.",
"anyOf": [ "anyOf": [
{ {
"enum": ["hover", "pressed"] "enum": ["hover", "pressed", ""]
}, },
{ {
"$ref": "../../general/item_ref.json" "$ref": "../../general/item_ref.json"

View File

@@ -0,0 +1,4 @@
{
"title": "Priority",
"$ref": "../../general/integer.json"
}

View File

@@ -3,10 +3,34 @@
"description": "The renderer that will be used by the element.", "description": "The renderer that will be used by the element.",
"anyOf": [ "anyOf": [
{ {
"enum": ["ui_holo_cursor"] "enum": [
"ui_holo_cursor",
"gradient_renderer",
"inventory_item_renderer",
"equipment_preview_renderer",
"trial_time_renderer",
"3d_structure_renderer",
"splash_text_renderer",
"paper_doll_renderer",
"profile_image_renderer",
"qr_code_renderer",
"name_tag_renderer",
"progress_bar_renderer",
"actor_portrait_renderer",
"banner_pattern_renderer",
"live_horse_renderer",
"holographic_postrenderer",
"panorama_renderer",
"bundle_tooltip_renderer",
"credits_renderer",
"vignette_renderer",
"debug_screen_renderer",
"enchanting_book_renderer",
"web_view_renderer"
]
}, },
{ {
"$ref": "../../general/item_ref.json" "$ref": "../../general/variable.json"
} }
] ]
} }

View File

@@ -4,8 +4,7 @@
"anyOf": [ "anyOf": [
{ {
"type": "number", "type": "number",
"minimum": 0, "minimum": 0
"maximum": 1
}, },
{ {
"$ref": "../../general/item_ref.json" "$ref": "../../general/item_ref.json"

View File

@@ -3,9 +3,7 @@
"description": "The texture to display.", "description": "The texture to display.",
"anyOf": [ "anyOf": [
{ {
"type": "string", "$ref": "../../general/texture_file_path.json"
"pattern": "^textures/[a-zA-Z0-9/_-]+$",
"examples": ["textures/ui/file"]
}, },
{ {
"$ref": "../../general/item_ref.json" "$ref": "../../general/item_ref.json"

View File

@@ -1,5 +1,12 @@
{ {
"title": "Toggle Group Default Selected", "title": "Toggle Group Default Selected",
"description": "The default selected toggle of the toggle group.", "description": "The default selected toggle of the toggle group.",
"anyOf": [
{
"$ref": "../../general/string.json" "$ref": "../../general/string.json"
},
{
"$ref": "../../general/integer.json"
}
]
} }

View File

@@ -1,5 +1,12 @@
{ {
"title": "TTS Ignore Count", "title": "TTS Ignore Count",
"description": "The number of TTS ignores.", "description": "The number of TTS ignores.",
"anyOf": [
{
"$ref": "../../../general/integer.json" "$ref": "../../../general/integer.json"
},
{
"$ref": "../../../general/boolean.json"
}
]
} }

View File

@@ -1,5 +1,8 @@
{ {
"title": "TTS Override Control Value", "title": "TTS Override Control Value",
"description": "If true, the TTS will override the control value.", "description": "If true, the TTS will override the control value.",
"$ref": "../../../general/boolean.json" "anyOf": [
{ "$ref": "../../../general/boolean.json" },
{ "$ref": "../../../general/string.json" }
]
} }

View File

@@ -6,10 +6,12 @@
"always_rotate", "always_rotate",
"button", "button",
"carousel_label", "carousel_label",
"collection_panel",
"custom", "custom",
"dropdown", "dropdown",
"edit_box", "edit_box",
"grid", "grid",
"grid_page_indicator",
"image_cycler", "image_cycler",
"image", "image",
"input_panel", "input_panel",
@@ -20,6 +22,7 @@
"scroll_track", "scroll_track",
"scroll_view", "scroll_view",
"scrollbar_box", "scrollbar_box",
"selection_wheel",
"slider_box", "slider_box",
"slider", "slider",
"stack_panel", "stack_panel",

View File

@@ -0,0 +1,4 @@
{
"title": "Use Custom Pocket Toast",
"$ref": "../../general/boolean.json"
}

View File

@@ -2,5 +2,5 @@
"title": "Anchor", "title": "Anchor",
"description": "An anchor is a reference to an element in the UI.", "description": "An anchor is a reference to an element in the UI.",
"type": "string", "type": "string",
"enum": ["bottom", "bottom_left", "bottom_right", "bottom_middle", "center", "left", "left_middle", "right", "right_middle", "top", "top_left", "top_right", "top_middle"] "enum": ["bottom", "bottom_left", "bottom_right", "bottom_middle", "center", "center_middle", "left", "left_middle", "right", "right_middle", "top", "top_left", "top_right", "top_middle"]
} }

View File

@@ -0,0 +1,8 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "Animation Reference",
"description": "A reference to an animation element using the following syntax: [animation_name]@[namespace_reference].[animation_name_reference]",
"type": "string",
"examples": ["button@minecraft", "button@minecraft.ui"],
"pattern": "^[a-zA-Z0-9_]*@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)?$"
}

View File

@@ -9,29 +9,33 @@
"oneOf": [ "oneOf": [
{ {
"type": "string", "type": "string",
"description": "A variable", "description": "A color animation.",
"$ref": "./item_ref.json" "$ref": "./animation_reference.json"
},
{
"type": "string",
"description": "A color variable.",
"$ref": "./variable.json"
},
{
"type": "string",
"description": "A predefined color name.",
"enum": [ "black", "white" ]
}, },
{ {
"type": "array", "type": "array",
"description": "A size with width and height.", "description": "An RGB color definition.",
"items": [ "items": [
{ {
"title": "Red", "title": "Red",
"type": "string",
"description": "A variable",
"$ref": "#/definitions/color_item" "$ref": "#/definitions/color_item"
}, },
{ {
"title": "Green", "title": "Green",
"type": "string",
"description": "A variable",
"$ref": "#/definitions/color_item" "$ref": "#/definitions/color_item"
}, },
{ {
"title": "Blue", "title": "Blue",
"type": "string",
"description": "A variable",
"$ref": "#/definitions/color_item" "$ref": "#/definitions/color_item"
} }
] ]

View File

@@ -2,34 +2,23 @@
"$schema": "http://json-schema.org/draft-07/schema", "$schema": "http://json-schema.org/draft-07/schema",
"anyOf": [ "anyOf": [
{ {
"title": "Element reference", "title": "Element Reference",
"description": "A reference to an element: using the following syntax: [element_name]@[namespace_reference].[element_name_reference]", "description": "A reference to an element using the following syntax: [element_name]@[namespace_reference].[element_name_reference]",
"type": "string", "type": "string",
"examples": ["button@minecraft", "button@minecraft.ui"], "examples": ["button@minecraft", "button@minecraft.ui"],
"pattern": "^[a-zA-Z0-9_]*@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)?$" "pattern": "^[a-zA-Z0-9_]*@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)?$"
}, },
{ {
"title": "Element reference", "title": "Element Reference",
"description": "A reference to an element: using the following syntax: [namespace_reference].[element_name_reference]", "description": "A reference to an element using the following syntax: [namespace_reference].[element_name_reference]",
"type": "string", "type": "string",
"examples": ["button@minecraft", "button@minecraft.ui"], "examples": ["button@minecraft", "button@minecraft.ui"],
"pattern": "[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)?$" "pattern": "^[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)?$"
}, },
{ {
"title": "Variable reference", "title": "Variable Reference",
"description": "A variable is a reference to a value that can be used in the UI.", "description": "A variable is a reference to a value that can be used in the UI.",
"type": "string", "$ref": "./variable.json"
"anyOf": [
{
"pattern": "^\\$[a-zA-Z0-9_]+$"
},
{
"pattern": "^#[a-zA-Z0-9_]+$"
},
{
"pattern": "^\\(.*\\)$"
}
]
} }
] ]
} }

View File

@@ -2,5 +2,5 @@
"title": "Navigation Mode", "title": "Navigation Mode",
"description": "The navigation mode of the UI.", "description": "The navigation mode of the UI.",
"type": "string", "type": "string",
"enum": ["contained", "stop"] "enum": ["contained", "stop", ""]
} }

View File

@@ -1,49 +1,5 @@
{ {
"title": "Size", "title": "Size",
"description": "The size of the element.", "description": "The size of the element.",
"definitions": { "$ref": "./vec2.json"
"size_coord": {
"title": "Size Coord",
"description": "A size coordinate.",
"oneOf": [
{
"type": "string",
"enum": ["default", "fill"]
},
{
"type": "string",
"pattern": "^[0-9]+(px|%)$"
},
{
"type": "integer",
"minimum": 0
}
],
"examples": ["default", "fill", "100px", "100%", "100% - 2px"]
}
},
"oneOf": [
{
"type": "string",
"description": "A variable",
"$ref": "./item_ref.json"
},
{
"type": "array",
"description": "A size with width and height.",
"items": [
{
"title": "Width",
"description": "A variable",
"$ref": "#/definitions/size_coord"
},
{
"title": "Height",
"description": "A variable",
"$ref": "#/definitions/size_coord"
}
]
}
],
"examples": ["default", "fill", ["100%", "100%"]]
} }

View File

@@ -0,0 +1,6 @@
{
"title": "Texture File Path",
"type": "string",
"pattern": "^textures\/[a-zA-Z0-9/_.-]+$",
"examples": ["textures/ui/file"]
}

View File

@@ -5,7 +5,7 @@
"anyOf": [ "anyOf": [
{ {
"type": "string", "type": "string",
"pattern": "^\\$[a-zA-Z0-9_]+$" "pattern": "^\\$[a-zA-Z0-9_-]+$"
}, },
{ {
"type": "string", "type": "string",

View File

@@ -4,15 +4,11 @@
"oneOf": [ "oneOf": [
{ {
"type": "string", "type": "string",
"enum": ["default", "fill"] "pattern": "^( *[+-]? *([0-9]+(\\.[0-9]+)? ?(px|%([cxy]|cm|sm)?)|default|fill))+$",
"$comment": "Equation with units"
}, },
{ {
"type": "string", "type": "number"
"pattern": "^[0-9]+(px|%)$"
},
{
"type": "integer",
"minimum": 0
} }
], ],
"examples": ["default", "fill", "100px", "100%", "100% - 2px"] "examples": ["default", "fill", "100px", "100%", "100% - 2px"]
@@ -30,14 +26,10 @@
"items": [ "items": [
{ {
"title": "Width", "title": "Width",
"type": "string",
"description": "A variable",
"$ref": "#/definitions/size_coord" "$ref": "#/definitions/size_coord"
}, },
{ {
"title": "Height", "title": "Height",
"type": "string",
"description": "A variable",
"$ref": "#/definitions/size_coord" "$ref": "#/definitions/size_coord"
} }
] ]

View File

@@ -15,7 +15,6 @@
"title": "Animation", "title": "Animation",
"description": "An animation is a set of keyframes that can be applied to an element.", "description": "An animation is a set of keyframes that can be applied to an element.",
"additionalProperties": false, "additionalProperties": false,
"required": ["anim_type"],
"patternProperties": { "patternProperties": {
"^\\$.*": { "^\\$.*": {
"$ref": "./general/variables.json" "$ref": "./general/variables.json"
@@ -82,15 +81,83 @@
"description": "Modifications to the element.", "description": "Modifications to the element.",
"type": "array", "type": "array",
"items": { "items": {
"title": "Modification",
"type": "object", "type": "object",
"additionalProperties": false,
"oneOf": [
{
"title": "Control Modification",
"required": ["control_name", "operation"],
"properties": {
"operation": {
"enum": ["remove", "replace", "swap", "move_back", "move_front", "move_after", "move_before", "insert_before", "insert_after"]
}
},
"oneOf": [
{
"properties": {
"control_name": {},
"operation": {
"enum": ["remove", "move_back", "move_front"]
}
}
},
{
"required": ["control_name", "operation", "value"],
"properties": {
"control_name": {},
"operation": {
"enum": ["replace", "swap", "move_after", "move_before", "insert_before", "insert_after"]
},
"value": {
"anyOf": [
{
"type": "array",
"description": "A control array.",
"items": {
"title": "Control",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/grouped-ui"
}
}
},
{
"title": "Control",
"description": "A control.",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/grouped-ui"
}
},
{
"$ref": "./general/item_ref.json"
}
]
}
}
}
]
},
{
"title": "Array Modification",
"required": ["array_name", "operation", "value"],
"properties": {
"operation": {
"enum": ["insert_front", "insert_back"]
}
}
}
],
"properties": { "properties": {
"control_name": { "control_name": {
"title": "Control Name", "title": "Control Name",
"description": "The control to apply the operation to.",
"type": "string" "type": "string"
}, },
"array_name": { "array_name": {
"title": "Array Name", "title": "Array Name",
"type": "string", "description": "The array to apply the operation to.",
"enum": ["bindings", "controls"] "enum": ["bindings", "controls"]
}, },
"operation": { "operation": {
@@ -105,20 +172,30 @@
}, },
"value": { "value": {
"oneOf": [ "oneOf": [
{ "$ref": "./elements/properties/bindings.json" },
{ {
"title": "Controls", "$ref": "./elements/properties/bindings.json"
"description": "The controls to add.", },
{
"anyOf": [ "anyOf": [
{ {
"type": "array", "type": "array",
"description": "A control array.",
"items": { "items": {
"title": "Control",
"type": "object",
"additionalProperties": { "additionalProperties": {
"title": "Sub Element",
"$ref": "#/definitions/grouped-ui" "$ref": "#/definitions/grouped-ui"
} }
} }
}, },
{
"title": "Control",
"description": "A control.",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/grouped-ui"
}
},
{ {
"$ref": "./general/item_ref.json" "$ref": "./general/item_ref.json"
} }
@@ -141,6 +218,7 @@
"anchor_from": { "$ref": "./elements/properties/anchor_from.json" }, "anchor_from": { "$ref": "./elements/properties/anchor_from.json" },
"anchor_to": { "$ref": "./elements/properties/anchor_to.json" }, "anchor_to": { "$ref": "./elements/properties/anchor_to.json" },
"anims": { "$ref": "./elements/properties/anims.json" }, "anims": { "$ref": "./elements/properties/anims.json" },
"animation_reset_name": { "$ref": "./elements/properties/animation_reset_name.json" },
"background_control": { "$ref": "./elements/properties/background_control.json" }, "background_control": { "$ref": "./elements/properties/background_control.json" },
"background_hover_control": { "$ref": "./elements/properties/background_hover_control.json" }, "background_hover_control": { "$ref": "./elements/properties/background_hover_control.json" },
"backup_font_type": { "$ref": "./elements/properties/backup_font_type.json" }, "backup_font_type": { "$ref": "./elements/properties/backup_font_type.json" },
@@ -148,6 +226,7 @@
"bindings": { "$ref": "./elements/properties/bindings.json" }, "bindings": { "$ref": "./elements/properties/bindings.json" },
"button_mappings": { "$ref": "./elements/properties/button_mappings.json" }, "button_mappings": { "$ref": "./elements/properties/button_mappings.json" },
"cache_screen": { "$ref": "./elements/properties/cache_screen.json" }, "cache_screen": { "$ref": "./elements/properties/cache_screen.json" },
"camera_tilt_degrees": { "$ref": "./elements/properties/camera_tilt_degrees.json" },
"checked_control": { "$ref": "./elements/properties/checked_control.json" }, "checked_control": { "$ref": "./elements/properties/checked_control.json" },
"checked_hover_control": { "$ref": "./elements/properties/checked_hover_control.json" }, "checked_hover_control": { "$ref": "./elements/properties/checked_hover_control.json" },
"checked_locked_control": { "$ref": "./elements/properties/checked_locked_control.json" }, "checked_locked_control": { "$ref": "./elements/properties/checked_locked_control.json" },
@@ -159,6 +238,9 @@
"collection_index": { "$ref": "./elements/properties/collection_index.json" }, "collection_index": { "$ref": "./elements/properties/collection_index.json" },
"collection_name": { "$ref": "./elements/properties/collection_name.json" }, "collection_name": { "$ref": "./elements/properties/collection_name.json" },
"color": { "$ref": "./elements/properties/color.json" }, "color": { "$ref": "./elements/properties/color.json" },
"color1": { "$ref": "./elements/properties/color.json", "description": "The color to start the gradient with." },
"color2": { "$ref": "./elements/properties/color.json", "description": "The color to end the gradient with." },
"constrain_to_rect": { "$ref": "./elements/properties/constrain_to_rect.json" },
"consume_hover_events": { "$ref": "./elements/properties/consume_hover_events.json" }, "consume_hover_events": { "$ref": "./elements/properties/consume_hover_events.json" },
"contained": { "$ref": "./elements/properties/contained.json" }, "contained": { "$ref": "./elements/properties/contained.json" },
"control_name": { "$ref": "./elements/properties/control_name.json" }, "control_name": { "$ref": "./elements/properties/control_name.json" },
@@ -183,6 +265,7 @@
"focus_enabled": { "$ref": "./elements/properties/focus_enabled.json" }, "focus_enabled": { "$ref": "./elements/properties/focus_enabled.json" },
"focus_identifier": { "$ref": "./elements/properties/focus_identifier.json" }, "focus_identifier": { "$ref": "./elements/properties/focus_identifier.json" },
"focus_magnet_enabled": { "$ref": "./elements/properties/focus_magnet_enabled.json" }, "focus_magnet_enabled": { "$ref": "./elements/properties/focus_magnet_enabled.json" },
"focus_mapping": { "$ref": "./elements/properties/focus_mapping.json" },
"focus_navigation_mode_down": { "$ref": "./elements/properties/focus_navigation_mode_down.json" }, "focus_navigation_mode_down": { "$ref": "./elements/properties/focus_navigation_mode_down.json" },
"focus_navigation_mode_left": { "$ref": "./elements/properties/focus_navigation_mode_left.json" }, "focus_navigation_mode_left": { "$ref": "./elements/properties/focus_navigation_mode_left.json" },
"focus_navigation_mode_right": { "$ref": "./elements/properties/focus_navigation_mode_right.json" }, "focus_navigation_mode_right": { "$ref": "./elements/properties/focus_navigation_mode_right.json" },
@@ -215,6 +298,7 @@
"jump_to_bottom_on_update": { "$ref": "./elements/properties/jump_to_bottom_on_update.json" }, "jump_to_bottom_on_update": { "$ref": "./elements/properties/jump_to_bottom_on_update.json" },
"keep_ratio": { "$ref": "./elements/properties/keep_ratio.json" }, "keep_ratio": { "$ref": "./elements/properties/keep_ratio.json" },
"layer": { "$ref": "./elements/properties/layer.json" }, "layer": { "$ref": "./elements/properties/layer.json" },
"line_padding": { "$ref": "./elements/properties/line_padding.json" },
"localize": { "$ref": "./elements/properties/localize.json" }, "localize": { "$ref": "./elements/properties/localize.json" },
"locked_alpha": { "$ref": "./elements/properties/alpha.json" }, "locked_alpha": { "$ref": "./elements/properties/alpha.json" },
"locked_color": { "$ref": "./elements/properties/color.json" }, "locked_color": { "$ref": "./elements/properties/color.json" },
@@ -233,6 +317,7 @@
"pressed_control": { "$ref": "./elements/properties/pressed_control.json" }, "pressed_control": { "$ref": "./elements/properties/pressed_control.json" },
"prevent_touch_input": { "$ref": "./elements/properties/prevent_touch_input.json" }, "prevent_touch_input": { "$ref": "./elements/properties/prevent_touch_input.json" },
"primary_color": { "$ref": "./elements/properties/color.json" }, "primary_color": { "$ref": "./elements/properties/color.json" },
"priority": { "$ref": "./elements/properties/priority.json" },
"progress_control": { "$ref": "./elements/properties/progress_control.json" }, "progress_control": { "$ref": "./elements/properties/progress_control.json" },
"progress_hover_control": { "$ref": "./elements/properties/progress_hover_control.json" }, "progress_hover_control": { "$ref": "./elements/properties/progress_hover_control.json" },
"propagate_alpha": { "$ref": "./elements/properties/propagate_alpha.json" }, "propagate_alpha": { "$ref": "./elements/properties/propagate_alpha.json" },
@@ -311,6 +396,7 @@
"unchecked_locked_hover_control": { "$ref": "./elements/properties/unchecked_locked_hover_control.json" }, "unchecked_locked_hover_control": { "$ref": "./elements/properties/unchecked_locked_hover_control.json" },
"use_anchored_offset": { "$ref": "./elements/properties/use_anchored_offset.json" }, "use_anchored_offset": { "$ref": "./elements/properties/use_anchored_offset.json" },
"use_child_anchors": { "$ref": "./elements/properties/use_child_anchors.json" }, "use_child_anchors": { "$ref": "./elements/properties/use_child_anchors.json" },
"use_custom_pocket_toast": { "$ref": "./elements/properties/use_custom_pocket_toast.json" },
"use_last_focus": { "$ref": "./elements/properties/use_last_focus.json" }, "use_last_focus": { "$ref": "./elements/properties/use_last_focus.json" },
"uv_size": { "$ref": "./elements/properties/uv_size.json" }, "uv_size": { "$ref": "./elements/properties/uv_size.json" },
"uv": { "$ref": "./elements/properties/uv.json" }, "uv": { "$ref": "./elements/properties/uv.json" },
@@ -318,6 +404,12 @@
"virtual_keyboard_buffer_control": { "$ref": "./elements/properties/virtual_keyboard_buffer_control.json" }, "virtual_keyboard_buffer_control": { "$ref": "./elements/properties/virtual_keyboard_buffer_control.json" },
"visible": { "$ref": "./elements/properties/visible.json" }, "visible": { "$ref": "./elements/properties/visible.json" },
"zip_folder": { "$ref": "./elements/properties/zip_folder.json" } "zip_folder": { "$ref": "./elements/properties/zip_folder.json" }
},
"dependencies": {
"line_padding": { "properties": { "type": { "const": "label" } } },
"color1": { "properties": { "type": { "const": "custom" }, "renderer": { "const": "gradient_renderer" }, "color2": {} } },
"color2": { "properties": { "type": { "const": "custom" }, "renderer": { "const": "gradient_renderer" }, "color1": {} } },
"camera_tilt_degrees": { "properties": { "type": { "const": "custom" }, "renderer": { "const": "paper_doll_renderer" } } }
} }
}, },
"control_factory": { "control_factory": {