From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- .../Common/XUI/XUI_Ctrl_CraftIngredientSlot.h | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h (limited to 'Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h') diff --git a/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h b/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h new file mode 100644 index 00000000..5cf7a7f4 --- /dev/null +++ b/Minecraft.Client/Common/XUI/XUI_Ctrl_CraftIngredientSlot.h @@ -0,0 +1,45 @@ +#pragma once + +#include +#include + + +//----------------------------------------------------------------------------- +// CXuiCtrlMinecraftSlot class +//----------------------------------------------------------------------------- +class CXuiCtrlCraftIngredientSlot : public CXuiControlImpl +{ +public: + XUI_IMPLEMENT_CLASS(CXuiCtrlCraftIngredientSlot, L"CXuiCtrlCraftIngredientSlot", XUI_CLASS_LABEL) + + CXuiCtrlCraftIngredientSlot(); + virtual ~CXuiCtrlCraftIngredientSlot() { }; + void SetRedBox(BOOL bVal); + void SetIcon(int iPad, int iId,int iAuxVal, int iCount, int iScale, unsigned int uiAlpha, bool bDecorations, bool isFoil = false, BOOL bShow=TRUE); + void SetIcon(int iPad, shared_ptr item, int iScale, unsigned int uiAlpha,bool bDecorations, BOOL bShow=TRUE); + void SetDescription(LPCWSTR Desc); +protected: + + XUI_BEGIN_MSG_MAP() + XUI_ON_XM_INIT(OnInit) + XUI_ON_XM_GETSLOTITEM_MESSAGE(OnCustomMessage_GetSlotItem) + XUI_ON_XM_GET_SOURCE_TEXT(OnGetSourceText) + XUI_END_MSG_MAP() + + HRESULT OnCustomMessage_GetSlotItem(CustomMessage_GetSlotItem_Struct *pData, BOOL& bHandled); + HRESULT OnGetSourceText(XUIMessageGetSourceText *pGetSourceTextData, BOOL& bHandled); + HRESULT OnInit(XUIMessageInit* pInitData, BOOL& rfHandled); + +private: + shared_ptr m_item; + int m_iID; + int m_iAuxVal; + int m_iCount; + int m_iScale; + unsigned int m_uiAlpha; + int m_iPad; + bool m_bDecorations; + bool m_isFoil; + LPCWSTR m_Desc; + bool m_isDirty; +}; \ No newline at end of file -- cgit v1.2.3