Replace Entry by TextEdit for string settings to workaround the limit of 255 characters
This commit is contained in:
@ -5,6 +5,7 @@ namespace ManiaControl\Plugins;
|
||||
use FML\Components\CheckBox;
|
||||
use FML\Components\ValuePicker;
|
||||
use FML\Controls\Entry;
|
||||
use FML\Controls\TextEdit;
|
||||
use FML\Controls\Frame;
|
||||
use FML\Controls\Label;
|
||||
use FML\Controls\Labels\Label_Button;
|
||||
@ -347,6 +348,19 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
||||
$label->setTextSize(1);
|
||||
$valuePicker = new ValuePicker(self::ACTION_PREFIX_SETTING . $setting->index, $setting->set, $setting->value, $label);
|
||||
$settingFrame->addChild($valuePicker);
|
||||
} else if ($setting->type === Setting::TYPE_STRING) {
|
||||
// Standard entry
|
||||
$textedit = new TextEdit();
|
||||
$settingFrame->addChild($textedit);
|
||||
$textedit->setX($width * 0.33);
|
||||
$textedit->setSize($width * 0.3, $settingHeight * 0.9);
|
||||
$textedit->setStyle(Label_Text::STYLE_TextValueSmall);
|
||||
$textedit->setTextSize(1);
|
||||
$textedit->setName(self::ACTION_PREFIX_SETTING . $setting->index);
|
||||
$textedit->setDefault($setting->value);
|
||||
$textedit->setHorizontalAlign(TextEdit::CENTER);
|
||||
$textedit->setVerticalAlign(TextEdit::CENTER);
|
||||
$textedit->setMaxLines(1);
|
||||
} else {
|
||||
// Value entry
|
||||
$entry = new Entry();
|
||||
|
Reference in New Issue
Block a user