PixelCrushers.DialogueSystem.UnityUIQuestLogWindow Class Reference

This is an implementation of the abstract QuestLogWindow class for the Unity UI. More...

Inheritance diagram for PixelCrushers.DialogueSystem.UnityUIQuestLogWindow:
Collaboration diagram for PixelCrushers.DialogueSystem.UnityUIQuestLogWindow:

Classes

class  AnimationTransitions
 

Public Member Functions

virtual void Start ()
 Hide the main panel and all of the templates on start. More...
 
virtual void Update ()
 
override void OpenWindow (System.Action openedWindowHandler)
 Open the window by showing the main panel. More...
 
void AutoFocus ()
 
override void CloseWindow (System.Action closedWindowHandler)
 Close the window by hiding the main panel. More...
 
override void OnQuestListUpdated ()
 Whenever the quest list is updated, repopulate the scroll panel. More...
 
void NotifyContentChanged ()
 
void ClickQuestFoldout (string questTitle)
 
void ClickQuestGroupFoldout (string group)
 
override void ConfirmAbandonQuest (string title, System.Action confirmAbandonQuestHandler)
 Opens the abandon confirmation popup. More...
 
void ClickConfirmAbandonQuestButton ()
 
void ClickCancelAbandonQuestButton ()
 
- Public Member Functions inherited from PixelCrushers.DialogueSystem.QuestLogWindow
virtual void OpenWindow (Action openedWindowHandler)
 Opens the window. More...
 
virtual void CloseWindow (Action closedWindowHandler)
 Closes the window. More...
 
virtual void ConfirmAbandonQuest (string title, Action confirmedAbandonQuestHandler)
 Asks the player to confirm abandonment of a quest. More...
 
virtual void Awake ()
 
virtual void Open ()
 Opens the quest window. More...
 
virtual void Close ()
 Closes the quest log window. More...
 
virtual string GetLocalizedText (string fieldName)
 Gets the localized text for a field name. More...
 
virtual bool IsSelectedQuest (QuestInfo questInfo)
 Determines whether the specified questInfo is for the currently-selected quest. More...
 
void ClickClose (object data)
 Your GUI close button should call this. More...
 
virtual void ClickShowActiveQuests (object data)
 Your GUI "show active quests" button should call this. More...
 
virtual void ClickShowCompletedQuests (object data)
 Your GUI "show completed quests" button should call this. More...
 
virtual void ClickQuest (object data)
 Your GUI should call this when the player clicks on a quest to expand or close it. More...
 
virtual void ClickAbandonQuest (object data)
 Your GUI should call this when the player clicks to abandon a quest. More...
 
virtual void ClickTrackQuest (object data)
 Your GUI should call this when the player clicks to toggle quest tracking. More...
 
virtual void ClickShowActiveQuestsButton ()
 
void ClickShowCompletedQuestsButton ()
 
void ClickCloseButton ()
 
void ClickAbandonQuestButton ()
 
void ClickTrackQuestButton ()
 
void UpdateTracker ()
 

Public Attributes

UnityEngine.UI.Graphic mainPanel
 The main quest log window panel. More...
 
UnityEngine.UI.Button activeQuestsButton
 The active quests button. More...
 
UnityEngine.UI.Button completedQuestsButton
 The completed quests button. More...
 
UnityEngine.UI.Graphic questTable
 The quest table. More...
 
UnityUIQuestGroupTemplate questGroupTemplate
 
UnityUIQuestTemplate questTemplate
 The quest template. More...
 
UnityEngine.UI.Graphic abandonPopup
 The confirmation popup to use if the player clicks the abandon quest button. More...
 
UnityEngine.UI.Text abandonQuestTitle
 The quest title label to set in the abandon quest dialog popup. More...
 
AnimationTransitions animationTransitions = new AnimationTransitions()
 
bool autoFocus = false
 Set true to always keep a control focused; useful for gamepads. More...
 
float autoFocusCheckFrequency = 0.5f
 If auto focusing, check on this frequency in seconds that the control is focused. More...
 
UnityEvent onOpen = new UnityEvent()
 
UnityEvent onClose = new UnityEvent()
 
UnityEvent onContentChanged = new UnityEvent()
 
- Public Attributes inherited from PixelCrushers.DialogueSystem.QuestLogWindow
LocalizedTextTable localizedText = null
 
QuestHeadingSource questHeadingSource = QuestHeadingSource.Name
 The quest title source. More...
 
QuestState abandonQuestState = QuestState.Unassigned
 The state to assign abandoned quests. More...
 
bool pauseWhileOpen = true
 If true, the window sets Time.timeScale = 0 to pause the game while displaying the quest log window. More...
 
bool unlockCursorWhileOpen = true
 If true, the cursor is unlocked while the quest log window is open. More...
 
bool useGroups = false
 If true, organize the quests by group. More...
 

