mirror of
https://gitea.sffnetwork.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-11-23 19:09:46 +00:00
the whole game
This commit is contained in:
parent
816e9060b4
commit
f0617a5d22
2069 changed files with 581500 additions and 0 deletions
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__*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue