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; 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.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.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); }