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

@@ -6,7 +6,7 @@
#include "GuiComponent.hpp"
class Font;
class Minecraft;
class MinecraftClient;
class Button;
class TextBox;
struct IntRectangle;
@@ -14,11 +14,11 @@ struct IntRectangle;
class Screen: public GuiComponent
{
public:
Screen();
Screen(MinecraftClient& minecraft);
virtual void render(int xm, int ym, float a);
void init(Minecraft* minecraft, int width, int height);
void init(int width, int height);
virtual void init();
void setSize(int width, int height);
@@ -67,7 +67,7 @@ public:
bool passEvents;
//GuiParticles* particles;
protected:
Minecraft* minecraft;
MinecraftClient& minecraft;
std::vector<Button*> buttons;
std::vector<TextBox*> textBoxes;