* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a4399472.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
61 lines
1.6 KiB
C++
61 lines
1.6 KiB
C++
#pragma once
|
|
#include "..\Minecraft.World\MerchantMenu.h"
|
|
|
|
class MerchantRecipe;
|
|
|
|
class IUIScene_TradingMenu
|
|
{
|
|
protected:
|
|
MerchantMenu *m_menu;
|
|
shared_ptr<Merchant> m_merchant;
|
|
vector< pair<MerchantRecipe *,int> > m_activeOffers;
|
|
|
|
int m_validOffersCount;
|
|
int m_selectedSlot;
|
|
int m_offersStartIndex;
|
|
bool m_bHasUpdatedOnce;
|
|
|
|
eTutorial_State m_previousTutorialState;
|
|
|
|
static const int DISPLAY_TRADES_COUNT = 7;
|
|
|
|
static const int BUY_A = MerchantMenu::USE_ROW_SLOT_END;
|
|
static const int BUY_B = BUY_A + 1;
|
|
static const int TRADES_START = BUY_B + 1;
|
|
|
|
protected:
|
|
IUIScene_TradingMenu();
|
|
|
|
bool handleKeyDown(int iPad, int iAction, bool bRepeat);
|
|
void handleTick();
|
|
|
|
virtual void showScrollRightArrow(bool show) = 0;
|
|
virtual void showScrollLeftArrow(bool show) = 0;
|
|
virtual void moveSelector(bool right) = 0;
|
|
virtual void setRequest1Name(const wstring &name) = 0;
|
|
virtual void setRequest2Name(const wstring &name) = 0;
|
|
virtual void setTitle(const wstring &name) = 0;
|
|
|
|
virtual void setRequest1RedBox(bool show) = 0;
|
|
virtual void setRequest2RedBox(bool show) = 0;
|
|
virtual void setTradeRedBox(int index, bool show) = 0;
|
|
|
|
virtual void setOfferDescription(vector<HtmlString> *description) = 0;
|
|
|
|
virtual void setRequest1Item(shared_ptr<ItemInstance> item);
|
|
virtual void setRequest2Item(shared_ptr<ItemInstance> item);
|
|
virtual void setTradeItem(int index, shared_ptr<ItemInstance> item);
|
|
|
|
void updateDisplay();
|
|
void HandleInventoryUpdated();
|
|
|
|
private:
|
|
bool canMake(MerchantRecipe *recipe);
|
|
|
|
vector<HtmlString> *GetItemDescription(shared_ptr<ItemInstance> item);
|
|
|
|
public:
|
|
shared_ptr<Merchant> getMerchant();
|
|
|
|
virtual int getPad() = 0;
|
|
}; |