Newbie Spellweaver
- Joined
- Feb 2, 2015
- Messages
- 77
- Reaction score
- 54
if you no idea what i talking about.
when your create some icon from photoshop and save with .png to this file list
- Res-Tex/item.tex
- Res-Tex/bigitem.tex
you may get black glitch when it render by client.
there have 2 solution for you to fix.
1. save right setting when save file
2. fix by client source.
i will give some guide for icon only. if you want fix bigicon just try copy paste thing.
InterfaceLib\main\INFIcon.h (add some variable for check)
InterfaceLib\main\INFIcon.cpp (set up variable for make it work)
when your create some icon from photoshop and save with .png to this file list
- Res-Tex/item.tex
- Res-Tex/bigitem.tex
you may get black glitch when it render by client.
there have 2 solution for you to fix.
1. save right setting when save file
2. fix by client source.
i will give some guide for icon only. if you want fix bigicon just try copy paste thing.
InterfaceLib\main\INFIcon.h (add some variable for check)
Code:
class CINFIcon : public CAtumNode {
protected:
[B]BOOL [/B][B]m_IsSet; [COLOR=#ff0000]// Add this inside protected[/COLOR][/B]
InterfaceLib\main\INFIcon.cpp (set up variable for make it work)
Code:
CINFIcon::CINFIcon()
{
[B]m_IsSet = FALSE; [COLOR=#FF0000]// Add this inside function
[/COLOR][/B]...
void CINFIcon::SetIcon(......)
{
[B]m_IsSet = FALSE; [COLOR=#FF0000]// Add this inside function
[/COLOR][/B]...[B][COLOR=#FF0000]
[/COLOR][/B]void CINFIcon::Render()
{
// scroll down a bit
if(pImage) {
[COLOR=#ff0000] [B] // Replace inside with this code[/B][/COLOR]
[COLOR=#ff0000][B] if (m_IsSet == FALSE)
{
m_IsSet = TRUE;
[/B][/COLOR][COLOR=#ff0000][B]pImage->Move(m_nX, m_nY);
POINT temp = pImage->GetImgSize();
pImage->SetScale(m_fScale, m_fScale);
pImage->SetRect(0, 0, temp.x, temp.y);
[/B][/COLOR][COLOR=#ff0000][B]// if you icon size is 28x28. you can put fixed number here and skip getimagesize().
[/B][/COLOR][COLOR=#ff0000][B]//btw better ignore it if you dont know what i mean
}[/B][/COLOR]
pImage->Render();
}
Last edited: