Hey,
Today iam releasing a chat emoji based at devkit. Actually there are 2 ways to achieve such a thing easiest one will be the one which will be released today. the other one is hooking d3d write text thing , i already made a good progress in the second way but it ended up fucking textures so i gave up on it.
Basically what we gonna do today is detecting the exact height and width of the key of the emoji based at its location at the chatwindow then we gonna replace a ddj over it.
the first thing we can start at is creating our slots, the classes can be found at the end of thread. here we creating 2 dimensional array of 24 items which represents the biggest chat size could be,also intinializing emoji list with desired emojis.
the actual juice is here, this function will be looping over all shown lines in of the active windows and checks if any of them contains special key defined at emojilist then it will be replace the key by a ddj
thanks to b0ykoe from here we getting the exact width along to the special key.
Note:
the full codes can be found at the end of thread, keep in mind that the current emojis per line are 5, however you can control them easily.
all given there are offsets so that you can populate devkit classes with them
usage:
so where to insert that code ?
well its up to you. you may just insert it in any rendering function or hook all these functions (it wont be provided at the code)
Codes:
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
Today iam releasing a chat emoji based at devkit. Actually there are 2 ways to achieve such a thing easiest one will be the one which will be released today. the other one is hooking d3d write text thing , i already made a good progress in the second way but it ended up fucking textures so i gave up on it.
[Only registered and activated users can see links. Click Here To Register...]
Basically what we gonna do today is detecting the exact height and width of the key of the emoji based at its location at the chatwindow then we gonna replace a ddj over it.
the first thing we can start at is creating our slots, the classes can be found at the end of thread. here we creating 2 dimensional array of 24 items which represents the biggest chat size could be,also intinializing emoji list with desired emojis.
Code:
void CIFChatViewer::initializeEmojis()
{
CIFEmojiSlot** emojiSlots = new CIFEmojiSlot*[24];
RECT emojiSlotsRect = {0,0,1,1};
for(int i=0;i<24;i++)
emojiSlots[i] = (CIFEmojiSlot*)CGWnd::CreateInstance(g_pCGInterface, GFX_RUNTIME_CLASS(CIFEmojiSlot), emojiSlotsRect, 14300+i, 0);
emojiList[":P"] = "interface\\bimbum\\tongue.ddj";
emojiList[":D"] = "interface\\bimbum\\smile2.ddj";
emojiList[":)"] = "interface\\bimbum\\smile1.ddj";
}
thanks to b0ykoe from here we getting the exact width along to the special key.
Code:
int CIFChatViewer::getWidth(std::n_wstring str,CIFListCtrl* pList,std::string emojiCode,int index)
{
std::n_wstring tempStr;
CIFListCtrl::SLineOfText* tempLine;
int Width=0;
std::n_wstring tempText = str.substr(0, index);
if(pList)
{
tempLine = pList->GetTextByIndex(0);
if(tempLine)
{
CGFontTexture* cgFont = tempLine->m_font;
if(cgFont)
{
cgFont->GetText(&tempStr);
cgFont->sub_8B3B60(&tempText);
Width = cgFont->GetDimensions().width;
cgFont->sub_8B3B60(&tempStr);
}
}
}
return Width;
}
Note:
the full codes can be found at the end of thread, keep in mind that the current emojis per line are 5, however you can control them easily.
all given there are offsets so that you can populate devkit classes with them
usage:
Code:
CIFChatViewer* chatView = (CIFChatViewer*)g_pCGInterface->m_IRM.GetResObj(1, 1);
chatView->hideEmojis();
chatView->emojiHandler();
well its up to you. you may just insert it in any rendering function or hook all these functions (it wont be provided at the code)
Code:
0063AACF 00656160 00656060 00656160 0063AA50 0064CC30 00656324
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]