<commit_before>#include "InventoryScreenExtras.h"

#include "com/mojang/minecraftpe/client/gui/screen/InventoryScreen.h"

std::shared_ptr<Touch::TButton> InventoryScreenExtras::forwardButton = NULL;
std::shared_ptr<Touch::TButton> InventoryScreenExtras::backButton = NULL;

void InventoryScreenExtras::init(InventoryScreen* self)
{
	if(!forwardButton)
	{
		forwardButton = std::make_shared<Touch::TButton>(0, ">", self->mcClient, false, 0x7FFFFFFF);
		forwardButton->init(self->mcClient);
	}
	
	if(!backButton)
	{
		backButton = std::make_shared<Touch::TButton>(0, "<", self->mcClient, false, 0x7FFFFFFF);
		backButton->init(self->mcClient);
	}
	
	self->buttonList.emplace_back(forwardButton);
	self->buttonList.emplace_back(backButton);
}

void InventoryScreenExtras::setupPositions(InventoryScreen* self)
{
	forwardButton->xPosition = self->width - 25;
	forwardButton->yPosition = self->height - 20;
	forwardButton->width = 20;
	forwardButton->height = 20;
	
	backButton->xPosition = self->width - 50;
	backButton->yPosition = self->height - 20;
	backButton->width = 20;
	backButton->height = 20;
}

void InventoryScreenExtras::render(InventoryScreen* self, int i1, int i2, float f1)
{
	self->drawString(self->font, "1 / 2", 5, self->height - 15, Color::WHITE);<commit_msg>now only the forward button closes the window<commit_after>#include "InventoryScreenExtras.h"

#include "com/mojang/minecraftpe/client/gui/screen/InventoryScreen.h"

std::shared_ptr<Touch::TButton> InventoryScreenExtras::forwardButton = NULL;
std::shared_ptr<Touch::TButton> InventoryScreenExtras::backButton = NULL;

void InventoryScreenExtras::init(InventoryScreen* self)
{
	if(!forwardButton)
	{
		forwardButton = std::make_shared<Touch::TButton>(0, ">", self->mcClient, false, 0x7FFFFFFF);
		forwardButton->init(self->mcClient);
	}
	
	if(!backButton)
	{
		backButton = std::make_shared<Touch::TButton>(1, "<", self->mcClient, false, 0x7FFFFFFF);
		backButton->init(self->mcClient);
	}
	
	self->buttonList.emplace_back(forwardButton);
	self->buttonList.emplace_back(backButton);
}

void InventoryScreenExtras::setupPositions(InventoryScreen* self)
{
	forwardButton->xPosition = self->width - 25;
	forwardButton->yPosition = self->height - 20;
	forwardButton->width = 20;
	forwardButton->height = 20;
	
	backButton->xPosition = self->width - 50;
	backButton->yPosition = self->height - 20;
	backButton->width = 20;
	backButton->height = 20;
}

void InventoryScreenExtras::render(InventoryScreen* self, int i1, int i2, float f1)
{
	self->drawString(self->font, "1 / 2", 5, self->height - 15, Color::WHITE);
{'fraction_non_alphanumeric': 0.15259488768396592, 'fraction_numerical': 0.023237800154918668, 'mean_word_length': 6.38, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6721155', 'n_tokens_mistral': 945, 'n_tokens_neox': 867, 'n_words': 142}