mirror of
https://gitea.sffnetwork.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-11-25 03:49:46 +00:00
pragma once everywhere
This commit is contained in:
parent
a45c01d013
commit
7d3257669a
575 changed files with 37222 additions and 38345 deletions
|
|
@ -1,72 +1,70 @@
|
|||
#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__ChestScreen_H__
|
||||
#define NET_MINECRAFT_CLIENT_GUI_SCREENS__ChestScreen_H__
|
||||
|
||||
#include "BaseContainerScreen.h"
|
||||
|
||||
#include "../components/InventoryPane.h"
|
||||
#include "../components/Button.h"
|
||||
|
||||
class Font;
|
||||
class CItem;
|
||||
class Textures;
|
||||
class NinePatchLayer;
|
||||
class FillingContainer;
|
||||
class ChestTileEntity;
|
||||
class Tesselator;
|
||||
|
||||
class ChestScreen: public BaseContainerScreen,
|
||||
public Touch::IInventoryPaneCallback
|
||||
{
|
||||
typedef BaseContainerScreen super;
|
||||
typedef std::vector<CItem*> ItemList;
|
||||
friend class ItemPane;
|
||||
public:
|
||||
ChestScreen(Player* player, ChestTileEntity* chest);
|
||||
~ChestScreen();
|
||||
|
||||
void init();
|
||||
void setupPositions();
|
||||
|
||||
void tick();
|
||||
void render(int xm, int ym, float a);
|
||||
bool renderGameBehind();
|
||||
void buttonClicked(Button* button);
|
||||
|
||||
// IInventoryPaneCallback
|
||||
bool addItem(const Touch::InventoryPane* pane, int itemId);
|
||||
bool isAllowed( int slot );
|
||||
std::vector<const ItemInstance*> getItems( const Touch::InventoryPane* forPane );
|
||||
//const ItemList& getItems(const ItemPane* forPane);
|
||||
private:
|
||||
void setupPane();
|
||||
|
||||
void drawSlotItemAt(Tesselator& t, const ItemInstance* item, int x, int y, bool selected);
|
||||
bool handleAddItem(FillingContainer* from, FillingContainer* to, int itemIndex);
|
||||
void handleRenderPane(Touch::InventoryPane* pane, Tesselator& t, int xm, int ym, float a);
|
||||
|
||||
std::string currentItemDesc;
|
||||
ImageButton btnClose;
|
||||
Touch::THeader bHeader;
|
||||
Touch::THeader bHeaderChest;
|
||||
|
||||
Touch::InventoryPane* inventoryPane;
|
||||
Touch::InventoryPane* chestPane;
|
||||
IntRectangle panesBbox;
|
||||
|
||||
std::vector<const ItemInstance*> inventoryItems;
|
||||
std::vector<const ItemInstance*> chestItems;
|
||||
bool doRecreatePane;
|
||||
|
||||
int selectedSlot;
|
||||
|
||||
// GUI elements such as 9-Patches
|
||||
NinePatchLayer* guiBackground;
|
||||
NinePatchLayer* guiSlot;
|
||||
NinePatchLayer* guiSlotMarked;
|
||||
NinePatchLayer* guiSlotMarker;
|
||||
NinePatchLayer* guiPaneFrame;
|
||||
Player* player;
|
||||
ChestTileEntity* chest;
|
||||
};
|
||||
|
||||
#endif /*NET_MINECRAFT_CLIENT_GUI_SCREENS__ChestScreen_H__*/
|
||||
#pragma once
|
||||
|
||||
#include "BaseContainerScreen.h"
|
||||
|
||||
#include "../components/InventoryPane.h"
|
||||
#include "../components/Button.h"
|
||||
|
||||
class Font;
|
||||
class CItem;
|
||||
class Textures;
|
||||
class NinePatchLayer;
|
||||
class FillingContainer;
|
||||
class ChestTileEntity;
|
||||
class Tesselator;
|
||||
|
||||
class ChestScreen: public BaseContainerScreen,
|
||||
public Touch::IInventoryPaneCallback
|
||||
{
|
||||
typedef BaseContainerScreen super;
|
||||
typedef std::vector<CItem*> ItemList;
|
||||
friend class ItemPane;
|
||||
public:
|
||||
ChestScreen(Player* player, ChestTileEntity* chest);
|
||||
~ChestScreen();
|
||||
|
||||
void init();
|
||||
void setupPositions();
|
||||
|
||||
void tick();
|
||||
void render(int xm, int ym, float a);
|
||||
bool renderGameBehind();
|
||||
void buttonClicked(Button* button);
|
||||
|
||||
// IInventoryPaneCallback
|
||||
bool addItem(const Touch::InventoryPane* pane, int itemId);
|
||||
bool isAllowed( int slot );
|
||||
std::vector<const ItemInstance*> getItems( const Touch::InventoryPane* forPane );
|
||||
//const ItemList& getItems(const ItemPane* forPane);
|
||||
private:
|
||||
void setupPane();
|
||||
|
||||
void drawSlotItemAt(Tesselator& t, const ItemInstance* item, int x, int y, bool selected);
|
||||
bool handleAddItem(FillingContainer* from, FillingContainer* to, int itemIndex);
|
||||
void handleRenderPane(Touch::InventoryPane* pane, Tesselator& t, int xm, int ym, float a);
|
||||
|
||||
std::string currentItemDesc;
|
||||
ImageButton btnClose;
|
||||
Touch::THeader bHeader;
|
||||
Touch::THeader bHeaderChest;
|
||||
|
||||
Touch::InventoryPane* inventoryPane;
|
||||
Touch::InventoryPane* chestPane;
|
||||
IntRectangle panesBbox;
|
||||
|
||||
std::vector<const ItemInstance*> inventoryItems;
|
||||
std::vector<const ItemInstance*> chestItems;
|
||||
bool doRecreatePane;
|
||||
|
||||
int selectedSlot;
|
||||
|
||||
// GUI elements such as 9-Patches
|
||||
NinePatchLayer* guiBackground;
|
||||
NinePatchLayer* guiSlot;
|
||||
NinePatchLayer* guiSlotMarked;
|
||||
NinePatchLayer* guiSlotMarker;
|
||||
NinePatchLayer* guiPaneFrame;
|
||||
Player* player;
|
||||
ChestTileEntity* chest;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue