1
0
mirror of https://github.com/Mojang/bedrock-samples.git synced 2024-11-23 13:36:18 +00:00
bedrock-samples/resource_pack/ui/submit_feedback_screen.json
Mike Ammerlaan cedc6e4171 v1.20.50.3
2023-12-05 10:02:40 -08:00

151 lines
4.0 KiB
JSON

{
"namespace": "submit_feedback",
"send_feedback_button@common_buttons.light_text_button": {
"$pressed_button_name": "button.send_feedback",
"$button_text": "gui.submitFeedback.button.text",
"bindings": [
{
"binding_name": "#has_feedback_text",
"binding_name_override": "#enabled"
}
]
},
//--------------------------------------------------------------------------------
// Controls
//--------------------------------------------------------------------------------
"write_feedback_panel": {
"type": "stack_panel",
"size": [ "100% - 12px", "100%" ],
"controls": [
{
"pad_1": {
"type": "panel",
"size": [ "100%", 4 ]
}
},
{
"write_feedback_label": {
"type": "label",
"color": "$body_text_color",
"size": [ "100%", "default" ],
"text": "gui.submitFeedback.body.text"
}
},
{
"pad_2": {
"type": "panel",
"size": [ "100%", 4 ]
}
},
{
"feedback_textbox@common.text_edit_box": {
"size": [ "100%", 40 ],
"$text_box_name": "#write_feedback_textbox",
"$place_holder_text": "gui.submitFeedback.placeHolder.text",
"max_length": "$feedback_textbox_max_length"
}
},
{
"remaining_characters_panel": {
"type": "panel",
"size": [ "100%", 10 ],
"controls": [
{
"remaining_characters_count_label": {
"type": "label",
"font_type": "smooth",
"size": [ "default", "default" ],
"anchor_from": "bottom_right",
"anchor_to": "bottom_right",
"color": "$body_text_color",
"text": "#remaining_characters_count",
"bindings": [
{
"binding_name": "#remaining_characters_count"
}
]
}
}
]
}
}
]
},
"scroll_panel": {
"type": "panel",
"size": [ "100%", "100%" ],
"controls": [
{
"write_feedback_panel@submit_feedback.write_feedback_panel": {}
}
]
},
"main_panel": {
"type": "panel",
"size": [ "100%", "100%" ],
"controls": [
{
"scrolling_panel@common.scrolling_panel": {
"$show_background": false,
"size": [ "100%", "100%" ],
"$scroll_size": [ 5, "100% - 4px" ],
"$scrolling_content": "submit_feedback.scroll_panel",
"$scrolling_pane_size": [ "100%", "100%" ]
}
}
]
},
//--------------------------------------------------------------------------------
// Screen
//--------------------------------------------------------------------------------
"submit_feedback_screen@common.base_screen": {
"button_mappings": [
{
"from_button_id": "button.menu_cancel",
"to_button_id": "button.menu_exit",
"mapping_type": "global"
}
],
"$screen_content": "submit_feedback.submit_feedback_content",
"$default_text_color": [ 0.3, 0.3, 0.3 ]
},
"submit_feedback_content": {
"type": "panel",
"controls": [
{
"submit_feedback_main_panel@common_dialogs.main_panel_one_button": {
"$text_name": "gui.submitFeedback.text",
"$child_control": "submit_feedback.main_panel",
"size": [ 270, 165 ],
"$button_panel": "submit_feedback.send_feedback_button",
"bindings": [
{
"binding_name": "#show_submit_feedback_screen",
"binding_name_override": "#visible"
}
]
}
},
{
"progress_loading@common_store.progress_loading_spinner": {
"size": [ "5%", "5%" ],
"bindings": [
{
"binding_name": "#submit_feedback_in_progress",
"binding_name_override": "#visible"
}
]
}
}
]
}
}