mirror of
https://github.com/Mojang/bedrock-samples.git
synced 2024-11-23 12:26:14 +00:00
1172 lines
31 KiB
JSON
1172 lines
31 KiB
JSON
{
|
|
"namespace": "book",
|
|
|
|
// -----------------------------------------------
|
|
// EDU
|
|
// -----------------------------------------------
|
|
|
|
"screenshot": {
|
|
"type": "image",
|
|
"texture_file_system": "$screenshot_file_system",
|
|
"layer": 3,
|
|
|
|
"$screenshot_binding|default": [
|
|
{
|
|
"binding_name": "#screenshot_path",
|
|
"binding_name_override": "#texture",
|
|
"binding_type": "collection",
|
|
"binding_collection_name": "book_pages"
|
|
}
|
|
],
|
|
"bindings": "$screenshot_binding"
|
|
},
|
|
|
|
"screenshot_frame": {
|
|
"type": "image",
|
|
"texture": "$screenshot_frame_texture",
|
|
"layer": 1,
|
|
"$caption_enabled|default": true,
|
|
|
|
"controls": [
|
|
{
|
|
"caption_edit@book.page_caption": {
|
|
"layer": 3,
|
|
"visible": "$caption_enabled"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"photo_corner": {
|
|
"type": "image",
|
|
"size": [ 19, 19 ],
|
|
"layer": 1
|
|
},
|
|
|
|
"photo_corner_bl@book.photo_corner": {
|
|
"texture": "textures/ui/photo_corner_bl",
|
|
"offset": [ -1, 1 ],
|
|
"anchor_to": "bottom_left",
|
|
"anchor_from": "bottom_left"
|
|
},
|
|
|
|
"photo_corner_br@book.photo_corner": {
|
|
"texture": "textures/ui/photo_corner_br",
|
|
"offset": [ 1, 1 ],
|
|
"anchor_to": "bottom_right",
|
|
"anchor_from": "bottom_right"
|
|
},
|
|
|
|
"photo_corner_tr@book.photo_corner": {
|
|
"texture": "textures/ui/photo_corner_tr",
|
|
"offset": [ 1, -1 ],
|
|
"anchor_to": "top_right",
|
|
"anchor_from": "top_right"
|
|
},
|
|
|
|
"photo_corner_tl@book.photo_corner": {
|
|
"texture": "textures/ui/photo_corner_tl",
|
|
"offset": [ -1, -1 ],
|
|
"anchor_to": "top_left",
|
|
"anchor_from": "top_left"
|
|
},
|
|
|
|
"page_caption@book.page_text_edit": {
|
|
"size": [ "100%-20px", 22 ],
|
|
"offset": [ 0, 0 ],
|
|
"anchor_from": "bottom_middle",
|
|
"anchor_to": "bottom_middle",
|
|
|
|
"$text_alignment": "center",
|
|
"max_length": "$max_page_length"
|
|
},
|
|
|
|
"page_photo": {
|
|
"type": "panel",
|
|
"layer": 1,
|
|
// Photos are square, so use x for y size
|
|
"size": [ "100%-32px", "100%x" ],
|
|
"offset": [ 0, -2 ],
|
|
"controls": [
|
|
{ "screenshot@book.screenshot": {} },
|
|
{ "screenshot_frame@book.screenshot_frame": { "layer": 4 } },
|
|
{ "photo_corner_bl@book.photo_corner_bl": { "layer": 5 } },
|
|
{ "photo_corner_br@book.photo_corner_br": { "layer": 5 } },
|
|
{ "photo_corner_tl@book.photo_corner_tl": { "layer": 5 } },
|
|
{ "photo_corner_tr@book.photo_corner_tr": { "layer": 5 } }
|
|
]
|
|
},
|
|
|
|
// An individual photo in the From Portfolio grid on the add photo screen
|
|
"pick_item@common.empty_panel": {
|
|
"type": "panel",
|
|
"size": [ 100, 100 ],
|
|
"$screenshot_binding": [
|
|
{
|
|
"binding_name": "#item_screenshot_path",
|
|
"binding_name_override": "#texture",
|
|
"binding_type": "global"
|
|
},
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "pick_item_column_collection",
|
|
"binding_collection_prefix": "pick_item_column"
|
|
},
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "pick_item_row_collection",
|
|
"binding_collection_prefix": "pick_item_row"
|
|
}
|
|
],
|
|
"controls": [
|
|
{
|
|
"photo@book.page_photo": {
|
|
"size": [ "100% - 8px", "100% - 8px" ],
|
|
"bindings": [],
|
|
"$caption_enabled": false
|
|
}
|
|
},
|
|
{
|
|
"button": {
|
|
"type": "button",
|
|
"size": [ "100% - 8px", "100% - 8px" ],
|
|
"bindings": [
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "pick_item_column_collection",
|
|
"binding_collection_prefix": "pick_item_column"
|
|
},
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "pick_item_row_collection",
|
|
"binding_collection_prefix": "pick_item_row"
|
|
}
|
|
],
|
|
"button_mappings": [
|
|
{
|
|
"from_button_id": "button.menu_select",
|
|
"to_button_id": "button.picked",
|
|
"mapping_type": "pressed"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// An individual photo in the From Inventory grid on the add photo screen
|
|
"pick_item_inventory": {
|
|
"type": "panel",
|
|
"size": [ 100, 100 ],
|
|
"$screenshot_binding": [
|
|
{
|
|
"binding_name": "#inventory_screenshot_path",
|
|
"binding_name_override": "#texture",
|
|
"binding_type": "global"
|
|
},
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "pick_inventory_column_collection",
|
|
"binding_collection_prefix": "pick_inventory_column"
|
|
},
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "pick_inventory_row_collection",
|
|
"binding_collection_prefix": "pick_inventory_row"
|
|
}
|
|
],
|
|
"controls": [
|
|
{
|
|
"photo@book.page_photo": {
|
|
"size": [ "100% - 8px", "100% - 8px" ],
|
|
"bindings": [],
|
|
"$caption_enabled": false
|
|
}
|
|
},
|
|
{
|
|
"button": {
|
|
"type": "button",
|
|
"size": [ "100% - 8px", "100% - 8px" ],
|
|
"bindings": [
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "pick_inventory_column_collection",
|
|
"binding_collection_prefix": "pick_inventory_column"
|
|
},
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "pick_inventory_row_collection",
|
|
"binding_collection_prefix": "pick_inventory_row"
|
|
}
|
|
],
|
|
"button_mappings": [
|
|
{
|
|
"from_button_id": "button.menu_select",
|
|
"to_button_id": "button.picked_inventory",
|
|
"mapping_type": "pressed"
|
|
},
|
|
{
|
|
"from_button_id": "button.menu_ok",
|
|
"to_button_id": "button.picked_inventory",
|
|
"mapping_type": "focused"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"header": {
|
|
"type": "label",
|
|
"max_size": [ "100%", "default" ],
|
|
"size": [ "default", "default" ],
|
|
"color": "$book_page_number_color",
|
|
"text": "$header_text"
|
|
},
|
|
|
|
"text_centering_panel_inventory": {
|
|
"type": "panel",
|
|
"size": [ "100%", "100%c" ],
|
|
"controls": [
|
|
{
|
|
"inventory_header@book.header": {
|
|
"$header_text": "book.headerInventory"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"text_centering_panel_portfolio": {
|
|
"type": "panel",
|
|
"size": [ "100%", "100%c" ],
|
|
"controls": [
|
|
{
|
|
"portfolio_header@book.header": {
|
|
"$header_text": "book.headerPortfolio"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// From Inventory and From Portfolio headers and photo grids on the add photo screen
|
|
"pick_scrolling_content": {
|
|
"type": "stack_panel",
|
|
"controls": [
|
|
{
|
|
"inventory_header@book.text_centering_panel_inventory": {
|
|
}
|
|
},
|
|
{
|
|
"inventory_grid@edu_common.stack_panel_grid": {
|
|
"$grid_collection_prefix": "pick_inventory",
|
|
"$stack_grid_item": "book.pick_item_inventory"
|
|
}
|
|
},
|
|
{
|
|
"portfolio_header@book.text_centering_panel_portfolio": {
|
|
}
|
|
},
|
|
{
|
|
"portfolio_grid@edu_common.stack_panel_grid": {
|
|
"$grid_collection_prefix": "pick_item",
|
|
"$stack_grid_item": "book.pick_item"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// Background, scrollbar, and close button for the add photo screen
|
|
"pick_panel": {
|
|
"type": "image",
|
|
"texture": "textures/ui/book_frame",
|
|
"size": [ 225, 231 ],
|
|
|
|
"controls": [
|
|
{
|
|
"scroll@common.scrolling_panel": {
|
|
"$show_background": false,
|
|
"$scrolling_pane_size": [ "100% - 16px", "100% - 30px" ],
|
|
"$scrolling_pane_offset": [ 8, 21 ],
|
|
"$scrolling_content": "book.pick_scrolling_content"
|
|
}
|
|
},
|
|
{
|
|
"close_button@book.close_button": {
|
|
"offset": [ -7, 7 ]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// -----------------------------------------------
|
|
// Background
|
|
// -----------------------------------------------
|
|
|
|
"blank": {
|
|
"type": "image",
|
|
"layer": 4
|
|
},
|
|
|
|
"book_background": {
|
|
"type": "image",
|
|
"layer": 0,
|
|
"texture": "textures/ui/book_back"
|
|
},
|
|
|
|
"book_spine_image": {
|
|
"type": "image",
|
|
"layer": 1,
|
|
"texture": "textures/ui/book_spine"
|
|
},
|
|
|
|
"page_crease_left_image": {
|
|
"type": "image",
|
|
"layer": 3,
|
|
"anchor_from": "right_middle",
|
|
"anchor_to": "right_middle",
|
|
"texture": "textures/ui/book_pagecrease_left"
|
|
},
|
|
|
|
"page_crease_right_image": {
|
|
"type": "image",
|
|
"layer": 3,
|
|
"anchor_from": "left_middle",
|
|
"anchor_to": "left_middle",
|
|
"texture": "textures/ui/book_pagecrease_right"
|
|
},
|
|
|
|
"page_edge_left_image": {
|
|
"type": "image",
|
|
"layer": 2,
|
|
"anchor_from": "left_middle",
|
|
"anchor_to": "left_middle",
|
|
"texture": "textures/ui/book_pageedge_left"
|
|
},
|
|
|
|
"page_edge_right_image": {
|
|
"type": "image",
|
|
"layer": 2,
|
|
"anchor_from": "right_middle",
|
|
"anchor_to": "right_middle",
|
|
"texture": "textures/ui/book_pageedge_right"
|
|
},
|
|
|
|
"text_edit_hover_image": {
|
|
"type": "image",
|
|
"layer": 4,
|
|
"texture": "textures/ui/book_texteditbox_hover"
|
|
},
|
|
|
|
// -----------------------------------------------
|
|
// Button
|
|
// -----------------------------------------------
|
|
|
|
"base_button@common.button": {
|
|
"layer": 5,
|
|
"$default_texture|default": "",
|
|
"$hover_texture|default": "",
|
|
"$pressed_texture|default": "",
|
|
|
|
"$button_bind_type": "global",
|
|
|
|
"bindings": [
|
|
{
|
|
"binding_name": "$button_active",
|
|
"binding_name_override": "#visible",
|
|
"binding_type": "$button_bind_type",
|
|
"binding_collection_name": "book_pages"
|
|
},
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "book_pages"
|
|
}
|
|
],
|
|
"controls": [
|
|
{
|
|
"default": {
|
|
"type": "image",
|
|
"texture": "$default_texture"
|
|
}
|
|
},
|
|
{
|
|
"hover": {
|
|
"type": "image",
|
|
"texture": "$hover_texture"
|
|
}
|
|
},
|
|
{
|
|
"pressed": {
|
|
"type": "image",
|
|
"texture": "$pressed_texture"
|
|
}
|
|
|
|
}
|
|
]
|
|
},
|
|
|
|
"book_buttons_panel": {
|
|
"type": "panel",
|
|
"controls": [
|
|
{
|
|
"sign_button@common_buttons.light_text_form_fitting_button": {
|
|
"$form_fitting_min_size": [ 100, 0 ],
|
|
"$pressed_button_name": "button.sign_book",
|
|
"$button_text": "book.signButton",
|
|
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#editable",
|
|
"binding_name_override": "#visible"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"export_button@common_buttons.light_text_form_fitting_button": {
|
|
"ignored": "(not $education_edition)",
|
|
|
|
"$form_fitting_min_size": [ 100, 0 ],
|
|
"$pressed_button_name": "button.export_book",
|
|
"$button_text": "book.export",
|
|
|
|
"bindings": [
|
|
{
|
|
"binding_name": "(not #editable)",
|
|
"binding_name_override": "#visible"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"im_content_button@im_reader.reader_button": {
|
|
"ignored": "(not $education_edition)",
|
|
|
|
"size": [ "100%y", "100%sm" ],
|
|
"anchor_from": "bottom_right",
|
|
"anchor_to": "bottom_right"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"cover_buttons_stack_panel_holder": {
|
|
"type": "panel",
|
|
"size": [ "100%", "100%c" ],
|
|
"controls": [
|
|
{
|
|
"cover_buttons_stack_panel": {
|
|
"type": "stack_panel",
|
|
"orientation": "horizontal",
|
|
"size": [ "100%c", 20 ],
|
|
"controls": [
|
|
{
|
|
"finalize_button@common_buttons.light_text_form_fitting_button": {
|
|
"$form_fitting_min_size": [ 100, 0 ],
|
|
"$pressed_button_name": "button.finalize",
|
|
"$button_text": "book.finalizeButton",
|
|
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#finalize_button_enabled",
|
|
"binding_name_override": "#enabled"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"padding_1": {
|
|
"type": "panel",
|
|
"size": [ 10, "100%" ]
|
|
}
|
|
},
|
|
{
|
|
"cancel_sign_button@common_buttons.light_text_form_fitting_button": {
|
|
"$form_fitting_min_size": [ 100, 0 ],
|
|
"$pressed_button_name": "button.book_exit",
|
|
"$button_text": "gui.cancel"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"close_button_default": {
|
|
"type": "image",
|
|
"texture": "textures/ui/close_button_default",
|
|
"color": "$portfolio_close_color"
|
|
},
|
|
|
|
"close_button_hover": {
|
|
"type": "image",
|
|
"texture": "textures/ui/close_button_hover"
|
|
},
|
|
|
|
"close_button_pressed": {
|
|
"type": "image",
|
|
"texture": "textures/ui/close_button_pressed"
|
|
},
|
|
|
|
"close_button": {
|
|
"type": "button",
|
|
"size": [ 14, 14 ],
|
|
"layer": 10,
|
|
"anchor_from": "top_right",
|
|
"anchor_to": "top_right",
|
|
"default_control": "default",
|
|
"hover_control": "hover",
|
|
"pressed_control": "pressed",
|
|
"focus_enabled": false,
|
|
"button_mappings": [
|
|
{
|
|
"from_button_id": "button.menu_select",
|
|
"to_button_id": "button.book_exit",
|
|
"mapping_type": "pressed"
|
|
},
|
|
{
|
|
"from_button_id": "button.menu_cancel",
|
|
"to_button_id": "button.book_exit",
|
|
"mapping_type": "global"
|
|
}
|
|
],
|
|
"controls": [
|
|
{ "default@book.close_button_default": {} },
|
|
{ "hover@book.close_button_hover": {} },
|
|
{ "pressed@book.close_button_pressed": {} }
|
|
]
|
|
},
|
|
|
|
// -----------------------------------------------
|
|
// Content
|
|
// -----------------------------------------------
|
|
|
|
"page_text_edit@common.multiline_text_edit_box": {
|
|
"layer": 4,
|
|
"$text_box_text_color": "$book_page_text_color",
|
|
"$color": "$book_page_text_color",
|
|
"$disabled_alpha": 1.0,
|
|
|
|
"constrain_to_rect": true,
|
|
|
|
"$text_edit_box_content_binding_type": "collection",
|
|
"$text_edit_box_grid_collection_name": "book_pages",
|
|
"$text_box_enabled_binding_name": "#editable",
|
|
"$text_box_name": "#page_text_box",
|
|
"$text_background_default": "book.blank",
|
|
"$text_edit_box_content_binding_name": "#text_box_item_name",
|
|
|
|
"$text_background_hover": "book.text_edit_hover_image",
|
|
"$text_edit_box_focusable_binding_name": "#editable",
|
|
|
|
"$enable_profanity_filter": true
|
|
},
|
|
|
|
"page_text@book.page_text_edit": {
|
|
"size": [ "100%-32px", "100%-58px" ],
|
|
"offset": [ 0, 23 ],
|
|
"anchor_from": "top_middle",
|
|
"anchor_to": "top_middle",
|
|
"$text_edit_box_focusable_binding_name": "#editable",
|
|
"max_length": "$max_page_length",
|
|
|
|
"$text_edit_visible_binding_name": "#is_text_page",
|
|
"$text_edit_visible_binding_collection_name": "book_pages",
|
|
"$text_edit_visible_binding_type|default": "collection",
|
|
|
|
"$enable_profanity_filter": true
|
|
},
|
|
|
|
"page_number_label": {
|
|
"type": "label",
|
|
"offset": [ 0, 13 ],
|
|
"layer": 5,
|
|
"color": "$book_page_number_color",
|
|
"anchor_from": "top_middle",
|
|
"anchor_to": "top_middle",
|
|
|
|
"localize": false,
|
|
"text": "#page_number",
|
|
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#page_number",
|
|
"binding_type": "collection",
|
|
"binding_collection_name": "book_pages"
|
|
},
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "book_pages"
|
|
}
|
|
]
|
|
},
|
|
|
|
// Padded button for edit panel, as when the button disappears, its padding needs to as well
|
|
"padded_button": {
|
|
"type": "panel",
|
|
"size": [ "100%c + 2px", "100%c" ],
|
|
"$button_bind_type": "global",
|
|
"controls": [
|
|
{
|
|
"button@book.base_button": {
|
|
"size": "$button_size"
|
|
}
|
|
}
|
|
],
|
|
"bindings": [
|
|
{
|
|
"binding_name": "$button_active",
|
|
"binding_name_override": "#visible",
|
|
"binding_type": "$button_bind_type",
|
|
"binding_collection_name": "book_pages"
|
|
},
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "book_pages"
|
|
}
|
|
]
|
|
},
|
|
|
|
"page_buttons_panel": {
|
|
"type": "stack_panel",
|
|
"orientation": "horizontal",
|
|
"size": [ "100%c", 12 ],
|
|
"offset": [ 0, -22 ],
|
|
"anchor_from": "bottom_middle",
|
|
"anchor_to": "bottom_middle",
|
|
|
|
"controls": [
|
|
{
|
|
"swap_page_left@book.padded_button": {
|
|
"$button_size": [ 23, 16 ],
|
|
|
|
"$pressed_button_name": "button.swap_page_left",
|
|
"$button_active": "#swap_left_active",
|
|
"$button_bind_type": "collection",
|
|
"$default_texture": "textures/ui/book_shiftleft_default",
|
|
"$hover_texture": "textures/ui/book_shiftleft_hover",
|
|
"$pressed_texture": "textures/ui/book_shiftleft_pressed"
|
|
}
|
|
},
|
|
{
|
|
"insert_text_page@book.padded_button": {
|
|
"$button_size": [ 16, 16 ],
|
|
|
|
"$pressed_button_name": "button.insert_text_page",
|
|
"$button_active": "#insert_page_active",
|
|
"$button_bind_type": "collection",
|
|
"$default_texture": "textures/ui/book_addtextpage_default",
|
|
"$hover_texture": "textures/ui/book_addtextpage_hover",
|
|
"$pressed_texture": "textures/ui/book_addtextpage_pressed"
|
|
}
|
|
},
|
|
{
|
|
"insert_photo_page@book.padded_button": {
|
|
"$button_size": [ 20, 16 ],
|
|
"ignored": "(not $education_edition)",
|
|
|
|
"$pressed_button_name": "button.insert_photo_page",
|
|
"$button_active": "#insert_photo_page_active",
|
|
"$button_bind_type": "collection",
|
|
"$default_texture": "textures/ui/book_addpicture_default",
|
|
"$hover_texture": "textures/ui/book_addpicture_hover",
|
|
"$pressed_texture": "textures/ui/book_addpicture_pressed"
|
|
}
|
|
},
|
|
{
|
|
"delete_page@book.padded_button": {
|
|
"$button_size": [ 16, 16 ],
|
|
|
|
"$pressed_button_name": "button.delete_page",
|
|
"$button_active": "#edit_controls_active",
|
|
"$default_texture": "textures/ui/book_trash_default",
|
|
"$hover_texture": "textures/ui/trash_hover",
|
|
"$pressed_texture": "textures/ui/trash_pressed"
|
|
}
|
|
},
|
|
{
|
|
"swap_page_right@book.padded_button": {
|
|
"$button_size": [ 23, 16 ],
|
|
|
|
"$pressed_button_name": "button.swap_page_right",
|
|
"$button_active": "#swap_right_active",
|
|
"$button_bind_type": "collection",
|
|
"$default_texture": "textures/ui/book_shiftright_default",
|
|
"$hover_texture": "textures/ui/book_shiftright_hover",
|
|
"$pressed_texture": "textures/ui/book_shiftright_pressed"
|
|
}
|
|
}
|
|
],
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#edit_controls_active",
|
|
"binding_name_override": "#visible",
|
|
"binding_type": "collection",
|
|
"binding_collection_name": "book_pages"
|
|
},
|
|
{
|
|
"binding_type": "collection_details",
|
|
"binding_collection_name": "book_pages"
|
|
}
|
|
]
|
|
},
|
|
|
|
"page_content_panel": {
|
|
"type": "panel",
|
|
"offset": "$page_content_offset",
|
|
|
|
"controls": [
|
|
{ "page_text@book.page_text": {} },
|
|
{
|
|
"page_photo@book.page_photo": {
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#is_photo_page",
|
|
"binding_name_override": "#visible",
|
|
"binding_type": "collection",
|
|
"binding_collection_name": "book_pages"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{ "page_number_label@book.page_number_label": {} },
|
|
{ "page_buttons_panel@book.page_buttons_panel": {} },
|
|
{
|
|
"edit_page@book.base_button": {
|
|
"size": [ 19, 18 ],
|
|
"offset": [ 0, -16 ],
|
|
"anchor_from": "bottom_middle",
|
|
"anchor_to": "bottom_middle",
|
|
|
|
"$pressed_button_name": "button.edit_page",
|
|
"$button_active": "#edit_button_active",
|
|
"$button_bind_type": "collection",
|
|
"$default_texture": "textures/ui/book_edit_default",
|
|
"$hover_texture": "textures/ui/book_edit_hover",
|
|
"$pressed_texture": "textures/ui/book_edit_pressed"
|
|
}
|
|
}
|
|
],
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#page_visible",
|
|
"binding_name_override": "#visible",
|
|
"binding_type": "collection",
|
|
"binding_collection_name": "book_pages"
|
|
}
|
|
]
|
|
},
|
|
|
|
"title_label": {
|
|
"type": "label",
|
|
"offset": [ 0, 30 ],
|
|
"layer": 2,
|
|
"anchor_to": "top_middle",
|
|
"anchor_from": "top_middle",
|
|
"text": "book.editTitle",
|
|
"color": "$book_title_label_color",
|
|
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#editable",
|
|
"binding_name_override": "#visible"
|
|
}
|
|
]
|
|
},
|
|
|
|
"title_text_box@common.text_edit_box": {
|
|
"size": [ "100% - 20px", 14 ],
|
|
"offset": [ 0, 46 ],
|
|
"layer": 2,
|
|
"anchor_to": "top_middle",
|
|
"anchor_from": "top_middle",
|
|
|
|
"max_length": "$max_title_length",
|
|
|
|
"$text_alignment": "center",
|
|
"$place_holder_text": "book.titleHere",
|
|
"$text_box_text_color": "$book_title_color",
|
|
"$place_holder_text_color": "$book_title_placeholder_color",
|
|
"$color": "$book_title_color",
|
|
"$text_box_name": "#title_text_box",
|
|
"$text_box_enabled_binding_name": "#editable",
|
|
|
|
"$text_edit_box_content_binding_name": "#title_text_box_item_name",
|
|
"$text_background_default": "book.blank",
|
|
"$text_background_hover": "book.text_edit_hover_image",
|
|
|
|
"$enable_profanity_filter": true
|
|
},
|
|
|
|
"author_label": {
|
|
"type": "label",
|
|
"size": [ "default", 18 ],
|
|
"offset": [ 0, 4 ],
|
|
|
|
"text": "book.byAuthor",
|
|
"color": "$book_author_label_color"
|
|
},
|
|
|
|
"author_text_box@common.text_edit_box": {
|
|
"size": [ "100% - 1px", "100%" ],
|
|
"offset": [ 1, 0 ],
|
|
"layer": 3,
|
|
|
|
"constrain_to_rect": true,
|
|
|
|
"$text_alignment": "left",
|
|
"$text_box_text_color": "$book_author_color",
|
|
"$color": "$book_author_color",
|
|
"$text_box_name": "#author_text_box",
|
|
"$text_box_enabled_binding_name": "#author_editable",
|
|
"$text_edit_box_content_binding_name": "#author_text_box_item_name",
|
|
|
|
"$text_background_default": "book.blank",
|
|
"$text_background_hover": "book.text_edit_hover_image",
|
|
|
|
"$enable_profanity_filter": true
|
|
},
|
|
|
|
"author_stack_panel": {
|
|
"type": "stack_panel",
|
|
"size": [ "100% - 26px", 0 ],
|
|
"offset": [ 0, 62 ],
|
|
"layer": 2,
|
|
"anchor_to": "top_middle",
|
|
"anchor_from": "top_middle",
|
|
|
|
"orientation": "horizontal",
|
|
|
|
"controls": [
|
|
{
|
|
"author_label_panel": {
|
|
"type": "panel",
|
|
"size": [ "100%c", "100%c" ],
|
|
|
|
"controls": [
|
|
{ "author_label@book.author_label": {} }
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"author_text_panel": {
|
|
"type": "panel",
|
|
"size": [ "fill", 18 ],
|
|
"controls": [
|
|
{ "author_text_box@book.author_text_box": {} }
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"warning_label": {
|
|
"type": "label",
|
|
"offset": [ 0, 86 ],
|
|
"size": [ "100%-30px", "100%" ],
|
|
"layer": 2,
|
|
"anchor_to": "top_middle",
|
|
"anchor_from": "top_middle",
|
|
|
|
"text": "book.finalizeWarning",
|
|
"text_alignment": "left",
|
|
"color": "$book_warning_color",
|
|
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#editable",
|
|
"binding_name_override": "#visible"
|
|
}
|
|
]
|
|
},
|
|
|
|
"cover_content_panel": {
|
|
"type": "panel",
|
|
|
|
"controls": [
|
|
{ "title_label@book.title_label": {} },
|
|
{ "title_text_box@book.title_text_box": {} },
|
|
{ "author_stack_panel@book.author_stack_panel": {} },
|
|
{ "warning_label@book.warning_label": {} }
|
|
]
|
|
},
|
|
|
|
// -----------------------------------------------
|
|
// Screen
|
|
// -----------------------------------------------
|
|
|
|
"cover_and_buttons_panel": {
|
|
"type": "panel",
|
|
"size": [ "100%", "100%" ],
|
|
"max_size": [ "100%", 231 ],
|
|
|
|
"controls": [
|
|
{
|
|
"cover_panel": {
|
|
"type": "panel",
|
|
"size": "$page_size",
|
|
"max_size": [ 320, "100% - 20px" ],
|
|
"anchor_from": "top_middle",
|
|
"anchor_to": "top_middle",
|
|
|
|
"$book_background_image|default": "textures/ui/book_cover",
|
|
"controls": [
|
|
{ "cover_content_panel@book.cover_content_panel": {} },
|
|
{
|
|
"book_background": {
|
|
"type": "image",
|
|
"layer": 1,
|
|
"texture": "$book_background_image"
|
|
}
|
|
},
|
|
{
|
|
"close_button@book.close_button": {
|
|
"offset": [ -5, 5 ]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"cover_buttons_stack_panel_holder@book.cover_buttons_stack_panel_holder": {
|
|
"anchor_from": "bottom_middle",
|
|
"anchor_to": "bottom_middle"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"page_panel": {
|
|
"type": "panel",
|
|
"size": "$page_size",
|
|
"max_size": [ "100%", "100%" ],
|
|
"$page_content_offset|default": [ 0, 0 ],
|
|
"$page_crease_image|default": "book.page_crease_left_image",
|
|
"$page_edge_image|default": "book.page_edge_left_image",
|
|
"$page_edge_offset|default": [ 7, -1 ],
|
|
|
|
"controls": [
|
|
{ "page_content_panel@book.page_content_panel": {} },
|
|
{
|
|
"$page_crease_image@$page_crease_image": {
|
|
"size": [ "100% - 40px", "100% - 14px" ],
|
|
"offset": [ 0, -2 ]
|
|
}
|
|
},
|
|
{
|
|
"$page_edge_image@$page_edge_image": {
|
|
"size": [ "100% - 7px", "100% - 16px" ],
|
|
"offset": "$page_edge_offset"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"book_grid": {
|
|
"type": "grid",
|
|
"grid_dimensions": [ 2, 1 ],
|
|
"collection_name": "book_pages",
|
|
|
|
"controls": [
|
|
{
|
|
"page_panel_left@book.page_panel": {
|
|
"grid_position": [ 0, 0 ],
|
|
"$page_content_offset": [ 5, 0 ],
|
|
"$page_crease_image": "book.page_crease_left_image",
|
|
"$page_edge_image": "book.page_edge_left_image",
|
|
"$page_edge_offset": [ 7, -1 ]
|
|
}
|
|
},
|
|
{
|
|
"page_panel_right@book.page_panel": {
|
|
"grid_position": [ 1, 0 ],
|
|
"$page_content_offset": [ -5, 0 ],
|
|
"$page_crease_image": "book.page_crease_right_image",
|
|
"$page_edge_image": "book.page_edge_right_image",
|
|
"$page_edge_offset": [ -7, -1 ]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
"book_and_buttons_panel": {
|
|
"type": "panel",
|
|
"size": [ "100%cm", "100%" ],
|
|
"max_size": [ "100%", 231 ],
|
|
|
|
"controls": [
|
|
{
|
|
"book_panel": {
|
|
"type": "panel",
|
|
"size": "$book_size",
|
|
"max_size": [ 320, "100% - 20px" ],
|
|
"anchor_from": "top_middle",
|
|
"anchor_to": "top_middle",
|
|
|
|
"controls": [
|
|
{ "book_grid@book.book_grid": {} },
|
|
{ "book_background@book.book_background": {} },
|
|
{
|
|
"book_spine_image@book.book_spine_image": {
|
|
"size": [ 8, "100% - 2px" ]
|
|
}
|
|
},
|
|
{
|
|
"close_button@book.close_button": {
|
|
"offset": [ -14, 7 ]
|
|
}
|
|
},
|
|
{
|
|
"prev_button@book.base_button": {
|
|
"size": [ 24, 24 ],
|
|
"offset": [ 7, -9 ],
|
|
"anchor_from": "bottom_left",
|
|
"anchor_to": "bottom_left",
|
|
|
|
"sound_name": "item.book.page_turn",
|
|
"sound_volume": 4.0,
|
|
"sound_pitch": 1.0,
|
|
|
|
"$pressed_button_name": "button.prev_page",
|
|
"$button_active": "#prev_page_button_active",
|
|
"$default_texture": "textures/ui/book_pageleft_default",
|
|
"$hover_texture": "textures/ui/book_pageleft_hover",
|
|
"$pressed_texture": "textures/ui/book_pageleft_pressed"
|
|
}
|
|
},
|
|
{
|
|
"next_button@book.base_button": {
|
|
"size": [ 24, 24 ],
|
|
"offset": [ -7, -9 ],
|
|
"anchor_from": "bottom_right",
|
|
"anchor_to": "bottom_right",
|
|
|
|
"sound_name": "item.book.page_turn",
|
|
"sound_volume": 4.0,
|
|
"sound_pitch": 1.0,
|
|
|
|
"$pressed_button_name": "button.next_page",
|
|
"$button_active": "#next_page_button_active",
|
|
"$default_texture": "textures/ui/book_pageright_default",
|
|
"$hover_texture": "textures/ui/book_pageright_hover",
|
|
"$pressed_texture": "textures/ui/book_pageright_pressed"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"book_buttons_panel@book.book_buttons_panel": {
|
|
"size": [ "100%sm", "100%cm" ],
|
|
"anchor_from": "bottom_middle",
|
|
"anchor_to": "bottom_middle"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
// Root panel all others parented to
|
|
"root_panel": {
|
|
"type": "panel",
|
|
"layer": 1
|
|
},
|
|
|
|
"book_screen@common.base_screen": {
|
|
"$close_on_player_hurt|default": true,
|
|
"close_on_player_hurt": "$close_on_player_hurt",
|
|
"$screen_content": "book.book_screen_content",
|
|
"$screen_bg_content": "common.screen_background",
|
|
"$screen_background_alpha": 0.4,
|
|
"button_mappings": [
|
|
{
|
|
"from_button_id": "button.menu_exit",
|
|
"to_button_id": "button.book_exit",
|
|
"mapping_type": "global"
|
|
},
|
|
{
|
|
"from_button_id": "button.menu_cancel",
|
|
"to_button_id": "button.book_exit",
|
|
"mapping_type": "global"
|
|
},
|
|
{
|
|
"from_button_id": "button.menu_tab_left",
|
|
"to_button_id": "button.prev_page",
|
|
"mapping_type": "global"
|
|
},
|
|
{
|
|
"from_button_id": "button.menu_tab_right",
|
|
"to_button_id": "button.next_page",
|
|
"mapping_type": "global"
|
|
}
|
|
]
|
|
},
|
|
|
|
"book_screen_content": {
|
|
"type": "panel",
|
|
"controls": [
|
|
{
|
|
"root_panel@book.root_panel": {
|
|
"$book_size": [ 320, 207 ],
|
|
"$page_size": [ 160, 207 ],
|
|
|
|
"controls": [
|
|
{
|
|
"book_and_buttons_panel@book.book_and_buttons_panel": {
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#viewing",
|
|
"binding_name_override": "#visible"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"cover_and_buttons_panel@book.cover_and_buttons_panel": {
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#signing",
|
|
"binding_name_override": "#visible"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"pick_panel@book.pick_panel": {
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#picking",
|
|
"binding_name_override": "#visible"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"export_progress@progress.modal_progress_panel_no_cancel": {
|
|
"$modal_screen_size": [ 204, 140 ],
|
|
"bindings": [
|
|
{
|
|
"binding_name": "#exporting",
|
|
"binding_name_override": "#visible"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"gamepad_helper_a@common.gamepad_helper_a": {
|
|
"anchor_from": "bottom_left",
|
|
"anchor_to": "bottom_left"
|
|
}
|
|
},
|
|
{
|
|
"gamepad_helper_b@common.gamepad_helper_b": {
|
|
"anchor_from": "bottom_right",
|
|
"anchor_to": "bottom_right"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|