diff --git a/src/dialogxml/dialogs/strdlog.cpp b/src/dialogxml/dialogs/strdlog.cpp index e57aafcc..43c0bd85 100644 --- a/src/dialogxml/dialogs/strdlog.cpp +++ b/src/dialogxml/dialogs/strdlog.cpp @@ -15,6 +15,7 @@ #include "mathutil.hpp" #include "utility.hpp" +// Pick a layout variant depending on number of strings, picture size, and whether a title is given DialogDefn& cStrDlog::getDefn(short n_strs, ePicType type, bool hasTitle){ std::ostringstream sout; sout << minmax(1, 2, n_strs) << "str"; @@ -24,6 +25,7 @@ DialogDefn& cStrDlog::getDefn(short n_strs, ePicType type, bool hasTitle){ return *ResMgr::dialogs.get(sout.str()); } +// This uses a 1str- or 2str- layout variant depending on if one of the strings are empty cStrDlog::cStrDlog(std::string str1,std::string str2,std::string title,pic_num_t pic,ePicType t,cDialog* parent) : dlg(cStrDlog::getDefn((str1 != "") + (str2 != ""), t, title != ""), parent), type(t) { using namespace std::placeholders;