Planeshift
|
This window shows the popup menu of available responses when talking to an NPC. More...
#include <pawsnpcdialog.h>
Classes | |
struct | QuestInfo |
Public Member Functions | |
virtual void | BringToTop (pawsWidget *widget) |
Move this widget up the z order to the top. | |
void | CleanBubbles () |
empties all bubbles structures and hides them. | |
void | DisplayQuestBubbles (unsigned int index) |
Display quests in bubbles. | |
virtual void | Draw () |
Handles timing to make bubbles disappear in the bubbles npc dialog mode. | |
virtual void | DrawBackground () |
Has a real functionality only when using the bubbles npc dialog. | |
float | GetNpcMsgTimeoutScale () |
Getter for npc messsage timeout. | |
float | GetNpcMsgTimeoutScaleMax () |
Getter for npc messsage timeout. | |
bool | GetUseBubbles () |
Getter for useBubbles, which states if we use the bubbles based npcdialog interface. | |
void | HandleMessage (MsgEntry *me) |
virtual void | Hide () |
Makes widget invisible and removes focus if widget has current focus. | |
void | LoadQuest (csString xmlstr) |
Load quest info from xmlbinding message. | |
bool | LoadSetting () |
Loads the settings from the config files and sets the window appropriately. | |
void | NpcSays () |
Display NPC's chat text. | |
bool | OnButtonPressed (int button, int keyModifier, pawsWidget *widget) |
callback function called when a pawsButton (bubble) is clicked | |
bool | OnKeyDown (utf32_char keyCode, utf32_char key, int modifiers) |
Process keydown messages. | |
void | OnListAction (pawsListBox *widget, int status) |
Called whenever an item in a child list box is selected. | |
bool | OnMouseDown (int button, int modifiers, int x, int y) |
Manage mouse down event to test for and apply window changes. | |
void | OnStringEntered (const char *name, int param, const char *value) |
When the pawsStringPromptWindow is created, a ptr to a class which implements this function is provided, and a "name" string is provided, so that a single window can use 1 callback for many fields. | |
pawsNpcDialogWindow () | |
bool | PostSetup () |
Aquire pointers to widgets and load settings for the npc dialog. | |
void | SaveSetting () |
Saves the setting of the menu used for later use. | |
void | SetNpcMsgTimeoutScale (float timeoutScale) |
Setter for npc messsage timeout. | |
void | SetupWindowWidgets () |
Sets the widget appropriate for display depending on the type of npc dialog menu used. | |
void | SetUseBubbles (bool useBubblesNew) |
Sets if we have to use the bubbles based npc dialog interface (true) or the classic menu based one (false). | |
virtual void | Show () |
Shows the window and applies some special handling to fix up the window Behaviour and graphics correctly depending if we use the classic menu or the bubble menu. | |
void | ShowIfBubbles () |
Shows the window only if it's in bubbles mode, else does nothing. | |
void | ShowOnlyFreeText () |
Hides all bubbles except freetext and bye. | |
void | ShowSpeechBubble () |
Shows the npc chat window and hides the menu bubbles. |
This window shows the popup menu of available responses when talking to an NPC.
Definition at line 38 of file pawsnpcdialog.h.
pawsNpcDialogWindow::pawsNpcDialogWindow | ( | ) |
virtual void pawsNpcDialogWindow::BringToTop | ( | pawsWidget * | widget | ) | [inline, virtual] |
Move this widget up the z order to the top.
If the widget is alwaysOnTop, it will be placed in position 0. If the widget is not alwaysOnTop, it will be placed after the last alwaysOnTop widget. Will also recurse up through the parents to bring it up as well.
widget | Widget to bring forward. |
Reimplemented from pawsWidget.
Definition at line 97 of file pawsnpcdialog.h.
void pawsNpcDialogWindow::CleanBubbles | ( | ) |
empties all bubbles structures and hides them.
Display quests in bubbles.
index | From which index in questInfo array the quest info will be displayed in bubbles. |
virtual void pawsNpcDialogWindow::Draw | ( | ) | [virtual] |
Handles timing to make bubbles disappear in the bubbles npc dialog mode.
Reimplemented from pawsWidget.
virtual void pawsNpcDialogWindow::DrawBackground | ( | ) | [virtual] |
Has a real functionality only when using the bubbles npc dialog.
It will avoid drawing the background in order to make it transparent
Reimplemented from pawsWidget.
float pawsNpcDialogWindow::GetNpcMsgTimeoutScale | ( | ) | [inline] |
Getter for npc messsage timeout.
The timeout determines how long a npc message is displayed. Apparently this is just a scaling factor for shortening or prolonging the display.
Definition at line 164 of file pawsnpcdialog.h.
float pawsNpcDialogWindow::GetNpcMsgTimeoutScaleMax | ( | ) | [inline] |
Getter for npc messsage timeout.
The maximum timeout determines how long a npc message is displayed at maximum.
Definition at line 194 of file pawsnpcdialog.h.
bool pawsNpcDialogWindow::GetUseBubbles | ( | ) | [inline] |
Getter for useBubbles, which states if we use the bubbles based npcdialog interface.
Definition at line 145 of file pawsnpcdialog.h.
void pawsNpcDialogWindow::HandleMessage | ( | MsgEntry * | me | ) | [virtual] |
Implements psClientNetSubscriber.
virtual void pawsNpcDialogWindow::Hide | ( | ) | [virtual] |
Makes widget invisible and removes focus if widget has current focus.
Sets visible FALSE, hides border if present and then if focused when called it calls SetCurrentFocusedWidget(NULL).
Reimplemented from pawsWidget.
void pawsNpcDialogWindow::LoadQuest | ( | csString | xmlstr | ) |
Load quest info from xmlbinding message.
xmlstr | An xml string which contains quest info |
bool pawsNpcDialogWindow::LoadSetting | ( | ) |
Loads the settings from the config files and sets the window appropriately.
void pawsNpcDialogWindow::NpcSays | ( | ) |
Display NPC's chat text.
inText | Content that the NPC's chat text |
actor | The target NPC name |
bool pawsNpcDialogWindow::OnButtonPressed | ( | int | button, |
int | keyModifier, | ||
pawsWidget * | widget | ||
) | [virtual] |
callback function called when a pawsButton (bubble) is clicked
Reimplemented from pawsWidget.
bool pawsNpcDialogWindow::OnKeyDown | ( | utf32_char | keyCode, |
utf32_char | keyChar, | ||
int | modifiers | ||
) | [virtual] |
Process keydown messages.
keyCode | The code for the pressed key. |
keyChar | The key pressed. |
modifiers | Used to modify tab behavior. |
Reimplemented from pawsWidget.
void pawsNpcDialogWindow::OnListAction | ( | pawsListBox * | selected, |
int | status | ||
) | [virtual] |
Called whenever an item in a child list box is selected.
selected | The listbox that has the item selected. |
status | From listbox when a row is selected. |
Reimplemented from pawsWidget.
Manage mouse down event to test for and apply window changes.
button | Type of button: 1 resizable or movable, 2 context menu or config window. |
modifiers | Used with PAWS_CONSTRUCTION. |
x | Used to test for resize. |
y | Used to test for resize. |
Reimplemented from pawsWidget.
void pawsNpcDialogWindow::OnStringEntered | ( | const char * | name, |
int | param, | ||
const char * | value | ||
) | [virtual] |
When the pawsStringPromptWindow is created, a ptr to a class which implements this function is provided, and a "name" string is provided, so that a single window can use 1 callback for many fields.
Implements iOnStringEnteredAction.
bool pawsNpcDialogWindow::PostSetup | ( | ) | [virtual] |
Aquire pointers to widgets and load settings for the npc dialog.
Reimplemented from pawsWidget.
void pawsNpcDialogWindow::SaveSetting | ( | ) |
Saves the setting of the menu used for later use.
void pawsNpcDialogWindow::SetNpcMsgTimeoutScale | ( | float | timeoutScale | ) | [inline] |
Setter for npc messsage timeout.
The timeout determines how long a npc message is displayed. Apparently this is just a scaling factor for shortening or prolonging the display.
timeoutScale | is multiplied with the real factor. |
Definition at line 175 of file pawsnpcdialog.h.
void pawsNpcDialogWindow::SetupWindowWidgets | ( | ) |
Sets the widget appropriate for display depending on the type of npc dialog menu used.
void pawsNpcDialogWindow::SetUseBubbles | ( | bool | useBubblesNew | ) | [inline] |
Sets if we have to use the bubbles based npc dialog interface (true) or the classic menu based one (false).
Definition at line 154 of file pawsnpcdialog.h.
virtual void pawsNpcDialogWindow::Show | ( | ) | [virtual] |
Shows the window and applies some special handling to fix up the window Behaviour and graphics correctly depending if we use the classic menu or the bubble menu.
Reimplemented from pawsWidget.
void pawsNpcDialogWindow::ShowIfBubbles | ( | ) |
Shows the window only if it's in bubbles mode, else does nothing.
void pawsNpcDialogWindow::ShowOnlyFreeText | ( | ) |
Hides all bubbles except freetext and bye.
void pawsNpcDialogWindow::ShowSpeechBubble | ( | ) |
Shows the npc chat window and hides the menu bubbles.