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:
@@ -2,15 +2,11 @@
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"title": "Bindings",
|
||||
"description": "The bindings that are contained within this element.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "../../general/item_ref.json"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"definitions": {
|
||||
"binding": {
|
||||
"type": "object",
|
||||
"title": "Bindings",
|
||||
"title": "Binding",
|
||||
"description": "A binding that is contained within this element.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"binding_collection_name": {
|
||||
@@ -28,10 +24,10 @@
|
||||
"description": "The condition that must be met for the binding to be applied.",
|
||||
"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.",
|
||||
"$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."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"title": "Camera Tilt Degrees",
|
||||
"description": "The degrees the camera is tilted for a paper doll renderer.",
|
||||
"$ref": "../../general/integer.json"
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"title": "Constrain To Rect",
|
||||
"$ref": "../../general/boolean.json"
|
||||
}
|
||||
@@ -1,12 +1,6 @@
|
||||
{
|
||||
"title": "Destroy At End",
|
||||
"description": "If true, the element will be destroyed at the end of the animation.",
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": ["popup", "details_bubble_control", "bundle_mode_popup_control", "selected_item_details"]
|
||||
},
|
||||
{
|
||||
"$ref": "../../general/variable.json"
|
||||
}
|
||||
]
|
||||
"description": "If set, the given element will be destroyed at the end of the animation.",
|
||||
"$ref": "../../general/item_ref.json",
|
||||
"examples": ["popup", "details_bubble_control", "bundle_mode_popup_control", "selected_item_details"]
|
||||
}
|
||||
|
||||
@@ -39,6 +39,10 @@
|
||||
"title": "Name",
|
||||
"description": "The name of the factory.",
|
||||
"type": "string"
|
||||
},
|
||||
"max_children_size": {
|
||||
"title": "Max Children Size",
|
||||
"$ref": "../../general/integer.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
18
source/resource/ui/elements/properties/focus_mapping.json
Normal file
18
source/resource/ui/elements/properties/focus_mapping.json
Normal 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"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
"description": "The type of the font.",
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": ["smooth", "MinecraftTen", "MinecraftTenEmoticon"]
|
||||
"enum": ["smooth", "MinecraftTen", "MinecraftTenEmoticon", "rune", "default"]
|
||||
},
|
||||
{
|
||||
"$ref": "../../general/variable.json"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"title": "FPS",
|
||||
"description": "The FPS of the animation.",
|
||||
"$ref": "../../general/integer.json"
|
||||
}
|
||||
"$ref": "../../general/number.json",
|
||||
"multipleOf": 1
|
||||
}
|
||||
@@ -8,7 +8,21 @@
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "../../general/item_ref.json"
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "../../general/item_ref.json"
|
||||
},
|
||||
{
|
||||
"title": "Texture",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"texture_path": {
|
||||
"title": "Texture Path",
|
||||
"$ref": "../../general/texture_file_path.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
4
source/resource/ui/elements/properties/line_padding.json
Normal file
4
source/resource/ui/elements/properties/line_padding.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"title": "Line Padding",
|
||||
"$ref": "../../general/number.json"
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
"description": "The control that will be pressed.",
|
||||
"anyOf": [
|
||||
{
|
||||
"enum": ["hover", "pressed"]
|
||||
"enum": ["hover", "pressed", ""]
|
||||
},
|
||||
{
|
||||
"$ref": "../../general/item_ref.json"
|
||||
|
||||
4
source/resource/ui/elements/properties/priority.json
Normal file
4
source/resource/ui/elements/properties/priority.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"title": "Priority",
|
||||
"$ref": "../../general/integer.json"
|
||||
}
|
||||
@@ -3,10 +3,34 @@
|
||||
"description": "The renderer that will be used by the element.",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "number",
|
||||
"minimum": 0,
|
||||
"maximum": 1
|
||||
"minimum": 0
|
||||
},
|
||||
{
|
||||
"$ref": "../../general/item_ref.json"
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
"description": "The texture to display.",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string",
|
||||
"pattern": "^textures/[a-zA-Z0-9/_-]+$",
|
||||
"examples": ["textures/ui/file"]
|
||||
"$ref": "../../general/texture_file_path.json"
|
||||
},
|
||||
{
|
||||
"$ref": "../../general/item_ref.json"
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
{
|
||||
"title": "Toggle Group Default Selected",
|
||||
"description": "The default selected toggle of the toggle group.",
|
||||
"$ref": "../../general/string.json"
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "../../general/string.json"
|
||||
},
|
||||
{
|
||||
"$ref": "../../general/integer.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
{
|
||||
"title": "TTS Ignore Count",
|
||||
"description": "The number of TTS ignores.",
|
||||
"$ref": "../../../general/integer.json"
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "../../../general/integer.json"
|
||||
},
|
||||
{
|
||||
"$ref": "../../../general/boolean.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
{
|
||||
"title": "TTS Override 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" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -6,10 +6,12 @@
|
||||
"always_rotate",
|
||||
"button",
|
||||
"carousel_label",
|
||||
"collection_panel",
|
||||
"custom",
|
||||
"dropdown",
|
||||
"edit_box",
|
||||
"grid",
|
||||
"grid_page_indicator",
|
||||
"image_cycler",
|
||||
"image",
|
||||
"input_panel",
|
||||
@@ -20,6 +22,7 @@
|
||||
"scroll_track",
|
||||
"scroll_view",
|
||||
"scrollbar_box",
|
||||
"selection_wheel",
|
||||
"slider_box",
|
||||
"slider",
|
||||
"stack_panel",
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"title": "Use Custom Pocket Toast",
|
||||
"$ref": "../../general/boolean.json"
|
||||
}
|
||||
Reference in New Issue
Block a user