Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

FishDialog.cpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004 Ivo Danihelka (ivo@danihelka.net)
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published by
00006  * the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  */
00009 #include "FishDialog.h"
00010 
00011 #include "SubTitleAgent.h"
00012 
00013 //-----------------------------------------------------------------
00014 /**
00015  * Prepare new wavy dialoge.
00016  * @param lang lang
00017  * @param soundfile a wav file
00018  * @param subtitle subtitle
00019  * @param fontname name of selected font
00020  */
00021 FishDialog::FishDialog(const std::string &lang,
00022         const std::string &soundfile, const std::string &subtitle,
00023         const std::string &fontname)
00024 : Dialog(lang, soundfile, subtitle), m_fontname(fontname)
00025 {
00026     /* empty */
00027 }
00028 //-----------------------------------------------------------------
00029 /**
00030  * Subtitles are optional, dialog can have only sound.
00031  */
00032 void
00033 FishDialog::runSubtitle(const StringTool::t_args &args) const
00034 {
00035     if (!m_fontname.empty()) {
00036         std::string subtitle = getFormatedSubtitle(args);
00037         if (!subtitle.empty()) {
00038             SubTitleAgent::agent()->newSubtitle(subtitle, m_fontname);
00039         }
00040     }
00041 }
00042 

Generated on Wed Jun 1 09:54:31 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2