the whole game

This commit is contained in:
2026-03-02 22:04:18 +03:00
parent 816e9060b4
commit f0617a5d22
2069 changed files with 581500 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#include "OptionsItem.h"
#include "../../Minecraft.h"
#include "../../../util/Mth.h"
OptionsItem::OptionsItem( std::string label, GuiElement* element )
: GuiElementContainer(false, true, 0, 0, 24, 12),
label(label) {
addChild(element);
}
void OptionsItem::setupPositions() {
int currentHeight = 0;
for(std::vector<GuiElement*>::iterator it = children.begin(); it != children.end(); ++it) {
(*it)->x = x + width - (*it)->width - 15;
(*it)->y = y + currentHeight;
currentHeight += (*it)->height;
}
height = currentHeight;
}
void OptionsItem::render( Minecraft* minecraft, int xm, int ym ) {
int yOffset = (height - 8) / 2;
minecraft->font->draw(label, (float)x, (float)y + yOffset, 0x909090, false);
super::render(minecraft, xm, ym);
}