restructure codebase according to vcproj filters

This commit is contained in:
Tropical
2026-03-30 09:50:58 -05:00
parent d5cf90c713
commit 451682693e
3015 changed files with 46858 additions and 54635 deletions

View File

@@ -0,0 +1,46 @@
#include "../../../../../../Minecraft.World/Header Files/stdafx.h"
#include "AbstractBeaconButton.h"
#include "../../renderer/Textures.h"
#include "../../Minecraft.h"
#include <GL/gl.h>
// 4jcraft: referenced from MCP 8.11 (JE 1.6.4)
#ifdef ENABLE_JAVA_GUIS
extern ResourceLocation GUI_BEACON_LOCATION;
#endif
AbstractBeaconButton::AbstractBeaconButton(int id, int x, int y)
: Button(id, x, y, 22, 22, L"") {
hovered = false;
selected = false;
iconRes = nullptr;
iconU = iconV = 0;
}
void AbstractBeaconButton::renderBg(Minecraft* minecraft, int xm, int ym) {
#ifdef ENABLE_JAVA_GUIS
if (!visible) return;
hovered = (xm >= x && ym >= y && xm < x + w && ym < y + h);
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
minecraft->textures->bindTexture(&GUI_BEACON_LOCATION);
int texU = 0;
if (!active) {
texU += w * 2;
} else if (selected) {
texU += w * 1;
} else if (hovered) {
texU += w * 3;
}
int texV = 219;
blit(x, y, texU, texV, w, h);
if (iconRes != nullptr && iconRes != &GUI_BEACON_LOCATION) {
minecraft->textures->bindTexture(iconRes);
}
blit(x + 2, y + 2, iconU, iconV, 18, 18);
#endif
}