diff --git a/Minecraft.Client/UI/Screens/AbstractContainerScreen.cpp b/Minecraft.Client/UI/Screens/AbstractContainerScreen.cpp index 80e1ff815..00a7e81f1 100644 --- a/Minecraft.Client/UI/Screens/AbstractContainerScreen.cpp +++ b/Minecraft.Client/UI/Screens/AbstractContainerScreen.cpp @@ -116,7 +116,7 @@ void AbstractContainerScreen::render(int xm, int ym, float a) { // places) void AbstractContainerScreen::renderTooltipInternal( const std::vector& cleanedLines, - const std::vector& lineColors, int mouseX, int mouseY) { + const std::vector& lineColors, int xm, int ym) { if (cleanedLines.empty()) return; int tooltipWidth = 0; @@ -125,8 +125,8 @@ void AbstractContainerScreen::renderTooltipInternal( if (lineWidth > tooltipWidth) tooltipWidth = lineWidth; } - int tooltipX = mouseX + 12; - int tooltipY = mouseY - 12; + int tooltipX = xm + 12; + int tooltipY = ym - 12; int tooltipHeight = 8; if (cleanedLines.size() > 1) { @@ -175,7 +175,7 @@ void AbstractContainerScreen::renderTooltipInternal( } void AbstractContainerScreen::renderTooltip(std::shared_ptr item, - int mouseX, int mouseY) { + int xm, int ym) { if (item == nullptr) return; std::vector elementName; @@ -240,12 +240,12 @@ void AbstractContainerScreen::renderTooltip(std::shared_ptr item, lineColors[0] = app.GetHTMLColour(item->getRarity()->color); } - renderTooltipInternal(cleanedLines, lineColors, mouseX, mouseY); + renderTooltipInternal(cleanedLines, lineColors, xm, ym); } } void AbstractContainerScreen::renderTooltip( - const std::vector& lines, int mouseX, int mouseY) { + const std::vector& lines, int xm, int ym) { if (lines.empty()) return; std::vector cleanedLines = lines; @@ -260,12 +260,12 @@ void AbstractContainerScreen::renderTooltip( } } - renderTooltipInternal(cleanedLines, lineColors, mouseX, mouseY); + renderTooltipInternal(cleanedLines, lineColors, xm, ym); } -void AbstractContainerScreen::renderTooltip(const std::wstring& line, - int mouseX, int mouseY) { - renderTooltip(std::vector{line}, mouseX, mouseY); +void AbstractContainerScreen::renderTooltip(const std::wstring& line, int xm, + int ym) { + renderTooltip(std::vector{line}, xm, ym); } void AbstractContainerScreen::renderLabels() {} diff --git a/Minecraft.Client/UI/Screens/AbstractContainerScreen.h b/Minecraft.Client/UI/Screens/AbstractContainerScreen.h index 72f774ef6..462e178d5 100644 --- a/Minecraft.Client/UI/Screens/AbstractContainerScreen.h +++ b/Minecraft.Client/UI/Screens/AbstractContainerScreen.h @@ -36,9 +36,9 @@ protected: // used in other places virtual void renderTooltipInternal( const std::vector& cleanedLines, - const std::vector& lineColors, int mouseX, int mouseY); - virtual void renderTooltip(std::shared_ptr item, int x, - int y); + const std::vector& lineColors, int xm, int ym); + virtual void renderTooltip(std::shared_ptr item, int xm, + int ym); private: virtual void renderSlot(Slot* slot); @@ -55,7 +55,7 @@ public: virtual void tick() override; // 4jcraft: 1.6.x era overloads - virtual void renderTooltip(const std::vector& lines, int x, - int y); - virtual void renderTooltip(const std::wstring& line, int x, int y); + virtual void renderTooltip(const std::vector& lines, int xm, + int ym); + virtual void renderTooltip(const std::wstring& line, int xm, int ym); }; diff --git a/Minecraft.Client/UI/Screens/CreativeInventoryScreen.cpp b/Minecraft.Client/UI/Screens/CreativeInventoryScreen.cpp index 30f0d068c..f2773df8f 100644 --- a/Minecraft.Client/UI/Screens/CreativeInventoryScreen.cpp +++ b/Minecraft.Client/UI/Screens/CreativeInventoryScreen.cpp @@ -90,8 +90,8 @@ bool CreativeInventoryScreen::ContainerCreative::stillValid( std::shared_ptr CreativeInventoryScreen::ContainerCreative::clicked( - int slotIndex, int buttonNum, int clickType, - std::shared_ptr player) { + int slotIndex, int buttonNum, int clickType, std::shared_ptr player, + bool looped) { std::shared_ptr inventory = player->inventory; std::shared_ptr carried = inventory->getCarried(); diff --git a/Minecraft.Client/UI/Screens/CreativeInventoryScreen.h b/Minecraft.Client/UI/Screens/CreativeInventoryScreen.h index 6a4ba7847..f4f6004fa 100644 --- a/Minecraft.Client/UI/Screens/CreativeInventoryScreen.h +++ b/Minecraft.Client/UI/Screens/CreativeInventoryScreen.h @@ -51,10 +51,10 @@ public: std::vector> itemList; ContainerCreative(std::shared_ptr player); - virtual bool stillValid(std::shared_ptr player); + virtual bool stillValid(std::shared_ptr player) override; virtual std::shared_ptr clicked( int slotIndex, int buttonNum, int clickType, - std::shared_ptr player); + std::shared_ptr player, bool looped = false) override; void scrollTo(float pos); bool canScroll(); };