mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
FIX: Rewrite options
This commit is contained in:
17
src/client/gui/components/TextOption.cpp
Normal file
17
src/client/gui/components/TextOption.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "TextOption.h"
|
||||
#include <client/Minecraft.h>
|
||||
|
||||
TextOption::TextOption(Minecraft* minecraft, OptionId optId)
|
||||
: TextBox((int)optId, minecraft->options.getOpt(optId)->getStringId())
|
||||
{
|
||||
text = minecraft->options.getStringValue(optId);
|
||||
}
|
||||
|
||||
bool TextOption::loseFocus(Minecraft* minecraft) {
|
||||
if (TextBox::loseFocus(minecraft)) {
|
||||
minecraft->options.set((OptionId)id, text);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user