mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-26 05:16:46 +00:00
refactor(jui): specify overrides, resourcelocations, and localization
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
#include "Button.h"
|
||||
#include "../Textures/Textures.h"
|
||||
|
||||
#ifdef ENABLE_JAVA_GUIS
|
||||
ResourceLocation GUI_GUI_LOCATION = ResourceLocation(TN_GUI_GUI);
|
||||
#endif
|
||||
|
||||
Button::Button(int id, int x, int y, const std::wstring& msg) {
|
||||
init(id, x, y, 200, 20, msg);
|
||||
}
|
||||
@@ -38,8 +42,9 @@ void Button::render(Minecraft* minecraft, int xm, int ym) {
|
||||
|
||||
Font* font = minecraft->font;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, minecraft->textures->loadTexture(
|
||||
TN_GUI_GUI)); // 4J was L"/gui/gui.png"
|
||||
// glBindTexture(GL_TEXTURE_2D, minecraft->textures->loadTexture(
|
||||
// TN_GUI_GUI)); // 4J was L"/gui/gui.png"
|
||||
minecraft->textures->bindTexture(&GUI_GUI_LOCATION);
|
||||
glColor4f(1, 1, 1, 1);
|
||||
|
||||
bool hovered = xm >= x && ym >= y && xm < x + w && ym < y + h;
|
||||
|
||||
Reference in New Issue
Block a user