示例#1
0
    public IGUI GUI()
    {
        IGUI res = this;

        GUILayout.BeginArea(new Rect(Screen.width * 0.2f, Screen.height * 0.2f, Screen.width * 0.6f, Screen.height * 0.7f));

        GUILayout.BeginVertical();

        GUILayout.Label("Musiques", Styles.LabelNormal(20, Styles.Texte1));

        GUILayout.Space(Screen.height * 0.05f);

        GUILayout.Label("Epic Presentation by AShamaluevMusic (https://www.ashamaluevmusic.com)", Styles.LabelNormal(15, Styles.Texte2));
        GUILayout.Label("Cinematic Light by AShamaluevMusic  (https://www.ashamaluevmusic.com)", Styles.LabelNormal(15, Styles.Texte2));
        GUILayout.Label("Cinematic Dupstep by AShamaluevMusic (https://www.ashamaluevmusic.com)", Styles.LabelNormal(15, Styles.Texte2));
        GUILayout.Space(Screen.height * 0.1f);

        GUILayout.Label("Polices", Styles.LabelNormal(20, Styles.Texte1));
        GUILayout.Space(Screen.height * 0.05f);

        GUILayout.Label("HarryPotter7 (https://fr.fonts2u.com/harrypotter7.police)", Styles.LabelNormal(15, Styles.Texte2));



        if (GUILayout.Button("Retour", Styles.ButtonNormal(20, Styles.Texte1)))
        {
            res = new GUI_MenuPrincipal();
        }

        GUILayout.EndVertical();


        GUILayout.EndArea();

        return(res);
    }
示例#2
0
    public IGUI GUI()
    {
        Gestionnaire gestionnaire = Session.Instance.Partie.Gestionnaire;
        IGUI         res          = this;

        GUILayout.BeginArea(new Rect(Screen.width * 0.2f, Screen.height * 0.2f, Screen.width * 0.6f, Screen.height * 0.6f));

        Competition competition = gestionnaire.Competitions[_id];

        GUILayout.BeginVertical();

        GUILayout.BeginHorizontal();

        //Competition

        if (GUILayout.Button(Styles.FlecheGauche(), GUILayout.Width(40), GUILayout.Height(40)))
        {
            if (_id > 0)
            {
                _id--;
            }
            _competition = gestionnaire.Competitions[_id];
            _clubs       = new List <Club>();
            foreach (Tour t in _competition.Tours)
            {
                foreach (Club c in t.Clubs)
                {
                    _clubs.Add(c);
                }
            }
        }

        GUILayout.BeginVertical();
        GUILayout.Label("Compétition", Styles.LabelNormal(30, Styles.Texte2), GUILayout.Width(Screen.width * 0.25f));
        GUILayout.Label(Resources.Load("Logos/" + competition.Logo) as Texture, GUILayout.Width(240), GUILayout.Height(240));
        GUILayout.Label(competition.Nom, Styles.LabelNormal(20, Styles.Texte1));
        GUILayout.EndVertical();

        if (GUILayout.Button(Styles.FlecheDroite(), GUILayout.Width(40), GUILayout.Height(40)))
        {
            if (_id < (gestionnaire.Competitions.Count - 1))
            {
                _id++;
            }
            _competition = gestionnaire.Competitions[_id];
            _clubs       = new List <Club>();
            foreach (Tour t in _competition.Tours)
            {
                foreach (Club c in t.Clubs)
                {
                    _clubs.Add(c);
                }
            }
        }

        //Equipes


        if (GUILayout.Button(Styles.FlecheGauche(), GUILayout.Width(40), GUILayout.Height(40)))
        {
            if (_idClub > 0)
            {
                _idClub--;
            }
        }

        if (_clubs.Count > 0)
        {
            GUILayout.BeginVertical();
            GUILayout.Label("Club", Styles.LabelNormal(30, Styles.Texte2), GUILayout.Width(Screen.width * 0.25f));
            GUILayout.Label(Resources.Load("Logos/" + _clubs[_idClub].Logo) as Texture, GUILayout.Width(240), GUILayout.Height(240));
            GUILayout.Label(_clubs[_idClub].Nom, Styles.LabelNormal(20, Styles.Texte1));
            Styles.AfficherEtoiles(_clubs[_idClub]);
            GUILayout.EndVertical();
        }


        if (GUILayout.Button(Styles.FlecheDroite(), GUILayout.Width(40), GUILayout.Height(40)))
        {
            if (_idClub < (_clubs.Count - 1))
            {
                _idClub++;
            }
        }

        GUILayout.BeginHorizontal();

        if (GUILayout.Button("Commencer", Styles.ButtonNormal(20, Styles.Texte2), GUILayout.Width(Screen.width * 0.2f)))
        {
            Session.Instance.Partie.Club = _clubs[_idClub];
            res = new GUI_AcceuilCompetition();
        }

        if (GUILayout.Button("Revenir", Styles.ButtonNormal(20, Styles.Texte2), GUILayout.Width(Screen.width * 0.2f)))
        {
            res = new GUI_MenuPrincipal();
        }
        GUILayout.EndHorizontal();

        GUILayout.EndHorizontal();



        GUILayout.EndVertical();

        GUILayout.EndArea();

        return(res);
    }