25 #ifndef ENGINES_NWN_GUI_INGAME_DIALOG_H 26 #define ENGINES_NWN_GUI_INGAME_DIALOG_H 84 void getPosition(
float &x,
float &y,
float &z)
const;
142 std::list<Reply>::const_iterator
reply;
145 ReplyLine(std::list<Reply>::const_iterator &i);
183 bool isIn(
float x,
float y)
const;
186 void setHighlight(
const std::list<ReplyLine>::iterator &h);
192 Module &module,
bool playHello =
true);
209 void notifyResized(
int oldWidth,
int oldHeight,
int newWidth,
int newHeight);
249 #endif // ENGINES_NWN_GUI_INGAME_DIALOG_H Common::ScopedPtr< Portrait > _portrait
The current speaker's portrait.
void notifyResized(int oldWidth, int oldHeight, int newWidth, int newHeight)
float getWidth() const
Return the box's width.
A class holding an UTF-8 string.
void setPortrait(const Common::UString &portrait)
Set the current speaker's portrait.
float _height
The box's height.
std::list< Reply >::const_iterator _pickedReply
The picked (clicked) reply.
uint32 _replyCount
The number of replies.
void setName(const Common::UString &name)
Set the current speaker's name.
Reply(const Common::UString &r="", uint32 i=0xFFFFFFFF)
void addEvent(const Events::Event &event)
Add a single event for consideration into the event queue.
int processEventQueue()
Process the current event queue.
void hide()
Hide the dialog.
std::list< Reply >::const_iterator reply
Common::ScopedPtr< Aurora::DLGFile > _dlg
The conversation file.
void setPosition(float x, float y, float z)
Set the box's position.
void pickReply(uint32 n)
Pick the reply number n.
void clearReplies()
Clear the PC replies.
Graphics::Aurora::Text * line
void mouseMove()
The mouse was moved.
std::list< Reply > _replies
The PC replies.
uint32 getPickedID() const
Return the reply ID that was clicked.
void abort()
Abort the current conversation.
void playSound(bool greeting)
Play a conversation sound.
float _replyCountWidth
The max width of a reply number text.
A simple scoped smart pointer template.
A list storing pointer to objects, with automatic deletion.
Common::UString _entry
The NPC entry.
float _x
The box's X position.
void render(Graphics::RenderPass pass)
Render the object.
Common::ScopedPtr< Graphics::Aurora::Text > _name
The current speaker's name.
void stopAnimation()
Stop a conversation animation.
void showEntry()
Show the entry.
Common::PtrList< Graphics::Aurora::Text > _entryLines
The NPC text lines.
Object * _object
The conversation's NPC.
void updateBox()
Update the box's contents.
void getPosition(float &x, float &y, float &z) const
Return the box's position.
Graphics::Aurora::Text * count
float _y
The box's Y position.
Creature * _pc
The conversation's PC.
void setEntry(const Common::UString &entry)
Set the NPC entry.
Dialog(const Common::UString &conv, Creature &pc, Object &obj, Module &module, bool playHello=true)
A handle to an Aurora font.
void keyPressed(const Events::Event &event)
A keyboard key was pressed.
void calculateDistance()
Calculate the object's distance.
void hideReplies()
Hide the replies.
std::list< ReplyLine >::iterator _highlightedReply
The currently highlighted reply.
A class that can be notified by the NotificationManager.
A scoped plain pointer, allowing pointer-y access and normal deletion.
void mouseClick(int x, int y)
Notify the box that the mouse was clicked.
void mouseMove(int x, int y)
Notify the box that the mouse was moved.
Module * _module
The module this dialog is in.
DialogBox(float width, float height)
void showReplies()
Show the replies.
void show()
Show the dialog.
float _z
The box's Z position.
void hideEntry()
Hide the entry.
Graphics::Aurora::FontHandle _font
The dialog font.
Common::ScopedPtr< DialogBox > _dlgBox
The actual dialog box.
void addReply(const Common::UString &reply, uint32 id)
Add a PC reply.
void mouseClick(const Events::Event &event)
The mouse was clicked.
void clear()
Clear the complete contents.
bool hasEnded() const
Has the conversation ended?
void setHighlight(const std::list< ReplyLine >::iterator &h)
Set the highlighted reply.
void clearEntry()
Clear the NPC entry.
bool isIn(float x, float y) const
Are the coordinates inside the box?
void finishReplies()
Finished adding PC replies.
void playAnimation()
Play a conversation animation.
Common::UString _conv
The conversation file.
float _width
The box's width.
std::list< ReplyLine > _replyLines
The PC text lines.
float getHeight() const
Return the box's height.
std::list< Events::Event > _eventQueue
The event queue.
Object * getSpeaker()
Get the current speaker.