{
  "namespace": "gamma_calibration",


  "stack_panel_centering_panel": {
    "type": "panel",
    "$control_name|default": "common.empty_panel",
    "controls": [
      {
        "child@$control_name": {
          "anchor_from": "center",
          "anchor_to": "center"
        }
      }
    ]
  },

  "stack_panel_align_left_panel": {
    "type": "panel",
    "$control_name|default": "common.empty_panel",
    "controls": [
      {
        "child@$control_name": {
          "anchor_from": "left_middle",
          "anchor_to": "left_middle"
        }
      }
    ]
  },

  "stack_panel_align_right_panel": {
    "type": "panel",
    "$control_name|default": "common.empty_panel",
    "controls": [
      {
        "child@$control_name": {
          "anchor_from": "right_middle",
          "anchor_to": "right_middle"
        }
      }
    ]
  },

  "image_panel": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "33.3333% - 10.66667px", "100%c" ],
    "$image_label|default": "",
    "controls": [
      {
        "padding": {
          "type": "panel",
          "size": [ "100%", 10 ]
        }
      },
      {
        "image": {
          "type": "image",
          "texture": "$texture_name",
          "size": [ "100%", "100%x" ],
          "color_corrected": true
        }
      }
    ]
  },

  "horizontal_padding": {
    "type": "panel",
    "size": [ 16, 0 ]
  },

  "image_stack": {
    "type": "stack_panel",
    "size": "$image_panel_size",
    "orientation": "horizontal",
    "controls": [
      {
        "not_visible_image@gamma_calibration.image_panel": {
          "$texture_name": "textures/ui/not_visible_creeper"
        }
      },
      {
        "padding_0@gamma_calibration.horizontal_padding": {}
      },
      {
        "barely_visible_image@gamma_calibration.image_panel": {
          "$texture_name": "textures/ui/barely_visible_creeper"
        }
      },
      {
        "padding_1@gamma_calibration.horizontal_padding": {}
      },
      {
        "easily_visible_image@gamma_calibration.image_panel": {
          "$texture_name": "textures/ui/easily_visible_creeper"
        }
      }
    ]
  },

  "button_stack": {
    "type": "stack_panel",
    "orientation": "horizontal",
    "size": "$image_panel_size",
    "controls": [
      {
        "continue_button_panel@gamma_calibration.stack_panel_align_left_panel": {
          "$control_name": "gamma_calibration.continue_button",
          "size": [ "37%", "100%c" ]
        }
      },
      {
        "padding": {
          "type": "panel",
          "size": [ "3%", 10 ]
        }
      },
      {
        "reset_button_panel@gamma_calibration.stack_panel_align_right_panel": {
          "$control_name": "gamma_calibration.reset_button",
            "size": [ "60%", "100%c" ]
        }
      }
    ]
  },

  "message_panel": {
    "type": "panel",
    "controls": [
      {
        "message_label": {
          "size": [ "default", "default" ],
          "max_size": [ "100%", "100%" ],
          "type": "label",
          "color": "$body_text_color",
          "text": "options.adjustGamma"
        }
      }
    ]
  },

  "calibration_slider": {
    "type": "panel",
    "size": [ "100% - 2px", 30 ],
    "$default_focus_precedence": 1,
    "controls": [
      {
        "slider@settings_common.option_slider": {
          "size": "$slider_size",
          "$option_label_alignment": "center",
          "$slider_select_on_hover": true,
          "$option_label": "#gamma_calibration_slider_label",
          "$slider_name": "gamma_calibration",
          "$slider_value_binding_name": "#gamma_calibration",
          "$slider_tts_text_value": "#gamma_calibration_text_value",
          "$option_enabled_binding_name": "#gamma_calibration_enabled",
          "$label_bindings": [
            {
              "binding_name": "$option_label"
            }
          ]
        }
      }
    ]
  },

  "continue_button@common_buttons.light_text_button": {
    "size": [ "100%", 30 ],
    "$pressed_button_name": "button.continue",
    "$button_text": "gui.continue"
  },

  "reset_button@common_buttons.light_text_button": {
    "size": [ "100%", 30 ],
    "$pressed_button_name": "button.reset_settings",
    "$button_text": "options.resetSettings"
  },

  "main_panel": {
    "type": "stack_panel",
    "orientation": "vertical",
    "size": [ "100%", "100%c" ],
    "layer": 1,
    "variables": [
      {
        "requires": "($pocket_screen)",
        "$padding_between_button_size": [ "100%", 6 ],
        "$image_panel_size": [ 192, "33.3333%c" ]
      },
      {
        "requires": "$desktop_screen",
        "$padding_between_button_size": [ "100%", 12 ],
        "$image_panel_size": [ 248, "33.3333%c" ]
      }
    ],
    "controls": [
      {
        "hdr_message_panel@gamma_calibration.stack_panel_centering_panel": {
          "$control_name": "gamma_calibration.message_panel",
          "size": [ "100%", 30 ]
        }
      },
      {
        "image_stack_panel@gamma_calibration.stack_panel_centering_panel": {
          "$control_name": "gamma_calibration.image_stack",
          "size": [ "100%", "100%c" ]
        }
      },
      {
        "padding_0": {
          "type": "panel",
          "size": [ "100%", 16 ]
        }
      },
      {
        "slider_panel@gamma_calibration.stack_panel_centering_panel": {
          "$control_name": "gamma_calibration.calibration_slider",
          "size": [ "100%", "100%c" ],
          "variables": [
            {
              "requires": "($pocket_screen)",
              "$slider_size": [ 162, 10 ]
            },
            {
              "requires": "$desktop_screen",
              "$slider_size": [ 218, 10 ]
            }
          ]
        }
      },
      {
        "padding_1": {
          "type": "panel",
          "size": "$padding_between_button_size"
        }
      },
      {
        "button_stack_panel@gamma_calibration.stack_panel_centering_panel": {
            "$control_name": "gamma_calibration.button_stack",
            "size": [ "100%", "100%c" ]
        }
      }
    ]
  },

  "gamma_calibration_screen@common.base_screen": {
    "$screen_content": "gamma_calibration.main_panel"
  }

}