Protected Member Functions

void SetStateButtonListeners ()
 
void SetStateToggleButtons ()
 
virtual void ClearQuestTable ()
 
virtual void AddQuestsToTable ()
 
virtual void AddQuestGroupToTable (string group)
 Adds a quest group to the table using the template. More...
 
virtual void AddQuestToTable (QuestInfo questInfo)
 Adds a quest to the table using the template. More...
 
virtual void SetQuestDetails (UnityUIQuestTemplate questControl, QuestInfo questInfo)
 
void OnTrackButtonClicked (GameObject button)
 Track button clicked event that sets SelectedQuest first. More...
 
void OnAbandonButtonClicked (GameObject button)
 Abandon button clicked event that sets SelectedQuest first. More...
 
void OpenAbandonPopup (string title)
 Opens the abandon popup modally if assigned; otherwise immediately confirms. More...
 
void CloseAbandonPopup ()
 Closes the abandon popup. More...
 
- Protected Member Functions inherited from PixelCrushers.DialogueSystem.QuestLogWindow
virtual void OnOpenedWindow ()
 
virtual void OnClosedWindow ()
 
virtual void PauseGameplay ()
 
virtual void ResumeGameplay ()
 
virtual void ShowQuests (QuestState questStateMask)
 
virtual QuestInfo GetQuestInfo (string group, string title)
 
virtual string GetNoQuestsMessage (QuestState questStateMask)
 Gets the "no quests" message for a quest state (active or success|failure). More...
 
virtual void OnConfirmAbandonQuest ()
 Your GUI should call this when the player confirms abandonment of a quest. More...
 

Protected Attributes

System.Action confirmAbandonQuestHandler = null
 This handler is called if the player confirms abandonment of a quest. More...
 
List< string > collapsedGroups = new List<string>()
 
List< UnityUIQuestGroupTemplategroupTemplateInstances = new List<UnityUIQuestGroupTemplate>()
 
List< UnityUIQuestTemplatequestTemplateInstances = new List<UnityUIQuestTemplate>()
 
List< UnityUIQuestGroupTemplateunusedGroupTemplateInstances = new List<UnityUIQuestGroupTemplate>()
 
List< UnityUIQuestTemplateunusedQuestTemplateInstances = new List<UnityUIQuestTemplate>()
 
int siblingIndexCounter = 0
 
- Protected Attributes inherited from PixelCrushers.DialogueSystem.QuestLogWindow
QuestState currentQuestStateMask = QuestState.Active
 The current quest state mask. More...
 

Properties

UIShowHideController showHideController [get]
 
- Properties inherited from PixelCrushers.DialogueSystem.QuestLogWindow
bool IsOpen [get, protected set]
 Indicates whether the quest log window is currently open. More...
 
QuestInfo[] Quests [get, protected set]
 The current list of quests. More...
 
string[] Groups [get, protected set]
 The current list of quest groups. More...
 
string SelectedQuest [get, protected set]
 The title of the currently-selected quest. More...
 
string NoQuestsMessage [get, protected set]
 The message to show if Quests[] is empty. More...
 
bool IsShowingActiveQuests [get]
 Indicates whether the window is showing active quests or completed quests. More...
 

Additional Inherited Members

- Public Types inherited from PixelCrushers.DialogueSystem.QuestLogWindow
enum  QuestHeadingSource { QuestHeadingSource.Name, QuestHeadingSource.Description }
 

Detailed Description

This is an implementation of the abstract QuestLogWindow class for the Unity UI.

Member Function Documentation

◆ AddQuestGroupToTable()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.AddQuestGroupToTable ( string  group)
protectedvirtual

Adds a quest group to the table using the template.

Parameters
questInfoQuest group name.

◆ AddQuestsToTable()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.AddQuestsToTable ( )
protectedvirtual

◆ AddQuestToTable()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.AddQuestToTable ( QuestInfo  questInfo)
protectedvirtual

Adds a quest to the table using the template.

Parameters
questInfoQuest info.

◆ AutoFocus()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.AutoFocus ( )

◆ ClearQuestTable()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.ClearQuestTable ( )
protectedvirtual

◆ ClickCancelAbandonQuestButton()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.ClickCancelAbandonQuestButton ( )

◆ ClickConfirmAbandonQuestButton()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.ClickConfirmAbandonQuestButton ( )

◆ ClickQuestFoldout()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.ClickQuestFoldout ( string  questTitle)

◆ ClickQuestGroupFoldout()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.ClickQuestGroupFoldout ( string  group)

◆ CloseAbandonPopup()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.CloseAbandonPopup ( )
protected

Closes the abandon popup.

◆ CloseWindow()

override void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.CloseWindow ( System.Action  closedWindowHandler)

Close the window by hiding the main panel.

Re-enable the bark UI.

