type = fancymenu_layout

layout-meta {
  identifier = title_screen
  render_custom_elements_behind_vanilla = true
}

customization {
  action = backgroundoptions
  keepaspectratio = true
}

vanilla_button {
  instance_identifier = minecraft_logo_widget
  anchor_point = top-centered
  x = -127
  y = 33
}

vanilla_button {
  instance_identifier = minecraft_splash_widget
  anchor_point = element
  anchor_point_element = minecraft_logo_widget
  x = 211
  y = 15
}

vanilla_button {
  instance_identifier = mc_titlescreen_singleplayer_button
  anchor_point = mid-centered
  width = 148
  height = 30
  x = -74
  y = -25
  label = {"placeholder":"local","values":{"key":"mco.selectServer.play"}}
}

vanilla_button {
  instance_identifier = mc_titlescreen_options_button
  anchor_point = element
  anchor_point_element = mc_titlescreen_singleplayer_button
  width = 148
  height = 30
  y = 31
}

vanilla_button {
  instance_identifier = mc_titlescreen_multiplayer_button
  anchor_point = element
  anchor_point_element = mc_titlescreen_options_button
  width = 148
  height = 30
  y = 31
  label = {"placeholder":"local","values":{"key":"key.category.minecraft.multiplayer"}}
  backgroundnormal = [source:location]fancymenu:textures/widget/purple_button.png
  backgroundhovered = [source:location]fancymenu:textures/widget/purple_button_highlighted.png
  nine_slice_custom_background = true
  nine_slice_border_x = 3
  nine_slice_border_y = 3
}

element {
  instance_identifier = 0
  element_type = custom_button
  anchor_point = element
  anchor_point_element = mc_titlescreen_multiplayer_button
  width = 148
  height = 30
  y = 31
  backgroundnormal = [source:location]fancymenu:textures/widget/marketplace/banner.gif
  backgroundhovered = [source:location]fancymenu:textures/widget/marketplace/banner_hover.gif
  label = {"placeholder":"local","values":{"key":"bedrockreloaded.menu_shop"}}
  [executable_action_instance:1][action_type:mimicbutton] = pack_selection_screen:69510
  [executable_block:2][type:generic] = [executables:1;]
}

element {
  element_type = image
  anchor_point = element
  anchor_point_element = 0
  width = 31
  height = 14
  x = 127
  source = [source:location]fancymenu:textures/icon/flag.png
}

element {
  instance_identifier = 3
  element_type = custom_button
  anchor_point = bottom-left
  width = 25
  height = 25
  x = 5
  y = -55
  description = {"placeholder":"local","values":{"key":"bedrockreloaded.realms"}}
  [executable_action_instance:4][action_type:opengui] = realms_pending_invites_screen
  [executable_block:5][type:generic] = [executables:4;]
}

element {
  element_type = image
  anchor_point = element
  anchor_point_element = 3
  width = 16
  height = 16
  x = 5
  y = 5
  source = [source:location]minecraft:textures/gui/sprites/icon/invite.png
}

element {
  instance_identifier = 6
  element_type = custom_button
  anchor_point = bottom-left
  width = 25
  height = 25
  x = 35
  y = -55
  [executable_action_instance:7][action_type:opengui] = net.hicham.screenshotgallery.gui.GalleryScreen
  [executable_block:8][type:generic] = [executables:7;]
}

element {
  element_type = image
  anchor_point = element
  anchor_point_element = 6
  width = 18
  height = 17
  x = 4
  y = 4
  source = [source:location]fancymenu:textures/icon/gallery.png
}

