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.6f)); GUILayout.BeginVertical(); if (GUILayout.Button("Revenir", Styles.ButtonNormal(20, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f))) { res = new GUI_AcceuilCompetition(); } GUILayout.Space(Screen.height * 0.1f); _toggle = GUILayout.Toggle(_toggle, "Simuler les matchs", Styles.ToggleNormal(20, Styles.Texte1)); GUILayout.Space(Screen.height * 0.05f); if (GUILayout.Button("Valider", Styles.ButtonNormal(20, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f))) { Session.Instance.Partie.Options.SimulerMatchs = _toggle; res = new GUI_AcceuilCompetition(); } GUILayout.EndVertical(); GUILayout.EndArea(); return(res); }
public IGUI GUI() { IGUI res = this; _ecart = 0.05f; GUILayout.BeginArea(new Rect(Screen.width * 0.3f, Screen.height * 0.2f, Screen.width * 0.3f, Screen.height * 0.6f)); GUILayout.BeginVertical(); GUILayout.Label("Quidditch 2019", Styles.LabelNormal(45, new Color(0.3f, 0.2f, 0))); GUILayout.Space(Screen.height * 0.075f); if (GUILayout.Button("Match rapide", Styles.ButtonNormal(30, Styles.Texte2), GUILayout.Width(Screen.width * 0.2f))) { res = new GUI_ChoixEquipes(); } GUILayout.Space(Screen.height * _ecart); if (GUILayout.Button("Compétition", Styles.ButtonNormal(30, Styles.Texte2), GUILayout.Width(Screen.width * 0.2f))) { res = new GUI_ChoixCompetitions(); } GUILayout.Space(Screen.height * _ecart); if (GUILayout.Button("Carrière", Styles.ButtonNormal(30, Styles.Texte2), GUILayout.Width(Screen.width * 0.2f))) { res = new GUI_ChoixCompetitions(); } GUILayout.Space(Screen.height * _ecart * 4); if (GUILayout.Button("Credits & Copyrights", Styles.ButtonNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.15f))) { res = new GUI_Copyright(); } GUILayout.EndVertical(); GUILayout.EndArea(); return(res); }
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.6f)); GUILayout.BeginVertical(); GUILayout.Label("Joueurs", Styles.LabelNormal(20, Styles.Texte1)); GUILayout.Space(Screen.height * 0.03f); foreach (Joueur j in _club.Joueurs) { GUILayout.BeginHorizontal(); GUILayout.Label(j.Prenom, Styles.LabelNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f)); GUILayout.Label(j.Nom, Styles.LabelNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f)); GUILayout.Label(j.Poste.ToString(), Styles.LabelNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f)); GUILayout.Label(j.Niveau.ToString("0.0"), Styles.LabelNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.05f)); GUILayout.EndHorizontal(); } GUILayout.Space(Screen.height * 0.03f); if (GUILayout.Button("Revenir", Styles.ButtonNormal(20, Styles.Texte2), GUILayout.Width(Screen.width * 0.2f))) { res = new GUI_AcceuilCompetition(); } GUILayout.EndVertical(); GUILayout.EndArea(); return(res); }
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); }
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.6f)); GUILayout.BeginVertical(); GUILayout.Label(_joueur.Prenom + " " + _joueur.Nom, Styles.LabelNormal(25, Styles.Texte1)); if (_joueur.Club != null) { GUILayout.BeginHorizontal(); GUILayout.Label(_joueur.Club.Nom, Styles.LabelNormal(18, Styles.Texte2)); Styles.AfficherLogo(_joueur.Club.Logo, 30, Screen.width * 0.05f); GUILayout.EndHorizontal(); } GUILayout.Label("Poste : " + _joueur.Poste.ToString(), Styles.LabelNormal(18, Styles.Texte2)); GUILayout.Label("Précision : " + _joueur.Precision.ToString(), Styles.LabelNormal(18, Styles.Texte2)); GUILayout.Label("Vitesse : " + _joueur.Vitesse.ToString(), Styles.LabelNormal(18, Styles.Texte2)); if (GUILayout.Button("Revenir", Styles.ButtonNormal(20, Styles.Texte2), GUILayout.Width(Screen.width * 0.2f))) { res = new GUI_AcceuilCompetition(); } GUILayout.EndVertical(); GUILayout.EndArea(); return(res); }
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.7f)); GUILayout.BeginVertical(); GUILayout.BeginHorizontal(); Club dom = gestionnaire.Clubs[_id1]; Club ext = gestionnaire.Clubs[_id2]; if (GUILayout.Button(Styles.FlecheGauche(), GUILayout.Width(40), GUILayout.Height(40))) { if (_id1 > 0) { _id1--; } } GUILayout.BeginVertical(); GUILayout.Label("Equipe à domicile", Styles.LabelNormal(30, Styles.Texte2)); GUILayout.Label(Resources.Load("Logos/" + dom.Logo) as Texture, GUILayout.Width(240), GUILayout.Height(240)); GUILayout.Label(dom.Nom, Styles.LabelNormal(20, Styles.Texte1)); Styles.AfficherEtoiles(dom); GUILayout.EndVertical(); if (GUILayout.Button(Styles.FlecheDroite(), GUILayout.Width(40), GUILayout.Height(40))) { if (_id1 < gestionnaire.Clubs.Count - 1) { _id1++; } } if (GUILayout.Button(Styles.FlecheGauche(), GUILayout.Width(40), GUILayout.Height(40))) { if (_id2 > 0) { _id2--; } } GUILayout.BeginVertical(); GUILayout.Label("Equipe à l'extérieur", Styles.LabelNormal(30, Styles.Texte2)); GUILayout.Label(Resources.Load("Logos/" + ext.Logo) as Texture, GUILayout.Width(240), GUILayout.Height(240)); GUILayout.Label(ext.Nom, Styles.LabelNormal(20, Styles.Texte1)); Styles.AfficherEtoiles(ext); GUILayout.EndVertical(); if (GUILayout.Button(Styles.FlecheDroite(), GUILayout.Width(40), GUILayout.Height(40))) { if (_id2 < gestionnaire.Clubs.Count - 1) { _id2++; } } if (GUILayout.Button("Commencer", Styles.ButtonNormal(40, Styles.Texte2))) { Match m = new Match(gestionnaire.Clubs[_id1], gestionnaire.Clubs[_id2], new DateTime(2018, 1, 1, 20, 0, 0)); Match.LeMatch = m; SceneManager.LoadScene(1); } GUILayout.EndHorizontal(); GUILayout.EndVertical(); GUILayout.EndArea(); return(res); }
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); }
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.6f)); GUILayout.BeginVertical(); if (GUILayout.Button("Revenir", Styles.ButtonNormal(20, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f))) { res = new GUI_AcceuilCompetition(); } GUILayout.BeginHorizontal(); GUILayout.Label(_match.Equipe1.Nom, Styles.LabelNormal(25, Styles.Texte2), GUILayout.Width(Screen.width * 0.15f)); GUILayout.Label(_match.Score1.ToString(), Styles.LabelNormal(25, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f)); GUILayout.Label(_match.Score2.ToString(), Styles.LabelNormal(25, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f)); GUILayout.Label(_match.Equipe2.Nom, Styles.LabelNormal(25, Styles.Texte2), GUILayout.Width(Screen.width * 0.15f)); GUILayout.EndHorizontal(); GUILayout.Space(Screen.height * 0.05f); GUILayout.Label("Possesion", Styles.LabelNormal(20, Styles.Texte2), GUILayout.Width(Screen.width * 0.5f)); GUILayout.BeginHorizontal(); GUILayout.Label((_match.Possession1 * 100).ToString("0.00") + " %", Styles.LabelNormal(20, Styles.Texte1), GUILayout.Width(Screen.width * 0.35f)); GUILayout.Label((_match.Possession2 * 100).ToString("0.00") + " %", Styles.LabelNormal(20, Styles.Texte1), GUILayout.Width(Screen.width * 0.15f)); GUILayout.EndHorizontal(); GUILayout.Label("Tirs", Styles.LabelNormal(20, Styles.Texte2), GUILayout.Width(Screen.width * 0.5f)); GUILayout.BeginHorizontal(); GUILayout.Label(_match.Tirs1.ToString(), Styles.LabelNormal(20, Styles.Texte1), GUILayout.Width(Screen.width * 0.35f)); GUILayout.Label(_match.Tirs2.ToString(), Styles.LabelNormal(20, Styles.Texte1), GUILayout.Width(Screen.width * 0.15f)); GUILayout.EndHorizontal(); _scroll = GUILayout.BeginScrollView(_scroll); foreach (EvenementMatch em in _match.Evenements) { GUILayout.BeginHorizontal(); if (em.Club == _match.Equipe2) { GUILayout.Label("", GUILayout.Width(Screen.width * 0.35f)); //Décalage à droite de l'écran } GUILayout.Label(em.Temps + "e", Styles.LabelNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.03f)); GUILayout.Label(em.Joueur.Nom, Styles.LabelNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f)); string nom = "(But)"; if (em.Type == TypeEvenement.VIF_ATTRAPE) { nom = "(Capture du vif)"; } GUILayout.Label(nom, Styles.LabelNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f)); GUILayout.EndHorizontal(); } GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.EndArea(); return(res); }
public IGUI GUI() { _previous = _tour; _tour = _competition.Tours[_competition.TourActuel]; if (_previous != _tour) { _vue = Vue(_tour); } IGUI res = this; GUILayout.BeginArea(new Rect(Screen.width * 0.05f, Screen.height * 0.1f, Screen.width * 0.9f, Screen.height * 0.8f)); GUILayout.BeginVertical(); GUILayout.Label(Session.Instance.Partie.Date.ToString("dd/MM/yy"), Styles.LabelNormal(20, Styles.Texte1), GUILayout.Width(Screen.width * 0.25f)); #region BANDEAU_CENTRAL GUILayout.BeginHorizontal(); //A gauche, classement ou matchs GUILayout.BeginVertical(); _vue.Classement(); //En bas à gauche, les buteurs if (GUILayout.Button("Avancer", Styles.ButtonNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f))) { while (!Session.Instance.Partie.Avancer()) { ; //Avance jusqu'à la prochaine interrpution de partie } } if (GUILayout.Button("Options", Styles.ButtonNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f))) { res = new GUI_Options(); } GUILayout.Label("Buteurs", Styles.LabelNormal(20, Styles.Texte1), GUILayout.Width(Screen.width * 0.15f)); _scroll2 = GUILayout.BeginScrollView(_scroll2); Dictionary <Joueur, int> buteurs = _competition.Buteurs(); var item = from pair in buteurs orderby pair.Value descending select pair; int i = 0; foreach (KeyValuePair <Joueur, int> kvp in item) { if (i < 10) { GUILayout.BeginHorizontal(); if (GUILayout.Button(kvp.Key.Nom, Styles.LabelNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.1f))) { res = new GUI_Joueur(kvp.Key); } Styles.AfficherLogo(kvp.Key.Club.Logo, 30, 0.03f); GUILayout.Label(kvp.Value.ToString(), Styles.LabelNormal(15, Styles.Texte2), GUILayout.Width(Screen.width * 0.05f)); GUILayout.EndHorizontal(); } i++; } GUILayout.EndScrollView(); GUILayout.EndVertical(); //Au centre : affichage des matchs à venir GUILayout.BeginVertical(); List <Match> aVenir = _vue.ProchainsMatchs(); aVenir.Sort(new MatchComparator()); GUILayout.Label("Matchs à venir", Styles.LabelNormal(20, Styles.Texte1)); if (aVenir.Count > 0) { res = AfficherMatchs(aVenir, res); } else { GUILayout.Label("Aucun match de prévu", Styles.LabelNormal(15, Styles.Texte2)); } GUILayout.Space(Screen.height * 0.2f); //AU MILIEU EN BAS : CALENDRIER / RESULTATS Tour t = _competition.Tours[_index]; VueTour vue = Vue(t); GUILayout.BeginHorizontal(); List <Match> liste = new List <Match>(); if (GUILayout.Button(Styles.FlecheGauche(), GUILayout.Width(40), GUILayout.Height(40))) { _journee = 1; if (_index > 0) { _index--; } } if (GUILayout.Button(Styles.FlecheGauche(), GUILayout.Width(40), GUILayout.Height(40))) { if (_journee > 1) { _journee--; } } GUILayout.Space(Screen.width * 0.3f); if (GUILayout.Button(Styles.FlecheDroite(), GUILayout.Width(40), GUILayout.Height(40))) { _journee++; } if (GUILayout.Button(Styles.FlecheDroite(), GUILayout.Width(40), GUILayout.Height(40))) { _journee = 1; if (_index + 1 < _competition.Tours.Count) { _index++; } } GUILayout.EndHorizontal(); liste = vue.Calendrier(); GUILayout.BeginVertical(); GUILayout.Label("Calendrier complet", Styles.LabelNormal(20, Styles.Texte1)); _scroll = GUILayout.BeginScrollView(_scroll); res = AfficherMatchs(liste, res); GUILayout.EndScrollView(); GUILayout.EndVertical(); GUILayout.EndVertical(); // A DROITE : ARTICLES GUILayout.BeginVertical(); GUILayout.Label("Depeches", Styles.LabelNormal(20, Styles.Texte1)); List <Article> articles = new List <Article>(_competition.Articles); articles.Sort(new ArticleComparator()); foreach (Article a in articles) { GUILayout.Label(a.ToString(), Styles.LabelNewspaper(18, Styles.Texte2)); } GUILayout.EndVertical(); GUILayout.EndHorizontal(); #endregion GUILayout.EndVertical(); GUILayout.EndArea(); return(res); }