@@ -36,6 +36,13 @@ DropDownListStringItem::DropDownListStri
{
}
DropDownListStringItem::DropDownListStringItem(const std::string &string, int result, bool masked) : DropDownListItem(result, masked)
/* A raw string may contain parsable tokens, so it needs to be passed through GetString. */
SetDParamStr(0, string);
this->string = GetString(STR_JUST_RAW_STRING);
uint DropDownListStringItem::Width() const
return GetStringBoundingBox(this->String()).width + WidgetDimensions::scaled.dropdowntext.Horizontal();
@@ -37,10 +37,10 @@ public:
*/
class DropDownListStringItem : public DropDownListItem {
public:
const std::string string; ///< String of item
std::string string; ///< String of item
DropDownListStringItem(StringID string, int result, bool masked);
DropDownListStringItem(const std::string &string, int result, bool masked) : DropDownListItem(result, masked), string(string) {}
DropDownListStringItem(const std::string &string, int result, bool masked);
bool Selectable() const override { return true; }
uint Width() const override;
Status change: