This is a Unity GUI implementation of QuestLogWindow. More...
Classes | |
class | AbandonControls |
Public Member Functions | |
override void | Awake () |
Attempts to find the GUI root and scroll view if they weren't set. More... | |
void | Start () |
Start this instance by hiding the GUI root. More... | |
override void | OpenWindow (Action openedWindowHandler) |
Opens the window. More... | |
override void | CloseWindow (Action closedWindowHandler) |
Closes the window. More... | |
override void | ConfirmAbandonQuest (string title, Action confirmAbandonQuestHandler) |
Asks the player to confirm abandonment of a quest. More... | |
void | ClickConfirmAbandonQuest (object data) |
void | ClickCancelAbandonQuest (object data) |
void | OnMeasureContent () |
The event handler that measures the size of the content that will go into the scroll view. More... | |
void | OnDrawContent () |
The event handler that draws the content of the scroll view. More... | |
override void | OnQuestListUpdated () |
Called when the quest list has been updated – for example, when switching between active and completed quests. More... | |
Public Member Functions inherited from PixelCrushers.DialogueSystem.QuestLogWindow | |
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 | |
GUIRoot | guiRoot |
The GUI root. More... | |
GUIScrollView | scrollView |
The scroll view where quest titles and descriptions will be shown. More... | |
GUIButton | activeButton |
The button to show active quests. More... | |
GUIButton | completedButton |
The button to show completed quests. More... | |
AbandonControls | abandonQuestPopup = new AbandonControls() |
string | groupHeadingGuiStyleName |
The name of the GUI style to use for quest group titles. More... | |
string | questHeadingGuiStyleName |
The name of the GUI style to use for quest titles. More... | |
string | questHeadingOpenGuiStyleName |
The name of the GUI style to use for quest titles when the quest is open. More... | |
string | questBodyGuiStyleName |
The name of the GUI style to use for quest descriptions. More... | |
string | questEntryActiveGuiStyleName |
The name of the GUI style to use for active quest entries. More... | |
string | questEntrySuccessGuiStyleName |
The name of the GUI style to use when displaying successfully-completed entries. More... | |
string | questEntryFailureGuiStyleName |
The name of the GUI style to use when displaying failed entries. More... | |
string | questEntryButtonStyleName |
The name of the GUI style to use for Track and Abandon buttons. More... | |
string | noQuestsGuiStyleName |
The name of the GUI style to use for the "No Active Quests" and "No Completed Quests" messages. More... | |
int | padding = 2 |
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... | |
Additional Inherited Members | |
Public Types inherited from PixelCrushers.DialogueSystem.QuestLogWindow | |
enum | QuestHeadingSource { QuestHeadingSource.Name, QuestHeadingSource.Description } |
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 inherited from PixelCrushers.DialogueSystem.QuestLogWindow | |
QuestState | currentQuestStateMask = QuestState.Active |
The current quest state mask. More... | |
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... | |
This is a Unity GUI implementation of QuestLogWindow.
Don't confuse it with the deprecated UnityQuestLogWindow, which was the old quest log window implementation.
|
virtual |
Attempts to find the GUI root and scroll view if they weren't set.
Sets up the scroll view.
Reimplemented from PixelCrushers.DialogueSystem.QuestLogWindow.
void PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.ClickCancelAbandonQuest | ( | object | data | ) |
void PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.ClickConfirmAbandonQuest | ( | object | data | ) |
|
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 from PixelCrushers.DialogueSystem.QuestLogWindow.
|
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 from PixelCrushers.DialogueSystem.QuestLogWindow.
void PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.OnDrawContent | ( | ) |
The event handler that draws the content of the scroll view.
void PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.OnMeasureContent | ( | ) |
The event handler that measures the size of the content that will go into the scroll view.
|
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 from PixelCrushers.DialogueSystem.QuestLogWindow.
|
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 from PixelCrushers.DialogueSystem.QuestLogWindow.
void PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.Start | ( | ) |
Start this instance by hiding the GUI root.
We only need to activate it when the window is open.
AbandonControls PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.abandonQuestPopup = new AbandonControls() |
GUIButton PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.activeButton |
The button to show active quests.
When clicked, it should send the message "OnShowActiveQuests" to the UnityQuestLogWindow.
GUIButton PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.completedButton |
The button to show completed quests.
When clicked, it should send the message "OnShowCompletedQuests" to the UnityQuestLogWindow.
string PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.groupHeadingGuiStyleName |
The name of the GUI style to use for quest group titles.
If blank, defaults to questHeadingGuiStyleName.
GUIRoot PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.guiRoot |
The GUI root.
string PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.noQuestsGuiStyleName |
The name of the GUI style to use for the "No Active Quests" and "No Completed Quests" messages.
If blank, defaults to label.
int PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.padding = 2 |
string PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.questBodyGuiStyleName |
The name of the GUI style to use for quest descriptions.
If blank, defaults to label.
string PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.questEntryActiveGuiStyleName |
The name of the GUI style to use for active quest entries.
If blank, defaults to label.
string PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.questEntryButtonStyleName |
The name of the GUI style to use for Track and Abandon buttons.
string PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.questEntryFailureGuiStyleName |
The name of the GUI style to use when displaying failed entries.
If blank, it defaults to label.
string PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.questEntrySuccessGuiStyleName |
The name of the GUI style to use when displaying successfully-completed entries.
If blank, it defaults to label.
string PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.questHeadingGuiStyleName |
The name of the GUI style to use for quest titles.
If blank, defaults to label.
string PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.questHeadingOpenGuiStyleName |
The name of the GUI style to use for quest titles when the quest is open.
For example, if the normal (closed) quest heading uses a down arrow graphic, this style could use an up arrow graphic.
GUIScrollView PixelCrushers.DialogueSystem.UnityGUI.UnityGUIQuestLogWindow.scrollView |
The scroll view where quest titles and descriptions will be shown.