58 load(k2 ?
"dialog_p" :
"dialog");
66 _dlg->startConversation();
98 if (selectedIndex >= 0)
142 const float hh = height / 2.0f;
143 const float rh = hh / 2.0f;
145 _frame->setRectangleHeight(rh);
150 lblMessage->
setPosition(-w / 2.0f, hh - rh, -1.0f);
165 lblMessage->
setTextColor(0.101961f, 0.698039f, 0.549020f, 1.0f);
167 lblMessage->
setTextColor(0.0f, 0.648438f, 0.968750f, 1.0f);
182 const std::vector<const Aurora::DLGFile::Line *> replies =
_dlg->getCurrentReplies();
210 for (std::vector<const Aurora::DLGFile::Line *>::const_iterator it = replies.begin();
262 if (
_dlg->hasEnded()) {
272 if (obit == str.
end())
276 if (cbit == str.
end())
279 str.
erase(obit, ++cbit);
284 update(newWidth, newHeight);
A creature in a Star Wars: Knights of the Old Republic area.
void playDefaultAnimations(const Common::UString &tag)
void load(const Common::UString &resref)
void callbackKeyInput(const Events::Key &key, const Events::EventType &type)
Callback that's triggered when a key is pressed or released.
KotOR::Object * getObjectByTag(const Common::UString &tag)
virtual void playTalkAnimations(const Common::UString &tag)=0
A label widget for Star Wars: Knights of the Old Republic and Jade Empire.
Common::UString _curSpeaker
A class holding an UTF-8 string.
void reset(PointerType o=0)
Resets the pointer with the new value.
The global config manager.
bool beginsWith(const UString &with) const
void notifyResized(int oldWidth, int oldHeight, int newWidth, int newHeight)
Engine utility class for camera handling where camera rotates around PC.
The global window manager.
void pickReply(int index)
virtual void hide()
Hide the GUI.
Common::ScopedPtr< Sound::ChannelHandle > _voice
iterator findFirst(uint32 c) const
void playHeadAnimation(const Common::UString &anim, bool restart=true, float length=0.0f, float speed=1.0f)
const Common::UString & getString(Language language, LanguageGender gender=kLanguageGenderCurrent) const
Get the string of that language.
void eraseDeveloperNotes(Common::UString &str)
Some dialog entries in KotOR 2 contain developer notes in curly braces.
Exception that provides a stack of explanations.
Common::UString sound
ResRef of the sound to play while speaking this entry.
const Common::UString & getTag() const
void playTalkAnimations(const Common::UString &tag)
Common::UString voice
ResRef of the voice over for KotOR games.
Keyboard key was pressed.
DialogGUI(Module &module)
virtual void playDefaultAnimations(const Common::UString &tag)=0
void makeLookAtPC(const Common::UString &tag)
utf8::iterator< std::string::const_iterator > iterator
const char * c_str() const
Return the (utf8 encoded) string data.
static UString format(const char *s,...) GCC_PRINTF(1
Print formatted data into an UString object, similar to sprintf().
#define ConfigMan
Shortcut for accessing the config manager.
void callbackActive(Widget &widget)
Callback that's triggered when a widget was activated.
uint32 id
ID of this line (entry-local).
A list box widget for Star Wars: Knights of the Old Republic and Jade Empire.
Common::ScopedPtr< Sound::ChannelHandle > _sound
The global sound manager, handling all sound output.
bool empty() const
Is the string empty?
#define SoundMan
Shortcut for accessing the sound manager.
void playAnimation(const Common::UString &anim, bool restart=true, float length=0.0f, float speed=1.0f)
const float kVAlignBottom
void startConversation(const Common::UString &name, Aurora::NWScript::Object *owner=0)
virtual void makeLookAtPC(const Common::UString &tag)=0
virtual void getOrientation(float &x, float &y, float &z, float &angle) const
Return the object's orientation.
void warning(const char *s,...)
#define CursorMan
Shortcut for accessing the cursor manager.
The context holding a Star Wars: Knights of the Old Republic area.
virtual void show()
Show the GUI.
const float kHAlignCenter
The Aurora cursor manager.
Sound::ChannelHandle playSound(const Common::UString &sound, Sound::SoundType soundType, bool loop, float volume, bool pitchVariance)
Play this sound resource.
void update(int width, int height)
Updates the gui when a resize occurs or it is created.
WidgetLabel * getLabel(const Common::UString &tag, bool vital=false)
PointerType get() const
Returns the plain pointer value.
#define WindowMan
Shortcut for accessing the window manager.
void playDefaultAnimation()
void makeLookAt(float x, float y)
A handle to a sound channel.
bool isConversationActive() const
EventType
Custom event types.
static Creature * toCreature(Aurora::NWScript::Object *object)
void erase(iterator from, iterator to)
Erase the character within this range.
WidgetListBox * getListBox(const Common::UString &tag, bool vital=false)
Generic Aurora engines utility functions.
Conversation/cutscene GUI for Star Wars: Knights of the Old Republic.
void playDefaultHeadAnimation()
The context needed to run a Star Wars: Knights of the Old Republic module.
const char * what() const
Common::ScopedPtr< Graphics::Aurora::KotORDialogFrame > _frame
Area * getCurrentArea()
Return the area the PC is currently in.
static float deg2rad(float deg)
Handling BioWare's DLGs (dialog / conversation files).
void clear()
Clear the string's contents.
Common::ScopedPtr< Aurora::DLGFile > _dlg
Common::UString speaker
Tag of the speaker, empty if default.
std::vector< uint32 > _replyIds
LocString text
The actual text of the entry.
Creature * getPC()
Return the currently playing PC.