package ch.spherIC.recurvebowsight.ui.userguide;

import android.os.Bundle;
import android.view.MenuItem;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import ch.spherIC.recurvebowsight.R;
import ch.spherIC.recurvebowsight.databinding.ActivityUserGuideSightBinding;

public class UserGuideSightActivity extends AppCompatActivity {

    private ActivityUserGuideSightBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_guide_sight);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setTitle(R.string.menu_userguide);

        this.binding = ActivityUserGuideSightBinding.bind(findViewById(R.id.activity_ug_sight));

        TextView aV = findViewById(R.id.ugSightAV);
        TextView aH = findViewById(R.id.ugSightAH);
        TextView heVis = findViewById(R.id.ugSightHeVis);
        TextView minRngVertScale = findViewById(R.id.ugMinRngVertScale);
        TextView maxRngVertScale = findViewById(R.id.ugMaxRngVertScale);
        TextView vertSkalaMiddle = findViewById(R.id.ugVertSkalaMiddle);
        TextView evs = findViewById(R.id.ugEvS);
        TextView pointerOffset = findViewById(R.id.ugPointerOffset);

        aV.setText("1. " + aV.getText());
        aH.setText("2. " + aH.getText());
        heVis.setText("3. " + heVis.getText());
        minRngVertScale.setText("4. " + minRngVertScale.getText());
        maxRngVertScale.setText("5. " + maxRngVertScale.getText());
        vertSkalaMiddle.setText("6. " + vertSkalaMiddle.getText());
        evs.setText("7. " + evs.getText());
        pointerOffset.setText("8. " + pointerOffset.getText());
    }

    @Override
    public boolean onOptionsItemSelected(@NonNull MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                this.finish();
                return true;
        }
        return super.onOptionsItemSelected(item);
    }
}