package macampcorp.macamp.activities;

import android.app.Activity;
import android.app.IntentService;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Html;
import android.widget.TextView;

import macampcorp.macamp.game.Game;
import macampcorp.macamp.utils.FontChangeCrawler;

public class CreditsActivity extends AppCompatActivity {

    private TextView mText;
    private static final String CREDITS="<h1> Credits </h1>\n" +
            "Ce jeux a été initié par la médiathèque Ma Campagne ainsi que le CSCS Louis Aragon\n" +
            "\n" +
            "<h2> Scénario </h2>\n" +
            "- <br>\n" +
            "- <br>\n" +
            "- <br>\n" +
            "\n" +
            "<h2> Réalisation des énigmes </h2>\n" +
            "- Quentin Bourgois<br>\n" +
            "- François Gautrais (RIB)<br>\n" +
            "\n" +
            "<h2> Son </h2>\n" +
            "- Romain : Le chasseur de monstre<br>\n" +
            "- Quentin Bourgois<br>\n" +
            "\n" +
            "<h2> Programmation </h2>\n" +
            "- François Gautrais (RIB)<br>\n" +
            "\n";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_credits);
        mText = (TextView) findViewById(R.id.tv_credits);
        if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.N) {
            mText.setText(Html.fromHtml(CREDITS));
        }else
        {
            mText.setText(Html.fromHtml(CREDITS, Html.FROM_HTML_MODE_COMPACT));
        }
    }

    public static final int REQUEST_CODE = 23;

    public static void start(Activity v)
    {
        Intent in = new Intent(v, CreditsActivity.class);
        v.startActivityForResult(in, REQUEST_CODE);
    }
}
