chore: format Minecraft.Client

This commit is contained in:
Tropical
2026-03-13 17:10:10 -05:00
parent 33d0737d1d
commit e8424f2000
531 changed files with 67709 additions and 62690 deletions

View File

@@ -3,20 +3,22 @@
#include "../SmallButton.h"
#include "../../../Minecraft.World/Headers/net.minecraft.locale.h"
ConfirmScreen::ConfirmScreen(Screen *parent, const std::wstring& title1, const std::wstring& title2, int id)
{
ConfirmScreen::ConfirmScreen(Screen* parent, const std::wstring& title1,
const std::wstring& title2, int id) {
this->parent = parent;
this->title1 = title1;
this->title2 = title2;
this->id = id;
Language *language = Language::getInstance();
Language* language = Language::getInstance();
yesButton = language->getElement(L"gui.yes");
noButton = language->getElement(L"gui.no");
}
ConfirmScreen::ConfirmScreen(Screen *parent, const std::wstring& title1, const std::wstring& title2, const std::wstring& yesButton, const std::wstring& noButton, int id)
{
ConfirmScreen::ConfirmScreen(Screen* parent, const std::wstring& title1,
const std::wstring& title2,
const std::wstring& yesButton,
const std::wstring& noButton, int id) {
this->parent = parent;
this->title1 = title1;
this->title2 = title2;
@@ -25,19 +27,18 @@ ConfirmScreen::ConfirmScreen(Screen *parent, const std::wstring& title1, const s
this->id = id;
}
void ConfirmScreen::init()
{
buttons.push_back(new SmallButton(0, width / 2 - 155 + 0 % 2 * 160, height / 6 + 24 * 4, yesButton));
buttons.push_back(new SmallButton(1, width / 2 - 155 + 1 % 2 * 160, height / 6 + 24 * 4, noButton));
void ConfirmScreen::init() {
buttons.push_back(new SmallButton(0, width / 2 - 155 + 0 % 2 * 160,
height / 6 + 24 * 4, yesButton));
buttons.push_back(new SmallButton(1, width / 2 - 155 + 1 % 2 * 160,
height / 6 + 24 * 4, noButton));
}
void ConfirmScreen::buttonClicked(Button *button)
{
parent->confirmResult(button->id == 0, id);
void ConfirmScreen::buttonClicked(Button* button) {
parent->confirmResult(button->id == 0, id);
}
void ConfirmScreen::render(int xm, int ym, float a)
{
void ConfirmScreen::render(int xm, int ym, float a) {
renderBackground();
drawCenteredString(font, title1, width / 2, 70, 0xffffff);
@@ -45,11 +46,10 @@ void ConfirmScreen::render(int xm, int ym, float a)
Screen::render(xm, ym, a);
// 4J - debug code - remove
static int count = 0;
if( count++ == 100 )
{
count = 0;
buttonClicked(buttons[0]);
}
// 4J - debug code - remove
static int count = 0;
if (count++ == 100) {
count = 0;
buttonClicked(buttons[0]);
}
}