the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 72 lines 2.2 kB view raw
1#pragma once 2#include "ResourceLocation.h" 3#include "GuiComponent.h" 4#include "GuiMessage.h" 5#include "ResourceLocation.h" 6 7class Random; 8class Minecraft; 9class ItemRenderer; 10 11class Gui : public GuiComponent 12{ 13private: 14 static ResourceLocation PUMPKIN_BLUR_LOCATION; 15 // 4J-PB - this doesn't account for the safe zone, and the indent applied to messages 16 //static const int MAX_MESSAGE_WIDTH = 320; 17 static const int m_iMaxMessageWidth = 280; 18 static ItemRenderer *itemRenderer; 19 vector<GuiMessage> guiMessages[XUSER_MAX_COUNT]; 20 Random *random; 21 22 Minecraft *minecraft; 23public: 24 wstring selectedName; 25private: 26 int tickCount; 27 wstring overlayMessageString; 28 int overlayMessageTime; 29 bool animateOverlayMessageColor; 30 31 // 4J Added 32 float lastTickA; 33 float fAlphaIncrementPerCent; 34public: 35 static float currentGuiBlendFactor; // 4J added 36 static float currentGuiScaleFactor; // 4J added 37 38 float progress; 39 40 // private DecimalFormat df = new DecimalFormat("##.00"); 41 42public: 43 Gui(Minecraft *minecraft); 44 45 void render(float a, bool mouseFree, int xMouse, int yMouse); 46 float tbr; 47 48private: 49 //void renderBossHealth(void); 50 void renderPumpkin(int w, int h); 51 void renderVignette(float br, int w, int h); 52 void renderTp(float br, int w, int h); 53 void renderSlot(int slot, int x, int y, float a); 54public: 55 void tick(); 56 void clearMessages(int iPad=-1); 57 void addMessage(const wstring& string, int iPad,bool bIsDeathMessage=false); 58 void setNowPlaying(const wstring& string); 59 void displayClientMessage(int messageId, int iPad); 60 61 // 4J Added 62 DWORD getMessagesCount(int iPad) { return (int)guiMessages[iPad].size(); } 63 wstring getMessage(int iPad, DWORD index) { return guiMessages[iPad].at(index).string; } 64 float getOpacity(int iPad, DWORD index); 65 66 wstring getJukeboxMessage(int iPad) { return overlayMessageString; } 67 float getJukeboxOpacity(int iPad); 68 69 // 4J Added 70 void renderGraph(int dataLength, int dataPos, __int64 *dataA, float dataAScale, int dataAWarning, __int64 *dataB, float dataBScale, int dataBWarning); 71 void renderStackedGraph(int dataPos, int dataLength, int dataSources, __int64 (*func)(unsigned int dataPos, unsigned int dataSource) ); 72};