forked from Kolyah35/minecraft-pe-0.6.1
Added GUI Styles with 3 options: Java, Pi/Xperia and Pocket Hopefully fixed touch input eating and breaking blocks bug Fire should render on all mobs now Fixed only one side of the first person burning animation being animated Added Window Scaling Option for PC Users (Hasn't been tested on other platforms Render Distance is now configurable from the settings menu Tried to fix shadows again on IOS and Android, hopefully works? Block Outline Selection now has a thicker outline for better visibility
61 lines
1.4 KiB
C++
Executable File
61 lines
1.4 KiB
C++
Executable File
#ifndef _MINECRAFT_INGAMEBLOCKSELECTIONSCREEN_H_
|
|
#define _MINECRAFT_INGAMEBLOCKSELECTIONSCREEN_H_
|
|
|
|
#include "../Screen.h"
|
|
#include "../../player/input/touchscreen/TouchAreaModel.h"
|
|
#include "../components/Button.h"
|
|
|
|
class IngameBlockSelectionScreen : public Screen
|
|
{
|
|
typedef Screen super;
|
|
public:
|
|
IngameBlockSelectionScreen();
|
|
virtual ~IngameBlockSelectionScreen() {}
|
|
|
|
virtual void init() override;
|
|
virtual void removed() override;
|
|
|
|
void render(int xm, int ym, float a) override;
|
|
|
|
protected:
|
|
virtual void mouseClicked(int x, int y, int buttonNum) override;
|
|
virtual void mouseReleased(int x, int y, int buttonNum) override;
|
|
|
|
virtual void buttonClicked(Button* button) override;
|
|
|
|
// wheel input for creative inventory scrolling
|
|
virtual void mouseWheel(int dx, int dy, int xm, int ym) override;
|
|
|
|
virtual void keyPressed(int eventKey) override;
|
|
private:
|
|
void renderSlots();
|
|
void renderSlot(int slot, int x, int y, float a);
|
|
void renderDemoOverlay();
|
|
|
|
int getSelectedSlot(int x, int y);
|
|
void selectSlotAndClose();
|
|
|
|
//int getLinearSlotId(int x, int y);
|
|
int getSlotPosX(int slotX);
|
|
int getSlotPosY(int slotY);
|
|
|
|
int getSlotHeight();
|
|
|
|
bool isAllowed(int slot);
|
|
|
|
private:
|
|
int InventoryCols;
|
|
int InventoryRows;
|
|
int InventorySize;
|
|
|
|
int selectedItem;
|
|
bool _pendingQuit;
|
|
|
|
Button bArmor;
|
|
Button bCrafting;
|
|
|
|
RectangleArea _area;
|
|
};
|
|
|
|
#endif
|