{
  "anim_offset_in": {
    "anim_type": "offset",
    "from": "$y_offset_from",
    "to": "$y_offset_to",
    "duration": "$title_fade_in_time",
    "next": "@hud.anim_offset_wait"
  },
  "anim_offset_wait": {
    "anim_type": "wait",
    "duration": "$title_stay_time",
    "next": "@hud.anim_offset_out"
  },
  "anim_offset_out": {
    "anim_type": "offset",
    "from": "$y_offset_from_exit",
    "to": "$y_offset_to_exit",
    "duration": "$title_fade_out_time"
  },
  "black_image": {
    "type": "image",
    "texture": "textures/ui/Black",
    "layer": 110,
    "size": ["100%", "100%"],
    "anims": ["@hud.anim_offset_in"],
    "bindings": [
      {
        "binding_name": "#hud_title_text_string",
        "binding_type": "global"
      }, 
      {
        "binding_type": "view",
        "source_property_name": "(#hud_title_text_string = 'm_bars')",
        "target_property_name": "#visible"
      }
    ]
  },
  "bars_panel": {
    "type": "panel",
    "controls": [
      {"upper_bar_panel@hud.upper_bar_panel": {}}, 
      {"lower_bar_panel@hud.lower_bar_panel": {}}
    ]
  },
  "upper_bar_panel@hud.black_panel": {
    "size": ["140%", "20%"],
    "anchor_from": "top_middle",
    "anchor_to": "top_middle",
    "$y_offset_from": [0, "-100%y"],
    "$y_offset_to": [0, "0%y"],
    "$y_offset_from_exit": [0, "0%y"],
    "$y_offset_to_exit": [0, "-100%y"],
    "$offset": [0, "-40%"]
  },
  "lower_bar_panel@hud.black_panel": {
    "size": ["140%", "35%"],
    "anchor_from": "bottom_middle",
    "anchor_to": "bottom_middle",
    "$y_offset_from": [0, "100%y"],
    "$y_offset_to": [0, "50%y"],
    "$y_offset_from_exit": [0, "50%y"],
    "$y_offset_to_exit": [0, "100%y"],
    "$offset": [0, "40%"]
  },
  "black_panel": {
    "type": "panel",
    "controls": [
      {"black_image@hud.black_image": {}}, 
      {"up_or_bottom_image@hud.black_image": {"offset": "$offset"}}
    ]
  },
  "hud_title_bars": {
    "type": "panel",
    "factory": {
      "name": "hud_title_text_factory",
      "control_ids": {"hud_title_text": "bars_panel@hud.bars_panel"}
    }
  },
  "cursor_renderer": {
    "modifications": [
      {
        "array_name": "bindings",
        "operation": "insert_front",
        "value": {"binding_name": "#hud_title_text_string"}
      },
      {
        "array_name": "bindings",
        "operation": "insert_back",
        "value": {
          "binding_type": "view",
          "source_property_name": "(not (#hud_title_text_string = 'm_bars'))",
          "target_property_name": "#visible"
        }
      }
    ]
  },
  "mob_effects_renderer": {
    "modifications": [
      {
        "array_name": "bindings",
        "operation": "insert_front",
        "value": {"binding_name": "#hud_title_text_string"}
      },
      {
        "array_name": "bindings",
        "operation": "insert_back",
        "value": {
          "binding_type": "view",
          "source_property_name": "(not (#hud_title_text_string = 'm_bars'))",
          "target_property_name": "#visible"
        }
      }
    ]
  },
  "hud_player_renderer": {"ignored": true},
  "root_panel/chat_stack/paper_doll_padding": {"ignored": true},
  "root_panel/chat_stack/non_centered_gui_padding": {"ignored": true},
  "hud_actionbar_text": {
    "type": "image","size": ["100%c+2px","100%c+2px"],"visible": "$visible",
    "$visible|default": true,
    "variables": [{"requires": "($actionbar_text = 'm_fade')","$visible": false}],
    "anchor_from": "top_left","anchor_to": "top_left","offset": [2.09, 3],
    "texture": "textures/ui/hud_tip_text_background",
    "alpha": "@hud.anim_actionbar_text_background_alpha_out",
    "controls": [
      {
        "actionbar_message": {
          "type": "label",
          "anchor_from": "center",
          "anchor_to": "center",
          "color": "$tool_tip_text",
          "layer": 1,
          "text": "$actionbar_text",
          "localize": false,
          "alpha": "@hud.anim_actionbar_text_alpha_out"
        }
      }
    ]
  },
  "hud_actionbar_fade": {
    "type": "panel",
    "factory": {
      "name": "hud_actionbar_text_factory",
      "control_ids": {"hud_actionbar_text": "black@hud.black"}
    }
  },
  "black": {
    "type": "image",
    "texture": "textures/ui/Black",
    "ignored": "(not ($actionbar_text = 'm_fade'))",
    "alpha": "@hud.anim_fade_in",
    "size": ["150%", "150%"],"layer": 150
  },
  "anim_fade_in": {"anim_type": "alpha","from": 0,"to": 1,"duration": 0.5,"next": "@hud.anim_wait"},
  "anim_wait": {"anim_type": "wait","duration": 1,"next": "@hud.anim_fade_out"},
  "anim_fade_out": {"anim_type": "alpha","from": 1,"to": 0,"duration": 0.5},
  "root_panel": {
    "modifications": [
      {
        "array_name": "controls",
        "operation": "insert_front",
        "value": {"hud_actionbar_fade@hud.hud_actionbar_fade": {}}
      },
      {
        "array_name": "controls",
        "operation": "insert_front",
        "value": {"hud_title_bars@hud.hud_title_bars": {}}
      }
    ]
  },
  "hud_title_text/title_frame/title": {
    "modifications": [
      {
        "array_name": "bindings","operation": "insert_back",
        "value": {
          "binding_type": "view",
          "source_property_name": "((#text - 'm_') = #text)",
          "target_property_name": "#visible"
        }
      }
    ]
  },
  "player_position": {
    "type": "image","anchor_from": "bottom_middle","anchor_to": "bottom_middle",
    "size": [ "100%c + 6px", "100%c + 2px" ],"texture": "textures/ui/Black","alpha": 0.0,
    "controls": [
      {
        "player_position_text": {
          "type": "label",
          "anchor_from": "bottom_middle",
          "anchor_to": "bottom_middle",
          "offset": [ -45, 16 ],
          "layer": 1,
          "enable_profanity_filter": false,
          "color": "$chat_text_color",
          "text": "#text",
          "shadow": true,
          "bindings": [
            {
              "binding_name": "#player_position_text",
              "binding_name_override": "#text",
              "binding_condition": "always_when_visible",
              "binding_type": "global"
            }
          ]
        }
      }
    ],
    "bindings": [
      {
        "binding_name": "#player_position_visible",
        "binding_name_override": "#visible",
        "binding_condition": "always",
        "binding_type": "global"
      }
    ]
  },
  "chat_grid_item": {
    "type": "panel","layer": 1,"size": [ "100%-2px", "100%c" ],
    "anchor_from": "top_left","anchor_to": "top_left","offset": [ 2, 20 ],
    "controls": [
      {
        "chat_background": {
          "type": "image",
          "texture": "textures/ui/Black","alpha": 0.7,
          "size": [ "100%", "100%c" ],"offset": [ 2, 20 ],
          "anims": ["@hud.anim_chat_bg_wait"],
          "controls": [{"chat_text@chat_label": {"anchor_from": "top_left","anchor_to": "top_left"}}]
        }
      }
    ]
  },
  "chat_panel": {
    "type": "panel","anchor_from": "top_left","anchor_to": "top_left","offset": [ 2, 150 ],"size": [ "100%", "100%c" ],"max_size": [ "100%", "50%" ],
    "controls": [
      {
        "stack_panel": {
          "type": "stack_panel","anchor_from": "bottom_left","anchor_to": "bottom_left",
          "factory": {
            "name": "chat_item_factory","max_children_size": 6,
            "control_ids": {"chat_item": "chat_item@hud.chat_grid_item"}
          }
        }
      }
    ]
  }
}