예제 #1
0
 private void DrawPlayerEntry(PlayerStatus playerStatus)
 {
     if (playerStatus == null)
     {
         return;
     }
     GUILayout.BeginHorizontal();
     if (!PlayerNameStyle.ContainsKey(playerStatus.PlayerName))
     {
         PlayerNameStyle[playerStatus.PlayerName] = new GUIStyle(GUI.skin.label)
         {
             normal       = { textColor = SystemsContainer.Get <PlayerColorSystem>().GetPlayerColor(playerStatus.PlayerName) },
             hover        = { textColor = SystemsContainer.Get <PlayerColorSystem>().GetPlayerColor(playerStatus.PlayerName) },
             active       = { textColor = SystemsContainer.Get <PlayerColorSystem>().GetPlayerColor(playerStatus.PlayerName) },
             fontStyle    = FontStyle.Bold,
             stretchWidth = true,
             wordWrap     = false
         };
     }
     GUILayout.Label(playerStatus.PlayerName, PlayerNameStyle[playerStatus.PlayerName]);
     GUILayout.FlexibleSpace();
     GUILayout.Label(playerStatus.StatusText, StateTextStyle);
     GUILayout.Label(string.IsNullOrEmpty(playerStatus.VesselText) ? string.Empty : StatusTexts.GetPlayerText(playerStatus), VesselNameStyle);
     GUILayout.EndHorizontal();
 }
예제 #2
0
 private void DrawPlayerEntry(PlayerStatus playerStatus)
 {
     if (playerStatus == null)
     {
         return;
     }
     GUILayout.BeginHorizontal();
     if (!PlayerNameStyle.ContainsKey(playerStatus.PlayerName))
     {
         PlayerNameStyle[playerStatus.PlayerName] = new GUIStyle(GUI.skin.label);
         PlayerNameStyle[playerStatus.PlayerName].normal.textColor =
             PlayerColorSystem.Singleton.GetPlayerColor(playerStatus.PlayerName);
         PlayerNameStyle[playerStatus.PlayerName].hover.textColor =
             PlayerColorSystem.Singleton.GetPlayerColor(playerStatus.PlayerName);
         PlayerNameStyle[playerStatus.PlayerName].active.textColor =
             PlayerColorSystem.Singleton.GetPlayerColor(playerStatus.PlayerName);
         PlayerNameStyle[playerStatus.PlayerName].fontStyle    = FontStyle.Bold;
         PlayerNameStyle[playerStatus.PlayerName].stretchWidth = true;
         PlayerNameStyle[playerStatus.PlayerName].wordWrap     = false;
     }
     GUILayout.Label(playerStatus.PlayerName, PlayerNameStyle[playerStatus.PlayerName]);
     GUILayout.FlexibleSpace();
     GUILayout.Label(playerStatus.StatusText, StateTextStyle);
     GUILayout.EndHorizontal();
     if (playerStatus.VesselText != "")
     {
         GUILayout.Label("Pilot: " + playerStatus.VesselText, VesselNameStyle);
     }
 }