Parameters
closedWindowHandlerClosed window handler.

◆ ConfirmAbandonQuest()

override void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.ConfirmAbandonQuest ( string  title,
System.Action  confirmAbandonQuestHandler 
)

Opens the abandon confirmation popup.

Parameters
titleQuest title.
confirmAbandonQuestHandlerConfirm abandon quest handler.

◆ NotifyContentChanged()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.NotifyContentChanged ( )

◆ OnAbandonButtonClicked()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.OnAbandonButtonClicked ( GameObject  button)
protected

Abandon button clicked event that sets SelectedQuest first.

Parameters
buttonButton.

◆ OnQuestListUpdated()

override void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.OnQuestListUpdated ( )
virtual

Whenever the quest list is updated, repopulate the scroll panel.

Reimplemented from PixelCrushers.DialogueSystem.QuestLogWindow.

◆ OnTrackButtonClicked()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.OnTrackButtonClicked ( GameObject  button)
protected

Track button clicked event that sets SelectedQuest first.

Parameters
buttonButton.

◆ OpenAbandonPopup()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.OpenAbandonPopup ( string  title)
protected

Opens the abandon popup modally if assigned; otherwise immediately confirms.

Parameters
titleQuest title.

◆ OpenWindow()

override void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.OpenWindow ( System.Action  openedWindowHandler)

Open the window by showing the main panel.

The bark UI may conflict with the quest log window, so temporarily disable it.

Parameters
openedWindowHandlerOpened window handler.

◆ SetQuestDetails()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.SetQuestDetails ( UnityUIQuestTemplate  questControl,
QuestInfo  questInfo 
)
protectedvirtual

◆ SetStateButtonListeners()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.SetStateButtonListeners ( )
protected

◆ SetStateToggleButtons()

void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.SetStateToggleButtons ( )
protected

◆ Start()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.Start ( )
virtual

Hide the main panel and all of the templates on start.

◆ Update()

virtual void PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.Update ( )
virtual

Member Data Documentation

◆ abandonPopup

UnityEngine.UI.Graphic PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.abandonPopup

The confirmation popup to use if the player clicks the abandon quest button.

It should send ClickConfirmAbandonQuest if the player confirms, or ClickCancelAbandonQuest if the player cancels.

◆ abandonQuestTitle

UnityEngine.UI.Text PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.abandonQuestTitle

The quest title label to set in the abandon quest dialog popup.

◆ activeQuestsButton

UnityEngine.UI.Button PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.activeQuestsButton

The active quests button.

◆ animationTransitions

AnimationTransitions PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.animationTransitions = new AnimationTransitions()

◆ autoFocus

bool PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.autoFocus = false

Set true to always keep a control focused; useful for gamepads.

◆ autoFocusCheckFrequency

float PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.autoFocusCheckFrequency = 0.5f

If auto focusing, check on this frequency in seconds that the control is focused.

◆ collapsedGroups

List<string> PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.collapsedGroups = new List<string>()
protected

◆ completedQuestsButton

UnityEngine.UI.Button PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.completedQuestsButton

The completed quests button.

◆ confirmAbandonQuestHandler

System.Action PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.confirmAbandonQuestHandler = null
protected

This handler is called if the player confirms abandonment of a quest.

◆ groupTemplateInstances

List<UnityUIQuestGroupTemplate> PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.groupTemplateInstances = new List<UnityUIQuestGroupTemplate>()
protected

◆ mainPanel

UnityEngine.UI.Graphic PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.mainPanel

The main quest log window panel.

◆ onClose

UnityEvent PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.onClose = new UnityEvent()

◆ onContentChanged

UnityEvent PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.onContentChanged = new UnityEvent()

◆ onOpen

UnityEvent PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.onOpen = new UnityEvent()

◆ questGroupTemplate

UnityUIQuestGroupTemplate PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.questGroupTemplate

◆ questTable

UnityEngine.UI.Graphic PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.questTable

The quest table.

◆ questTemplate

UnityUIQuestTemplate PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.questTemplate

The quest template.

◆ questTemplateInstances

List<UnityUIQuestTemplate> PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.questTemplateInstances = new List<UnityUIQuestTemplate>()
protected

◆ siblingIndexCounter

int PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.siblingIndexCounter = 0
protected

◆ unusedGroupTemplateInstances

List<UnityUIQuestGroupTemplate> PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.unusedGroupTemplateInstances = new List<UnityUIQuestGroupTemplate>()
protected

◆ unusedQuestTemplateInstances

List<UnityUIQuestTemplate> PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.unusedQuestTemplateInstances = new List<UnityUIQuestTemplate>()
protected

Property Documentation

◆ showHideController

UIShowHideController PixelCrushers.DialogueSystem.UnityUIQuestLogWindow.showHideController
getprotected

The documentation for this class was generated from the following file: