the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 96 lines 2.5 kB view raw
1#pragma once 2 3#include "UIScene.h" 4 5class UIScene_DLCOffersMenu : public UIScene 6{ 7private: 8 enum EControls 9 { 10 eControl_OffersList, 11 }; 12 13 bool m_bIsSD; 14 bool m_bHasPurchased; 15 bool m_bIsSelected; 16 17 UIControl_DLCList m_buttonListOffers; 18 UIControl_Label m_labelOffers, m_labelPriceTag, m_labelXboxStore; 19 UIControl_HTMLLabel m_labelHTMLSellText; 20 UIControl_BitmapIcon m_bitmapIconOfferImage; 21 UIControl m_Timer; 22 UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) 23 UI_MAP_ELEMENT( m_buttonListOffers, "OffersList") 24 UI_MAP_ELEMENT( m_labelOffers, "OffersList_Title") 25 UI_MAP_ELEMENT( m_labelPriceTag, "PriceTag") 26 UI_MAP_ELEMENT( m_labelHTMLSellText, "HTMLSellText") 27 UI_MAP_ELEMENT( m_bitmapIconOfferImage, "DLCIcon" ) 28 UI_MAP_ELEMENT( m_Timer, "Timer") 29 30 if(m_loadedResolution == eSceneResolution_1080) 31 { 32 UI_MAP_ELEMENT( m_labelXboxStore, "XboxLabel" ) 33 } 34 UI_END_MAP_ELEMENTS_AND_NAMES() 35public: 36 UIScene_DLCOffersMenu(int iPad, void *initData, UILayer *parentLayer); 37 ~UIScene_DLCOffersMenu(); 38 static int ExitDLCOffersMenu(void *pParam,int iPad,C4JStorage::EMessageResult result); 39 40 virtual EUIScene getSceneType() { return eUIScene_DLCOffersMenu;} 41 virtual void tick(); 42 virtual void updateTooltips(); 43 44protected: 45 // TODO: This should be pure virtual in this class 46 virtual wstring getMoviePath(); 47 48public: 49 // INPUT 50 virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled); 51 52 virtual void handlePress(F64 controlId, F64 childId); 53 virtual void handleSelectionChanged(F64 selectedId); 54 virtual void handleFocusChange(F64 controlId, F64 childId); 55 virtual void handleTimerComplete(int id); 56#ifdef __PS3__ 57 virtual void HandleDLCInstalled(); 58#endif 59 60#ifdef _XBOX_ONE 61 virtual void HandleDLCLicenseChange(); 62#endif 63 64private: 65#ifdef _DURANGO 66 void GetDLCInfo( int iOfferC, bool bUpdateOnly=false ); 67 void UpdateTooltips(MARKETPLACE_CONTENTOFFER_INFO& xOffer); 68 bool UpdateDisplay(MARKETPLACE_CONTENTOFFER_INFO& xOffer); 69 70 static int OrderSortFunction(const void* a, const void* b); 71 72 bool m_bIgnorePress; 73 bool m_bDLCRequiredIsRetrieved; 74 DLC_INFO *m_pNoImageFor_DLC; 75 76 typedef struct 77 { 78 unsigned int uiContentIndex; 79 unsigned int uiSortIndex; 80 } 81 SORTINDEXSTRUCT; 82 83 vector <wstring>m_vIconRetrieval; 84 bool m_bSelectionChanged; 85 86#endif 87 88 bool m_bProductInfoShown; 89 int m_iProductInfoIndex; 90 int m_iCurrentDLC; 91 int m_iTotalDLC; 92 bool m_bAddAllDLCButtons; 93#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__) 94 std::vector<SonyCommerce::ProductInfo>*m_pvProductInfo; 95#endif 96};