Flyff

源码添加可拖拽大小背包【1】

2018-5-6 09:04 | 发布者: admin

+ add in VersionCommon.h
Code:
#define _INVENTORY_RESIZEABLE
+ add in WndItemCtrl.cpp
Code:
#ifdef _INVENTORY_RESIZEABLE
int CWndItemCtrl::getScrollbarPos()
{
    return (m_wndScrollBar.GetScrollPage() + m_wndScrollBar.GetScrollPos());
}

int CWndItemCtrl::getScrollbarMax()
{
    return m_wndScrollBar.GetMaxScrollPos();
}
#endif // _INVENTORY_RESIZEABLE
= below
Code:
#if __VER >= 8 //__CSC_VER8_5
void CWndItemCtrl::SetDieFlag(BOOL flag)
{
	this->m_useDieFlag = flag;
}
#endif //__CSC_VER8_5
+ add in WndItemCtrl.h
Code:
#ifdef _INVENTORY_RESIZEABLE
public:
    int getScrollbarPos();
    int getScrollbarMax();
#endif // _INVENTORY_RESIZEABLE
= below
Code:
#if __VER >= 8 //__CSC_VER8_5
public:
	BOOL m_useDieFlag;
#endif //__CSC_VER8_5
+ add in WndField.h
Code:
#ifdef _INVENTORY_RESIZEABLE
    enum ctrltype
    {
        PARENT, STATIC, CUSTOM, CHECKBOX
    };

    class ctrlhelp
    {
    public:
        int id;
        ctrltype type;
        CRect rect;

        ctrlhelp(int id, ctrltype type, CRect rect)
        {
            this->id = id;
            this->type = type;
            this->rect = rect;
        }
    };

    vector<ctrlhelp> arOriginalSizes;
    const int nGridTexSize = 32; // texturesize grid
    std::vector<CTexture*> m_arTexInvGrid;

    virtual void SetWndRect(CRect rectWnd, BOOL bOnSize);
    CRect getItemRect(int id, CPoint sizediff = CPoint(0, 0), ctrltype type = PARENT);
    void saveOriginRects();
    void resetItemRects();
#endif // _INVENTORY_RESIZEABLE
= below
Code:
    CTexture* m_TexRemoveItem;
~ modify in WndField.h
Code:
    bool SetEnchantCursor();
    void refreshItemRects();
= replacing
Code:
	void SetEnchantCursor();
+ add in WndField.cpp
Code:
#ifdef _INVENTORY_RESIZEABLE
    m_arTexInvGrid.clear();
    arOriginalSizes.clear();
#endif // _INVENTORY_RESIZEABLE
= below
Code:
#if __VER >= 9 // __CSC_VER9_1
	m_pWndRemoveJewelConfirm = NULL;
	m_bRemoveJewel = FALSE;
#endif //__CSC_VER9_1
+ add in WndField.cpp
Code:
#ifdef _INVENTORY_RESIZEABLE
    resetItemRects();
    arOriginalSizes.clear();
#endif // _INVENTORY_RESIZEABLE
= below
Code:
#if __VER >= 9 // __CSC_VER9_1
	SAFE_DELETE(m_pWndRemoveJewelConfirm);
#endif //__CSC_VER9_1
+ add in WndField.cpp
Code:
#ifdef _INVENTORY_RESIZEABLE
    resetItemRects();
#endif // _INVENTORY_RESIZEABLE
= below
Code:
	CWndBank* pWndBank = ( CWndBank* )GetWndBase( APP_COMMON_BANK );
	if( pWndBank != NULL )
		pWndBank->Destroy();
+ add in WndField.cpp
Code:
#ifdef _INVENTORY_RESIZEABLE
    if(m_nResizeDir)
    {
        return;
    }
#endif // _INVENTORY_RESIZEABLE
= below
Code:
void CWndInventory::OnMouseWndSurface( CPoint point )
{
发布者: admin
查看: 219 | 评论: 0

老飞飞发布站  

GMT+8, 2019-3-20 00:58 , Processed in 0.065880 second(s), 7 queries , File On.

Copyright © 2018和平玩家

Powered by 作死联萌! ZSLM!

返回顶部