<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:clipChildren="false"
    tools:ignore="RtlHardcoded,RtlSymmetry">

    <com.metallic.chiaki.touchcontrols.ControlsBackgroundView
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/centerGuideline"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintGuide_percent="0.5"
        android:orientation="vertical" />

    <com.metallic.chiaki.touchcontrols.AnalogStickView
        android:id="@+id/leftAnalogStickView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toLeftOf="@id/centerGuideline"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@id/dpadView"
        app:radius="@dimen/control_analog_stick_radius"
        app:handleRadius="@dimen/control_analog_stick_handle_radius"
        app:drawableBase="@drawable/control_analog_stick_base"
        app:drawableHandle="@drawable/control_analog_stick_handle"
        />

    <com.metallic.chiaki.touchcontrols.AnalogStickView
        android:id="@+id/rightAnalogStickView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintLeft_toRightOf="@id/centerGuideline"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintTop_toBottomOf="@id/faceButtonsLayout"
        app:radius="@dimen/control_analog_stick_radius"
        app:handleRadius="@dimen/control_analog_stick_handle_radius"
        app:drawableBase="@drawable/control_analog_stick_base"
        app:drawableHandle="@drawable/control_analog_stick_handle"
        />

    <com.metallic.chiaki.touchcontrols.TouchpadView
        android:id="@+id/touchpadView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:drawableIdle="@drawable/control_touchpad"
        app:drawablePressed="@drawable/control_touchpad_pressed"
        android:layout_marginTop="32dp"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintWidth_max="300dp"
        app:layout_constraintDimensionRatio="1920:942"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"/>

    <com.metallic.chiaki.touchcontrols.DPadView
        android:id="@+id/dpadView"
        android:layout_width="160dp"
        android:layout_height="160dp"
        android:padding="16dp"
        android:layout_marginLeft="16dp"
        android:layout_marginBottom="16dp"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent" />

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/faceButtonsLayout"
        android:layout_width="@dimen/control_face_button_size_full"
        android:layout_height="@dimen/control_face_button_size_full"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        android:layout_marginBottom="32dp"
        android:layout_marginRight="32dp">

        <com.metallic.chiaki.touchcontrols.ButtonView
            android:id="@+id/crossButtonView"
            android:layout_width="@dimen/control_face_button_size_full"
            android:layout_height="@dimen/control_face_button_size_half"
            android:paddingLeft="@dimen/control_face_button_padding_to_full"
            android:paddingRight="@dimen/control_face_button_padding_to_full"
            android:paddingTop="@dimen/control_face_button_padding_to_center"
            android:paddingBottom="@dimen/control_face_button_padding_to_outside"
            app:drawableIdle="@drawable/control_button_cross"
            app:drawablePressed="@drawable/control_button_cross_pressed"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"/>

        <com.metallic.chiaki.touchcontrols.ButtonView
            android:id="@+id/moonButtonView"
            android:layout_width="@dimen/control_face_button_size_half"
            android:layout_height="@dimen/control_face_button_size_full"
            android:paddingTop="@dimen/control_face_button_padding_to_full"
            android:paddingBottom="@dimen/control_face_button_padding_to_full"
            android:paddingLeft="@dimen/control_face_button_padding_to_center"
            android:paddingRight="@dimen/control_face_button_padding_to_outside"
            app:drawableIdle="@drawable/control_button_moon"
            app:drawablePressed="@drawable/control_button_moon_pressed"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent"/>

        <com.metallic.chiaki.touchcontrols.ButtonView
            android:id="@+id/pyramidButtonView"
            android:layout_width="@dimen/control_face_button_size_full"
            android:layout_height="@dimen/control_face_button_size_half"
            android:paddingLeft="@dimen/control_face_button_padding_to_full"
            android:paddingRight="@dimen/control_face_button_padding_to_full"
            android:paddingBottom="@dimen/control_face_button_padding_to_center"
            android:paddingTop="@dimen/control_face_button_padding_to_outside"
            app:drawableIdle="@drawable/control_button_pyramid"
            app:drawablePressed="@drawable/control_button_pyramid_pressed"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent"/>

        <com.metallic.chiaki.touchcontrols.ButtonView
            android:id="@+id/boxButtonView"
            android:layout_width="@dimen/control_face_button_size_half"
            android:layout_height="@dimen/control_face_button_size_full"
            android:paddingTop="@dimen/control_face_button_padding_to_full"
            android:paddingBottom="@dimen/control_face_button_padding_to_full"
            android:paddingRight="@dimen/control_face_button_padding_to_center"
            android:paddingLeft="@dimen/control_face_button_padding_to_outside"
            app:drawableIdle="@drawable/control_button_box"
            app:drawablePressed="@drawable/control_button_box_pressed"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintBottom_toBottomOf="parent" />

    </androidx.constraintlayout.widget.ConstraintLayout>


    <com.metallic.chiaki.touchcontrols.ButtonView
        android:id="@+id/l3ButtonView"
        android:layout_width="64dp"
        android:layout_height="64dp"
        app:drawableIdle="@drawable/control_button_l3"
        app:drawablePressed="@drawable/control_button_l3_pressed"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"/>

    <com.metallic.chiaki.touchcontrols.ButtonView
        android:id="@+id/r3ButtonView"
        android:layout_width="64dp"
        android:layout_height="64dp"
        app:drawableIdle="@drawable/control_button_r3"
        app:drawablePressed="@drawable/control_button_r3_pressed"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"/>


    <com.metallic.chiaki.touchcontrols.ButtonView
        android:id="@+id/psButtonView"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:padding="8dp"
        app:drawableIdle="@drawable/control_button_home"
        app:drawablePressed="@drawable/control_button_home_pressed"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"/>


    <com.metallic.chiaki.touchcontrols.ButtonView
        android:id="@+id/l2ButtonView"
        android:layout_width="88dp"
        android:layout_height="80dp"
        android:paddingTop="8dp"
        android:paddingBottom="8dp"
        android:paddingRight="8dp"
        android:paddingLeft="16dp"
        app:drawableIdle="@drawable/control_button_l2"
        app:drawablePressed="@drawable/control_button_l2_pressed"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <com.metallic.chiaki.touchcontrols.ButtonView
        android:id="@+id/l1ButtonView"
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:padding="8dp"
        android:layout_marginTop="32dp"
        android:layout_marginLeft="40dp"
        app:drawableIdle="@drawable/control_button_l1"
        app:drawablePressed="@drawable/control_button_l1_pressed"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <com.metallic.chiaki.touchcontrols.ButtonView
        android:id="@+id/shareButtonView"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:padding="8dp"
        android:layout_marginLeft="32dp"
        app:drawableIdle="@drawable/control_button_share"
        app:drawablePressed="@drawable/control_button_share_pressed"
        app:layout_constraintLeft_toRightOf="@id/l2ButtonView"
        app:layout_constraintTop_toTopOf="parent"/>

    <com.metallic.chiaki.touchcontrols.ButtonView
        android:id="@+id/r2ButtonView"
        android:layout_width="88dp"
        android:layout_height="80dp"
        android:paddingTop="8dp"
        android:paddingRight="16dp"
        android:paddingLeft="8dp"
        android:paddingBottom="8dp"
        app:drawableIdle="@drawable/control_button_r2"
        app:drawablePressed="@drawable/control_button_r2_pressed"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <com.metallic.chiaki.touchcontrols.ButtonView
        android:id="@+id/r1ButtonView"
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:padding="8dp"
        android:layout_marginTop="32dp"
        android:layout_marginRight="40dp"
        app:drawableIdle="@drawable/control_button_r1"
        app:drawablePressed="@drawable/control_button_r1_pressed"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <com.metallic.chiaki.touchcontrols.ButtonView
        android:id="@+id/optionsButtonView"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:padding="8dp"
        android:layout_marginRight="32dp"
        app:drawableIdle="@drawable/control_button_options"
        app:drawablePressed="@drawable/control_button_options_pressed"
        app:layout_constraintRight_toLeftOf="@id/r2ButtonView"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>