mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-04-05 23:13:33 +00:00
the whole game
This commit is contained in:
62
src/client/gui/components/InventoryPane.h
Executable file
62
src/client/gui/components/InventoryPane.h
Executable file
@@ -0,0 +1,62 @@
|
||||
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__InventoryPane_H__
|
||||
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__InventoryPane_H__
|
||||
|
||||
#include "ScrollingPane.h"
|
||||
#include "ImageButton.h"
|
||||
|
||||
class Minecraft;
|
||||
class ItemInstance;
|
||||
class Font;
|
||||
class IArea;
|
||||
|
||||
namespace Touch {
|
||||
|
||||
class IInventoryPaneCallback;
|
||||
|
||||
class InventoryPane: public ScrollingPane
|
||||
{
|
||||
typedef ScrollingPane super;
|
||||
public:
|
||||
InventoryPane(IInventoryPaneCallback* screen, Minecraft* mc, const IntRectangle& rect, int paneWidth, float clickMarginH, int numItems, int itemSize, int itemBorderSize);
|
||||
~InventoryPane();
|
||||
|
||||
void tick();
|
||||
void renderBatch( std::vector<GridItem>& item, float alpha );
|
||||
bool onSelect( int gridId, bool selected );
|
||||
void drawScrollBar( ScrollBar& hScroll );
|
||||
|
||||
void setRenderDecorations(bool value);
|
||||
|
||||
IntRectangle rect;
|
||||
int paneWidth;
|
||||
IArea* _clickArea;
|
||||
IInventoryPaneCallback* screen;
|
||||
Minecraft* mc;
|
||||
|
||||
int fillMarginX;
|
||||
int fillMarginY;
|
||||
|
||||
int markerType;
|
||||
int markerIndex;
|
||||
float markerShare;
|
||||
private:
|
||||
int lastItemIndex;
|
||||
int lastItemTicks;
|
||||
int BorderPixels;
|
||||
bool renderDecorations;
|
||||
|
||||
IntRectangle bg;
|
||||
};
|
||||
|
||||
class IInventoryPaneCallback
|
||||
{
|
||||
public:
|
||||
virtual ~IInventoryPaneCallback() {}
|
||||
virtual bool addItem(const InventoryPane* forPane, int index) = 0;
|
||||
virtual bool isAllowed( int slot ) = 0;
|
||||
virtual std::vector<const ItemInstance*> getItems(const InventoryPane* forPane) = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__InventoryPane_H__*/
|
||||
Reference in New Issue
Block a user