From db11f2c20e7a6b0b1c50bc4f6bbc6e6ad43b2477 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Thu, 1 May 2025 13:43:04 -0500 Subject: [PATCH] comments --- src/dialogxml/dialogs/strdlog.cpp | 2 ++ 1 file changed, 2 insertions(+) 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;