Trying to replace pointers with references :v

This commit is contained in:
Kolyah35 2026-04-04 14:33:56 +03:00
parent 7418263193
commit 12f5013ddb
126 changed files with 1343 additions and 2068 deletions

View file

@ -1,15 +1,15 @@
#include "TextOption.hpp"
#include <client/Minecraft.hpp>
TextOption::TextOption(Minecraft* minecraft, OptionId optId)
: TextBox((int)optId, minecraft->options.getOpt(optId)->getStringId())
TextOption::TextOption(MinecraftClient& minecraft, OptionId optId)
: TextBox((int)optId, minecraft.options().getOpt(optId)->getStringId())
{
text = minecraft->options.getStringValue(optId);
text = minecraft.options().getStringValue(optId);
}
bool TextOption::loseFocus(Minecraft* minecraft) {
bool TextOption::loseFocus(MinecraftClient& minecraft) {
if (TextBox::loseFocus(minecraft)) {
minecraft->options.set((OptionId)id, text);
minecraft.options().set((OptionId)id, text);
return true;
}