mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Fixed some Clang compiler warnings
This commit is contained in:
parent
3a5c4a7605
commit
8689b3aecf
|
|
@ -89,7 +89,7 @@ void TextEditComponent::onSizeChanged()
|
||||||
onTextChanged(); // Wrap point probably changed.
|
onTextChanged(); // Wrap point probably changed.
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextEditComponent::setValue(const std::string& val, bool update)
|
void TextEditComponent::setText(const std::string& val, bool update)
|
||||||
{
|
{
|
||||||
mText = val;
|
mText = val;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public:
|
||||||
|
|
||||||
void onSizeChanged() override;
|
void onSizeChanged() override;
|
||||||
|
|
||||||
void setValue(const std::string& val, bool update = true);
|
void setText(const std::string& val, bool update = true);
|
||||||
std::string getValue() const override;
|
std::string getValue() const override;
|
||||||
|
|
||||||
void startEditing();
|
void startEditing();
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@ GuiTextEditKeyboardPopup::GuiTextEditKeyboardPopup(
|
||||||
glm::ivec2 {mHorizontalKeyCount, static_cast<int>(kbLayout.size()) / 3});
|
glm::ivec2 {mHorizontalKeyCount, static_cast<int>(kbLayout.size()) / 3});
|
||||||
|
|
||||||
mText = std::make_shared<TextEditComponent>(mMultiLine);
|
mText = std::make_shared<TextEditComponent>(mMultiLine);
|
||||||
mText->setValue(initValue, false);
|
mText->setText(initValue, false);
|
||||||
|
|
||||||
// Header.
|
// Header.
|
||||||
mGrid.setEntry(mTitle, glm::ivec2 {0, 0}, false, true);
|
mGrid.setEntry(mTitle, glm::ivec2 {0, 0}, false, true);
|
||||||
|
|
@ -685,12 +685,12 @@ std::shared_ptr<ButtonComponent> GuiTextEditKeyboardPopup::makeButton(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (key == _("LOAD")) {
|
else if (key == _("LOAD")) {
|
||||||
mText->setValue(mDefaultValue->getValue());
|
mText->setText(mDefaultValue->getValue());
|
||||||
mText->setCursor(mDefaultValue->getValue().size());
|
mText->setCursor(mDefaultValue->getValue().size());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (key == _("CLEAR")) {
|
else if (key == _("CLEAR")) {
|
||||||
mText->setValue("");
|
mText->setText("");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (key == _("CANCEL")) {
|
else if (key == _("CANCEL")) {
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ GuiTextEditPopup::GuiTextEditPopup(const HelpStyle& helpstyle,
|
||||||
}
|
}
|
||||||
|
|
||||||
mText = std::make_shared<TextEditComponent>(mMultiLine);
|
mText = std::make_shared<TextEditComponent>(mMultiLine);
|
||||||
mText->setValue(initValue, false);
|
mText->setText(initValue, false);
|
||||||
|
|
||||||
std::vector<std::shared_ptr<ButtonComponent>> buttons;
|
std::vector<std::shared_ptr<ButtonComponent>> buttons;
|
||||||
buttons.push_back(
|
buttons.push_back(
|
||||||
|
|
@ -67,14 +67,14 @@ GuiTextEditPopup::GuiTextEditPopup(const HelpStyle& helpstyle,
|
||||||
if (mComplexMode) {
|
if (mComplexMode) {
|
||||||
buttons.push_back(
|
buttons.push_back(
|
||||||
std::make_shared<ButtonComponent>(_("LOAD"), loadBtnHelpText, [this, defaultValue] {
|
std::make_shared<ButtonComponent>(_("LOAD"), loadBtnHelpText, [this, defaultValue] {
|
||||||
mText->setValue(defaultValue);
|
mText->setText(defaultValue);
|
||||||
mText->setCursor(0);
|
mText->setCursor(0);
|
||||||
mText->setCursor(defaultValue.size());
|
mText->setCursor(defaultValue.size());
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
buttons.push_back(std::make_shared<ButtonComponent>(_("CLEAR"), clearBtnHelpText,
|
buttons.push_back(std::make_shared<ButtonComponent>(_("CLEAR"), clearBtnHelpText,
|
||||||
[this] { mText->setValue(""); }));
|
[this] { mText->setText(""); }));
|
||||||
|
|
||||||
buttons.push_back(std::make_shared<ButtonComponent>(_("CANCEL"), _("discard changes"),
|
buttons.push_back(std::make_shared<ButtonComponent>(_("CANCEL"), _("discard changes"),
|
||||||
[this] { delete this; }));
|
[this] { delete this; }));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue