public void SetActorPortraitTexture(string actorName, Texture2D portraitTexture) { if (portraitImage == null) { return; } portraitImage.sprite = UITools.CreateSprite(AbstractDialogueUI.GetValidPortraitTexture(actorName, portraitTexture)); }
/// <summary> /// Sets the portrait texture to use in the subtitle if the named actor is the speaker. /// This is used to immediately update the GUI control if the SetPortrait() sequencer /// command changes the portrait texture. /// </summary> /// <param name="actorName">Actor name in database.</param> /// <param name="portraitTexture">Portrait texture.</param> public override void SetActorPortraitTexture(string actorName, Texture2D portraitTexture) { if ((currentSubtitle != null) && string.Equals(currentSubtitle.speakerInfo.nameInDatabase, actorName)) { if (portraitImage != null) { portraitImage.sprite = UITools.CreateSprite(AbstractDialogueUI.GetValidPortraitTexture(actorName, portraitTexture)); //---Was: .texture = AbstractDialogueUI.GetValidPortraitTexture(actorName, portraitTexture); } } }
/// <summary> /// Sets the portrait texture to use in the response menu if the named actor is the player. /// This is used to immediately update the GUI control if the SetPortrait() sequencer /// command changes the portrait texture. /// </summary> /// <param name="actorName">Actor name in database.</param> /// <param name="portraitTexture">Portrait texture.</param> public override void SetActorPortraitTexture(string actorName, Texture2D portraitTexture) { if (string.Equals(actorName, pcPortraitName)) { Texture2D actorPortraitTexture = AbstractDialogueUI.GetValidPortraitTexture(actorName, portraitTexture); pcPortraitTexture = actorPortraitTexture; if ((pcImage != null) && (DialogueManager.MasterDatabase.IsPlayer(actorName))) { pcImage.sprite = UITools.CreateSprite(actorPortraitTexture); } } }
/// <summary> /// Sets the portrait texture to use in the response menu if the named actor is the player. /// This is used to immediately update the GUI control if the SetPortrait() sequencer /// command changes the portrait texture. /// </summary> /// <param name="actorName">Actor name in database.</param> /// <param name="portraitTexture">Portrait texture.</param> public override void SetActorPortraitTexture(string actorName, Texture2D portraitTexture) { if (string.Equals(actorName, m_pcPortraitName)) { Texture2D actorPortraitTexture = AbstractDialogueUI.GetValidPortraitTexture(actorName, portraitTexture); m_pcPortraitTexture = actorPortraitTexture; if (m_currentPanel != null && m_currentPanel.pcImage != null && DialogueManager.masterDatabase.IsPlayer(actorName)) { m_currentPanel.pcImage.sprite = UITools.CreateSprite(actorPortraitTexture); } } }