element {
  element_type = fancymenu_customization_item_ticker
  anchor_point = element
  anchor_point_element = 27
  x = 5
  y = -40
  width = 40
  height = 24
  element_loading_requirement_container_identifier = 30
  [loading_requirement_container_meta:30] = [groups:][instances:]
  tick_delay = 10
  ticker_element_executable_block_identifier = 11
  [executable_action_instance:12][action_type:set_variable] = is_dragging_player:true
  [executable_action_instance:13][action_type:set_variable] = mouse_drag_start_x:{"placeholder":"mouseposx"}
  [executable_action_instance:14][action_type:set_variable] = initial_player_rotation_y:{"placeholder":"getvariable","values":{"name":"player_rotation_y"}}
  [executable_block:15][type:if] = [executables:12;13;14;][appended:16]
  [executable_action_instance:17][action_type:set_variable] = player_rotation_y:{"placeholder":"calc","values":{"decimal":"false","expression":"{"placeholder":"getvariable","values":{"name":"initial_player_rotation_y"}} + ({"placeholder":"mouseposx"} - {"placeholder":"getvariable","values":{"name":"mouse_drag_start_x"}}) * -5"}}
  [executable_block:16][type:else-if] = [executables:17;][appended:18]
  [executable_action_instance:19][action_type:set_variable] = is_dragging_player:false
  [executable_block:18][type:else] = [executables:19;]
  [else_if_executable_block_body:16] = 20
  [loading_requirement_container_meta:20] = [groups:group_21;][instances:]
  [loading_requirement_group:group_21] = [group_mode:and]
  [loading_requirement:fancymenu_visibility_requirement_is_variable_value][requirement_mode:if][group:group_21][req_id:22] = is_dragging_player:true
  [loading_requirement:mouse_click][requirement_mode:if][group:group_21][req_id:23] = left
  [if_executable_block_body:15] = 24
  [loading_requirement_container_meta:24] = [groups:group_25;][instances:]
  [loading_requirement_group:group_25] = [group_mode:and]
  [loading_requirement:fancymenu_visibility_requirement_is_element_hovered][requirement_mode:if][group:group_25][req_id:26] = 27
  [loading_requirement:mouse_click][requirement_mode:if][group:group_25][req_id:28] = left
  [loading_requirement:fancymenu_visibility_requirement_is_variable_value][requirement_mode:if][group:group_25][req_id:29] = is_dragging_player:false
  [executable_block:11][type:generic] = [executables:15;]
}

element {
  instance_identifier = 27
  element_type = player_entity_v2
  anchor_point = element
  anchor_point_element = 28
  width = 51
  height = 72
  x = 14
  y = -83
  copy_client_player = true
  head_follows_mouse = true
  body_follows_mouse = false
  bodyrotationy = {"placeholder":"getvariable","values":{"name":"player_rotation_y"}}
}

element {
  instance_identifier = 28
  element_type = custom_button
  anchor_point = bottom-right
  width = 82
  height = 25
  x = -120
  y = -64
  [executable_action_instance:31][action_type:mimicbutton] = options_screen:345115
  [executable_block:32][type:generic] = [executables:31;]
  label = {"placeholder":"local","values":{"key":"bedrockreloaded.menu_skin"}}
}

element {
  element_type = shape
  anchor_point = bottom-left
  advanced_width = {"placeholder":"calc","values":{"expression":"{"placeholder":"elementwidth","values":{"id":"title_screen_copyright_button"}} + 3","decimal":"true"}}
  advanced_height = {"placeholder":"calc","values":{"expression":"{"placeholder":"elementheight","values":{"id":"title_screen_copyright_button"}} + 4","decimal":"true"}}
  advanced_posx = {"placeholder":"calc","values":{"expression":"{"placeholder":"elementposx","values":{"id":"title_screen_copyright_button"}} - 1","decimal":"true"}}
  advanced_posy = {"placeholder":"calc","values":{"expression":"{"placeholder":"elementposy","values":{"id":"title_screen_copyright_button"}} - 2","decimal":"true"}}
  color = #00000090
  stay_on_screen = false
}

vanilla_button {
  instance_identifier = title_screen_copyright_button
  anchor_point = bottom-left
  x = 1
  y = -10
  stay_on_screen = false
}

element {
  element_type = shape
  anchor_point = bottom-right
  advanced_width = {"placeholder":"calc","values":{"expression":"{"placeholder":"elementwidth","values":{"id":"29"}} + 8","decimal":"true"}}
  advanced_height = {"placeholder":"calc","values":{"expression":"{"placeholder":"elementheight","values":{"id":"29"}} + 4","decimal":"true"}}
  advanced_posx = {"placeholder":"calc","values":{"expression":"{"placeholder":"elementposx","values":{"id":"29"}} + 2","decimal":"true"}}
  advanced_posy = {"placeholder":"calc","values":{"expression":"{"placeholder":"elementposy","values":{"id":"29"}} + 1","decimal":"true"}}
  color = #00000090
}

element {
  instance_identifier = 29
  element_type = text_v2
  anchor_point = bottom-right
  x = -45
  y = -13
  source = v{"placeholder":"mcversion"}
  source_mode = direct
  enable_scrolling = false
  stay_on_screen = false
}

vanilla_button {
  instance_identifier = 604382
  is_hidden = true
}

vanilla_button {
  instance_identifier = 604298
  is_hidden = true
}

vanilla_button {
  instance_identifier = 376382
  is_hidden = true
}

vanilla_button {
  instance_identifier = mc_titlescreen_realms_button
  is_hidden = true
}

vanilla_button {
  instance_identifier = mc_titlescreen_quit_button
  is_hidden = true
}

vanilla_button {
  instance_identifier = minecraft_branding_widget
  is_hidden = true
}

vanilla_button {
  instance_identifier = minecraft_realms_notification_icons_widget
  is_hidden = true
}