mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-19 22:43:32 +00:00
FIX: override warnings
This commit is contained in:
@@ -12,21 +12,21 @@ public:
|
||||
IngameBlockSelectionScreen();
|
||||
virtual ~IngameBlockSelectionScreen() {}
|
||||
|
||||
virtual void init();
|
||||
virtual void removed();
|
||||
virtual void init() override;
|
||||
virtual void removed() override;
|
||||
|
||||
void render(int xm, int ym, float a);
|
||||
void render(int xm, int ym, float a) 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;
|
||||
|
||||
virtual void buttonClicked(Button* button);
|
||||
virtual void buttonClicked(Button* button) override;
|
||||
|
||||
// wheel input for creative inventory scrolling
|
||||
virtual void mouseWheel(int dx, int dy, int xm, int ym) override;
|
||||
|
||||
virtual void keyPressed(int eventKey);
|
||||
virtual void keyPressed(int eventKey) override;
|
||||
private:
|
||||
void renderSlots();
|
||||
void renderSlot(int slot, int x, int y, float a);
|
||||
|
||||
@@ -102,21 +102,6 @@ void JoinByIPScreen::setupPositions() {
|
||||
tIP.y = ((height - bJoin.height) / 2) - tIP.height - 4;
|
||||
}
|
||||
|
||||
void JoinByIPScreen::mouseClicked(int x, int y, int buttonNum) {
|
||||
int lvlTop = tIP.y - (Font::DefaultLineHeight + 4);
|
||||
int lvlBottom = tIP.y + tIP.height;
|
||||
int lvlLeft = tIP.x;
|
||||
int lvlRight = tIP.x + tIP.width;
|
||||
bool clickedIP = x >= lvlLeft && x < lvlRight && y >= lvlTop && y < lvlBottom;
|
||||
|
||||
if (clickedIP) {
|
||||
tIP.setFocus(minecraft);
|
||||
} else {
|
||||
tIP.loseFocus(minecraft);
|
||||
}
|
||||
|
||||
Screen::mouseClicked(x, y, buttonNum);
|
||||
}
|
||||
void JoinByIPScreen::render( int xm, int ym, float a )
|
||||
{
|
||||
renderBackground();
|
||||
@@ -131,10 +116,4 @@ void JoinByIPScreen::keyPressed(int eventKey)
|
||||
}
|
||||
// let base class handle navigation and text box keys
|
||||
Screen::keyPressed(eventKey);
|
||||
}
|
||||
|
||||
void JoinByIPScreen::keyboardNewChar(char inputChar)
|
||||
{
|
||||
// forward character input to focused textbox(s)
|
||||
for (auto* tb : textBoxes) tb->handleChar(inputChar);
|
||||
}
|
||||
@@ -18,9 +18,7 @@ public:
|
||||
void render(int xm, int ym, float a);
|
||||
|
||||
virtual void keyPressed(int eventKey);
|
||||
virtual void keyboardNewChar(char inputChar);
|
||||
void buttonClicked(Button* button);
|
||||
virtual void mouseClicked(int x, int y, int buttonNum);
|
||||
virtual bool handleBackEvent(bool isDown);
|
||||
private:
|
||||
TextBox tIP;
|
||||
|
||||
@@ -73,6 +73,11 @@ void StartMenuScreen::init()
|
||||
// always show base version string, suffix was previously added for Android builds
|
||||
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)";
|
||||
@@ -153,8 +158,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);
|
||||
|
||||
#if defined(RPI)
|
||||
TextureId id = minecraft->textures->loadTexture("gui/pi_title.png");
|
||||
|
||||
@@ -33,6 +33,8 @@ private:
|
||||
|
||||
std::string version;
|
||||
int versionPosX;
|
||||
|
||||
std::string username;
|
||||
};
|
||||
|
||||
#endif /*NET_MINECRAFT_CLIENT_GUI_SCREENS__StartMenuScreen_H__*/
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ private:
|
||||
|
||||
std::string version;
|
||||
int versionPosX;
|
||||
|
||||
std::string username;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user