C:
Intram in eterPythonLib/PythonSlotWindow.h
Cautam
CGraphicImageInstance * pInstance;
Sub el adaugam
CGraphicImageInstance * pInstanceLevel;
-------------
Cautam
void Destroy();
Sub el adaugam
void SetSlotLevelImage(DWORD dwIndex, CGraphicImage * levelImage);
Intram in eterPythonLib/PythonSlotWindow.cpp
Cautam
Slot.pFinishCoolTimeEffect = NULL;
Sub el adaugam
Slot.pInstanceLevel = NULL;
---------------------
Cautam
void CSlotWindow::SetSlotCount(DWORD dwIndex, DWORD dwCount)
DEASUPRA lui adaugam:
void CSlotWindow::SetSlotLevelImage(DWORD dwIndex, CGraphicImage * levelImage)
{
TSlot * pSlot;
if (!GetSlotPointer(dwIndex, &pSlot) || !levelImage)
return;
assert(NULL == pSlot->pInstanceLevel);
pSlot->pInstanceLevel = CGraphicImageInstance::New();
pSlot->pInstanceLevel->SetDiffuseColor(1.0, 1.0, 1.0, 1.0);
pSlot->pInstanceLevel->SetImagePointer(levelImage);
}
-------------
Cautam
pSlot->dwCenterSlotNumber = 0xffffffff;
Sub el adaugam
if (pSlot->pInstanceLevel)
{
CGraphicImageInstance::Delete(pSlot->pInstanceLevel);
pSlot->pInstanceLevel = NULL;
}
---------
Cautam
if (rSlot.bActive)
Deasupra lui adaugam
if (rSlot.pInstanceLevel)
{
rSlot.pInstanceLevel->SetPosition(m_rect.left + rSlot.ixPosition, (m_rect.top + rSlot.iyPosition + rSlot.byyPlacedItemSize*ITEM_HEIGHT) - 32);
rSlot.pInstanceLevel->Render();
}
Intram in eterPythonLib/PythonWindowManagerModule.cpp
Cautam:
void initwndMgr()
Deasupra lui adaugam
PyObject * wndMgrSetSlotImage(PyObject * poSelf, PyObject * poArgs)
{
UI::CWindow * pWin;
if (!PyTuple_GetWindow(poArgs, 0, &pWin))
return Py_BuildException();
int iSlotIndex;
if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
return Py_BuildException();
char * szImagePath;
if (!PyTuple_GetString(poArgs, 2, &szImagePath))
return Py_BuildException();
if (!pWin->IsType(UI::CSlotWindow::Type()))
return Py_BuildException();
UI::CSlotWindow * pSlotWin = (UI::CSlotWindow *)pWin;
CGraphicImage * pImage = (CGraphicImage *)CResourceManager::Instance().GetResourcePointer(szImagePath);
if (!pImage)
return Py_BuildException();
pSlotWin->SetSlotLevelImage(iSlotIndex, pImage);
return Py_BuildNone();
}
Cautam:
{ "ShowOverInWindowName", wndMgrShowOverInWindowName, METH_VARARGS },
Sub el adaugam
{ "SetSlotLevelImage", wndMgrSetSlotImage, METH_VARARGS },
-------
Despachetam root si deschidem ui.py
Adaugam sus de tot la import
import player
Cautam
wndMgr.SetSlotCount(self.hWnd, renderingSlotNumber, ItemCount)
Sub el adaugam
####Nivel upgrade ###
itemName=item.GetItemName().strip()
itemNameP=item.GetItemName().rfind('+')
if itemNameP>0 and len(itemName)>itemNameP+1:
level=itemName[itemNameP+1:]
if level.isdigit():
wndMgr.SetSlotLevelImage(self.hWnd, renderingSlotNumber, ("icon/level/%d.tga"%int(level)))
####Nivel upgrade ###
Download: