Flyff

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

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

= before
Code:
void CWndInventory::OnInitialUpdate()
{
~ modify in WndField.cpp
Code:
#ifdef _INVENTORY_RESIZEABLE
    CRect rectGold = GetWndCtrl(WIDC_STATIC1)->rect;
    m_wndGold.Create("g", WBS_NODRAWFRAME, rectGold, this, WIDC_GOLD);
    m_wndGold.AddWndStyle(WBS_NODRAWFRAME);
#else
    // undefining this with the modified APP_INVENTORY resdata will cause crashes (use the old one in such cases)
	LPWNDCTRL lpWndCtrl = GetWndCtrl( WIDC_GOLD );
	m_wndGold.Create( "g", WBS_NODRAWFRAME, lpWndCtrl->rect, this, WIDC_GOLD );
	m_wndGold.AddWndStyle( WBS_NODRAWFRAME );
#endif // _INVENTORY_RESIZEABLE
= replacing
Code:
	LPWNDCTRL lpWndCtrl = GetWndCtrl( WIDC_GOLD );
	m_wndGold.Create( "g", WBS_NODRAWFRAME, lpWndCtrl->rect, this, WIDC_GOLD );
	m_wndGold.AddWndStyle( WBS_NODRAWFRAME );
+ add in WndField.cpp
Code:
#ifdef _INVENTORY_RESIZEABLE
    for(int i = 1; i <= 12; i++)
    {
        CTexture *ptex = NULL;
        char tmp[32] = { 0 };

        sprintf(tmp, "InvGrid%d.bmp", i);
        ptex = m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_THEME, tmp), 0xffff00ff);

        if(ptex != NULL)
        {
            m_arTexInvGrid.push_back(ptex);
        } else
        {
            break;
        }
    }
#endif // _INVENTORY_RESIZEABLE
= below
Code:
	m_TexRemoveItem = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_THEME, "WndInventoryGarbage.dds" ), 0xffff00ff );

发布者: admin
查看: 210 | 评论: 0

老飞飞发布站  

GMT+8, 2019-5-23 20:54 , Processed in 1.078125 second(s), 7 queries , File On.

Copyright © 2018和平玩家

Powered by 作死联萌! ZSLM!

返回顶部