FIX: override warnings

This commit is contained in:
Kolyah35
2026-03-14 14:51:42 +03:00
parent bb95e75c47
commit e49fe348e3
15 changed files with 62 additions and 61 deletions

View File

@@ -21,24 +21,24 @@ public:
IngameBlockSelectionScreen();
virtual ~IngameBlockSelectionScreen();
virtual void init();
virtual void setupPositions();
virtual void removed();
virtual void init() override;
virtual void setupPositions() override;
virtual void removed() override;
void tick();
void render(int xm, int ym, float a);
void tick() override;
void render(int xm, int ym, float a) override;
bool hasClippingArea(IntRectangle& out);
bool hasClippingArea(IntRectangle& out) override;
// IInventoryPaneCallback
bool addItem(const InventoryPane* pane, int itemId);
bool isAllowed(int slot);
std::vector<const ItemInstance*> getItems(const InventoryPane* forPane);
bool addItem(const InventoryPane* pane, int itemId) override;
bool isAllowed(int slot) override;
std::vector<const ItemInstance*> getItems(const InventoryPane* forPane) override;
void buttonClicked(Button* button);
void buttonClicked(Button* button) override;
protected:
virtual void mouseClicked(int x, int y, int buttonNum);
virtual void mouseReleased(int x, int y, int buttonNum);
virtual void mouseClicked(int x, int y, int buttonNum) override;
virtual void mouseReleased(int x, int y, int buttonNum) override;
// also support wheel scrolling
virtual void mouseWheel(int dx, int dy, int xm, int ym) override;

View File

@@ -85,6 +85,11 @@ void StartMenuScreen::init()
// always show base version string
std::string versionString = Common::getGameVersionString();
std::string _username = minecraft->options.getStringValue(OPTIONS_USERNAME);
if (_username.empty()) _username = "unknown";
username = "Username: " + _username;
#ifdef DEMO_MODE
#ifdef __APPLE__
version = versionString + " (Lite)";
@@ -162,8 +167,7 @@ void StartMenuScreen::render( int xm, int ym, float a )
renderBackground();
// Show current username in the top-left corner
std::string username = minecraft->options.username.empty() ? "unknown" : minecraft->options.username;
drawString(font, std::string("Username: ") + username, 2, 2, 0xffffffff);
drawString(font, username, 2, 2, 0xffffffff);
glEnable2(GL_BLEND);

View File

@@ -35,6 +35,8 @@ private:
std::string version;
int versionPosX;
std::string username;
};
};