This is the abstract base class for quest log windows. More...
Classes | |
class | QuestInfo |
Public Types | |
enum | QuestHeadingSource { QuestHeadingSource.Name, QuestHeadingSource.Description } |
Public Member Functions | |
virtual void | OpenWindow (Action openedWindowHandler) |
Opens the window. More... | |
virtual void | CloseWindow (Action closedWindowHandler) |
Closes the window. More... | |
virtual void | OnQuestListUpdated () |
Called when the quest list has been updated – for example, when switching between active and completed quests. 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 | |
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 | |
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 | |
QuestState | currentQuestStateMask = QuestState.Active |
The current quest state mask. More... | |
Properties | |
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... | |
This is the abstract base class for quest log windows.
You can implement a quest log window in any GUI system by creating a subclass.
When open, the window displays active and completed quests. It gets the titles, descriptions, and states of the quests from the QuestLog class.
The window allows the player to abandon quests (if the quest's Abandonable field is true) and toggle tracking (if the quest's Trackable field is true).
If pauseWhileOpen is set to true
, the quest log window pauses the game by setting Time.timeScale
to 0
. When closed, it restores the previous time scale.
|
virtual |
|
virtual |
Your GUI should call this when the player clicks to abandon a quest.
data | Ignored. |
void PixelCrushers.DialogueSystem.QuestLogWindow.ClickAbandonQuestButton | ( | ) |
void PixelCrushers.DialogueSystem.QuestLogWindow.ClickClose | ( | object | data | ) |
Your GUI close button should call this.
data | Ignored. |
void PixelCrushers.DialogueSystem.QuestLogWindow.ClickCloseButton | ( | ) |
|
virtual |
Your GUI should call this when the player clicks on a quest to expand or close it.
data | The quest title. |
|
virtual |
Your GUI "show active quests" button should call this.
data | Ignored. |
|
virtual |
|
virtual |
Your GUI "show completed quests" button should call this.
data | Ignored. |
void PixelCrushers.DialogueSystem.QuestLogWindow.ClickShowCompletedQuestsButton | ( | ) |
|
virtual |
Your GUI should call this when the player clicks to toggle quest tracking.
data | Ignored. |
void PixelCrushers.DialogueSystem.QuestLogWindow.ClickTrackQuestButton | ( | ) |
|
virtual |
Closes the quest log window.
While you can call this manually in your own script, this method is normally called internally when the player clicks the close button. You can call it manually to support alternate methods of closing the window.
if (Input.GetKeyDown(KeyCode.L) && myQuestLogWindow.IsOpen) { myQuestLogWindow.Close(); }
|
virtual |
Closes the window.
Your implementation should override this to handle any window-closing activity, then call closedWindowHandler at the end.
openedWindowHandler | Closed window handler. |
Reimplemented in PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProQuestLogWindow, PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow, PixelCrushers.DialogueSystem.DaikonForgeGUI.DaikonForgeQuestLogWindow, and PixelCrushers.DialogueSystem.NGUI.NGUIQuestLogWindow.
|
virtual |
Asks the player to confirm abandonment of a quest.
Your implementation should override this to show a modal dialogue box or something similar. If confirmed, it should call confirmedAbandonQuestHandler.
title | Title. |
confirmedAbandonQuestHandler | Confirmed abandon quest handler. |
Reimplemented in PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProQuestLogWindow, PixelCrushers.DialogueSystem.DaikonForgeGUI.DaikonForgeQuestLogWindow, PixelCrushers.DialogueSystem.NGUI.NGUIQuestLogWindow, and PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.
|
virtual |
Gets the localized text for a field name.
fieldName | Field name. |
|
protectedvirtual |
Gets the "no quests" message for a quest state (active or success|failure).
This method uses the strings "No Active Quests" and "No Completed Quests" or their localized equivalents if you've set the localized text table.
questStateMask | Quest state mask. |
|
protectedvirtual |
|
virtual |
Determines whether the specified questInfo is for the currently-selected quest.
true
if this is the selected quest; otherwise, false
.questInfo | Quest info. |
|
protectedvirtual |
|
protectedvirtual |
Your GUI should call this when the player confirms abandonment of a quest.
|
protectedvirtual |
|
virtual |
Called when the quest list has been updated – for example, when switching between active and completed quests.
Your implementation may override this to do processing.
Reimplemented in PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow, PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProQuestLogWindow, PixelCrushers.DialogueSystem.UnityUIQuestLogWindow, PixelCrushers.DialogueSystem.DaikonForgeGUI.DaikonForgeQuestLogWindow, and PixelCrushers.DialogueSystem.NGUI.NGUIQuestLogWindow.
|
virtual |
Opens the quest window.
|
virtual |
Opens the window.
Your implementation should override this to handle any window-opening activity, then call openedWindowHandler at the end.
openedWindowHandler | Opened window handler. |
Reimplemented in PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow, PixelCrushers.DialogueSystem.TextMeshPro.TextMeshProQuestLogWindow, PixelCrushers.DialogueSystem.DaikonForgeGUI.DaikonForgeQuestLogWindow, and PixelCrushers.DialogueSystem.NGUI.NGUIQuestLogWindow.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
void PixelCrushers.DialogueSystem.QuestLogWindow.UpdateTracker | ( | ) |
QuestState PixelCrushers.DialogueSystem.QuestLogWindow.abandonQuestState = QuestState.Unassigned |
The state to assign abandoned quests.
|
protected |
The current quest state mask.
LocalizedTextTable PixelCrushers.DialogueSystem.QuestLogWindow.localizedText = null |
bool PixelCrushers.DialogueSystem.QuestLogWindow.pauseWhileOpen = true |
If true
, the window sets Time.timeScale = 0
to pause the game while displaying the quest log window.
QuestHeadingSource PixelCrushers.DialogueSystem.QuestLogWindow.questHeadingSource = QuestHeadingSource.Name |
The quest title source.
bool PixelCrushers.DialogueSystem.QuestLogWindow.unlockCursorWhileOpen = true |
If true
, the cursor is unlocked while the quest log window is open.
bool PixelCrushers.DialogueSystem.QuestLogWindow.useGroups = false |
If true
, organize the quests by group.
|
getprotected set |
The current list of quest groups.
The quest group names.
|
getprotected set |
Indicates whether the quest log window is currently open.
true
if open; otherwise, false
.
|
get |
Indicates whether the window is showing active quests or completed quests.
true
if showing active quests; otherwise, false
.
|
getprotected set |
The message to show if Quests[] is empty.
The no quests message.
|
getprotected set |
The current list of quests.
This will change based on whether the player is viewing active or completed quests.
The quests.
|
getprotected set |
The title of the currently-selected quest.
The selected quest.