forked from mirrors/kolyah35-minecraft-pe-0.6.1
17 lines
No EOL
461 B
C++
17 lines
No EOL
461 B
C++
#include "TextOption.hpp"
|
|
#include <client/Minecraft.hpp>
|
|
|
|
TextOption::TextOption(MinecraftClient& minecraft, OptionId optId)
|
|
: TextBox((int)optId, minecraft.options().getOpt(optId)->getStringId())
|
|
{
|
|
text = minecraft.options().getStringValue(optId);
|
|
}
|
|
|
|
bool TextOption::loseFocus(MinecraftClient& minecraft) {
|
|
if (TextBox::loseFocus(minecraft)) {
|
|
minecraft.options().set((OptionId)id, text);
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
} |