wip label_width

This commit is contained in:
supermerill 2020-01-14 19:34:22 +01:00
parent d355df4be5
commit 885330d54b
2 changed files with 7 additions and 2 deletions

View File

@ -1474,7 +1474,9 @@ public:
// Height of a multiline GUI text box.
int height = -1;
// Optional width of an input field.
int width = -1;
int width = -1;
// Optional label width of an input field (if in a line).
int label_width = -1;
// <min, max> limit of a numeric input.
// If not set, the <min, max> is set to <INT_MIN, INT_MAX>
// By setting min=0, only nonnegative input is allowed.

View File

@ -1318,7 +1318,10 @@ bool Tab::create_pages(std::string setting_type_name)
option.opt.full_width = true;
}
else if (boost::starts_with(params[i], "width$")) {
option.opt.width = atoi(params[i].substr(6, params[i].size()-6).c_str());
option.opt.width = atoi(params[i].substr(6, params[i].size() - 6).c_str());
}
else if (boost::starts_with(params[i], "label_width$")) {
option.opt.label_width = atoi(params[i].substr(12, params[i].size() - 12).c_str());
}
else if (boost::starts_with(params[i], "height$")) {
option.opt.height = atoi(params[i].substr(7, params[i].size() - 7).c_str());