SMF - Just Installed!
extern float g_fScreenRate_x;
extern float g_fScreenRate_y;
#define GetWindowsX() (WindowWidth / g_fScreenRate_x)
#define GetWindowsY() (WindowHeight / g_fScreenRate_y)
void SEASON3B::CNewUIBuffWindow::RenderBuffStatus(BUFF_RENDER renderstate)
bool gBuffCollapsed = false;
DWORD LastToggleTime = 0;
bool IsMousePressed()
{
static bool previousLButtonState = false;
bool currentLButtonState = (GetAsyncKeyState(VK_LBUTTON) & 0x8000) != 0;
bool result = currentLButtonState && !previousLButtonState;
previousLButtonState = currentLButtonState;
return result;
}
void SEASON3B::CNewUIBuffWindow::RenderBuffStatus(BUFF_RENDER renderstate)
{
OBJECT* pHeroObject = &Hero->Object;
float frameX = GetCenterX(640) - 120;
float frameY = GetWindowsY(640) - 110;
float x = 0.0f, y = 0.0f;
int buffwidthcount = 0;
std::list<eBuffState> buffstate;
BuffSort(buffstate);
int totalBuffs = buffstate.size();
int visibleBuffs = totalBuffs;
std::list<eBuffState>::iterator iter;
int IndexTime = 0;
float spacingX = gBuffCollapsed ? 10.0f : (BUFF_IMG_WIDTH + BUFF_IMG_SPACE);
for (iter = buffstate.begin(); iter != buffstate.end(); )
{
if (IndexTime >= visibleBuffs)
break;
std::list<eBuffState>::iterator tempiter = iter;
++iter;
eBuffState buff = (*tempiter);
x = m_Pos.x + (buffwidthcount * spacingX) + frameX;
y = m_Pos.y + frameY;
if (renderstate == BUFF_RENDER_ICON)
{
RenderBuffIcon(buff, x, y, BUFF_IMG_WIDTH, BUFF_IMG_HEIGHT);
if (gIconBuff.UserBuff[IndexTime].Index != NULL)
{
if (gIconBuff.UserBuff[IndexTime].Index != 28)
{
int pBuffHp = 100;
if (gIconBuff.UserBuff[IndexTime].MaxTime > 0 && gIconBuff.UserBuff[IndexTime].Time > 0)
{
pBuffHp = (gIconBuff.UserBuff[IndexTime].Time * 100) / gIconBuff.UserBuff[IndexTime].MaxTime;
}
EnableAlphaTest();
glColor4f(0.0, 1.0, 0.0, 1.0);
RenderColor(x, (y + BUFF_IMG_HEIGHT), (BUFF_IMG_WIDTH * pBuffHp / 100.0f), 2.0f, 0.0f, 0);
::EnableAlphaTest();
::glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
}
}
}
else if (renderstate == BUFF_RENDER_TOOLTIP)
{
if (!gBuffCollapsed && SEASON3B::CheckMouseIn(x, y, BUFF_IMG_WIDTH, BUFF_IMG_HEIGHT))
{
float fTooltip_x = x + (BUFF_IMG_WIDTH / 2);
float fTooltip_y = y + (BUFF_IMG_HEIGHT / 2) - 80;
eBuffClass buffclass = g_IsBuffClass(buff);
RenderBuffTooltip(buffclass, buff, fTooltip_x, fTooltip_y, IndexTime);
}
}
IndexTime++;
++buffwidthcount;
}
if (totalBuffs > 1)
{
float arrowX = x + 7;
float arrowY = y - 5;
if (gBuffCollapsed)
{
RenderImage(IMAGE_ICON->, arrowX, arrowY, 10, 10);
}
else
{
RenderImage(IMAGE_ICON <-, arrowX, arrowY, 10, 10);
}
if (SEASON3B::CheckMouseIn(arrowX, arrowY, 10, 10))
{
if (GetTickCount() - LastToggleTime > 500)
{
gBuffCollapsed = !gBuffCollapsed;
LastToggleTime = GetTickCount();
}
}
}
}
Cita de: mu2020 en Abr 15, 2025, 03:10 PMLink failed?intentare reparar
void CUIMng::CreateTitleSceneUI()
{
ReleaseTitleSceneUI();
CInput& rInput = CInput::Instance();
float fScaleX = (float)rInput.GetScreenWidth() / 800.0f;
float fScaleY = (float)rInput.GetScreenHeight() / 600.0f;
LoadBitmapA("Custom\\Interface\\NL_Loading.tga", 531123, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_BarFrame.tga", 531124, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Porcento.tga", 531126, 0x2601, 0x2901, 1, 0);
LoadBitmapA("Interface\\newui_number1.tga", 31337, 9729, 10496, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Back1.jpg", 531122, 0x2600, 0x2900, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Back2.jpg", 531125, 0x2600, 0x2900, 1, 0);
LoadBitmapA("Custom\\Interface\\NL_Bar.jpg", 31122, 0x2601, 0x2901, 1, 0);
m_pgbLoding = new CGaugeBar;
RECT rc = { -36, 4, 656 + 36, 10 };
m_pgbLoding->Create(4, 15, 31122, &rc, 0, 0, -1, true, fScaleX, fScaleY);
m_pgbLoding->SetPosition(72, 521);
m_pgbLoding->Show();
m_nScene = UIM_SCENE_TITLE;
}
void CUIMng::ReleaseTitleSceneUI()
{
SAFE_DELETE_ARRAY(m_asprTitle);
SAFE_DELETE(m_pgbLoding);
m_nScene = UIM_SCENE_NONE;
}
void CUIMng::RenderTitleSceneUI(HDC hDC, DWORD dwNow, DWORD dwTotal)
{
::BeginOpengl();
::glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
::BeginBitmap();
float FT_Perspective = (float)(1024.f / (float)WindowHeight);
float FT_Width = (float)(2048.f / FT_Perspective);
float FT_Height = (float)(1024.f / FT_Perspective);
float iPos_x = 0 + ((WindowWidth - FT_Width) / 2.f);
float iPos_y = 0 + ((WindowHeight - FT_Height) / 2.f);
float width = (FT_Width / 2.f);
EnableAlphaTest(TRUE);
glAlphaFunc(GL_GREATER, 0.0f);
RenderBitmap(531122, iPos_x, iPos_y, width, FT_Height, 0.0, 0.0, 1.f, 1.f, 0, 0, 0.0);
RenderBitmap(531125, iPos_x + width, iPos_y, width, FT_Height, 0.0, 0.0, 1.f, 1.f, 0, 0, 0.0);
FT_Perspective = (float)(1024.f / (float)WindowWidth);
FT_Height = (float)(119.f / FT_Perspective);
iPos_x = 0;
iPos_y = WindowHeight - FT_Height;
RenderBitmap(531123, iPos_x, iPos_y, WindowWidth, FT_Height, 0.0, 0.0, 1.f, 119.f / 128.f, 0, 0, 0.0);
m_pgbLoding->SetValue(dwNow, dwTotal);
m_pgbLoding->Render();
//--
iPos_x = (42.f / FT_Perspective);
iPos_y = (WindowHeight - FT_Height) + (46.f / FT_Perspective);
FT_Width = (float)(WindowWidth - (84.f / FT_Perspective));
float relative = ((float)status_pgb / (float)total_pgb);
RenderBitmap(31122, iPos_x, iPos_y, FT_Width * relative, (8.f / FT_Perspective), 0.0, 0.0, 750.f / 1024.f, 1.f, 0, 0, 0.0);
float rate, SizeNew, Porcento;
double AnimX, AnimY;
float WH = 0.25;
int Anim = (int)(timeGetTime() * 0.5f) % 600 / 40;
AnimX = (double)(Anim % 4) * WH;
AnimY = (double)(Anim / 4) * WH;
rate = 580.f / (float)dwTotal;
SizeNew = rate * dwNow;
iPos_x += FT_Width * relative;
RenderBitmap(531124, iPos_x - (55.f / FT_Perspective), iPos_y - (42.f / FT_Perspective), (81.f / FT_Perspective), (81.f / FT_Perspective), AnimX, AnimY, WH, WH, 0, 0, 0.0);//Bar Frame
glColor3f(0.84, 0.85, 0.86);
rate = 100.f / (float)dwTotal;
Porcento = rate * dwNow;
CRenderNumber(GetWindowsX - 55.f, GetWindowsY - 26.f, Porcento, 1.0);
glColor3f(1.0, 1.0, 1.0);
glAlphaFunc(GL_GREATER, 0.25f);
::EndBitmap();
::EndOpengl();
::glFlush();
::SwapBuffers(hDC);
}
//========================================================================================================
//-- Chat Position System
//-- Activado/Desactivado el movimiento del Chat Centrandolo mas abajo del Cliente
//-- 0 - Desactiva | 1 - Activa
//========================================================================================================
ChatPosition = 1
// BUG - visualmente en la interface se ve los chat pero cuando apretas F4 no aparece ai los chats
// se deberia arreglar la presion del click en los botones custom Attack, y otros q al darle varios click recien reacciona los botones
OFFSETS
#define PrecionClicIzq (BYTE*)0x81B95A8 //99B - 99.28
#define A_pCursorX *(int*)0x81B9560 //99B - 99.28
#define A_pCursorY *(int*)0x81B955C //99B - 99.28
FUNCION
bool CheckClickCoords(int X, int Y, int Ancho, int Alto)
{
if (!PrecionClicIzq) return false;
bool Click = false;
if (A_pCursorX > X && A_pCursorX < X + Ancho)
{
if (A_pCursorY > Y && A_pCursorY < Y + Alto)
{
Click = true;
}
}
return Click;
}
//PRESION DE CLICK
if(CheckClickCoords(15, 3, 16, 16) == true && PrecionClicIzq == 1)
{
}
startY = Fix_DisplayHeightExt + (470.0 - getY(245)) * 2.0 / 3.0 + 12;
void CButtonAutoLogin(int This, int a2)
{
CUIRenderText_SetFont((int)pTextThis(), *(int*)0xE8C594);
float startX;
float startY;
int JCResto = (pWinWidth / pWinHeightReal / 2) - 320;
startX = JCResto + (640.0 - getX(329)) / 2;
// Ajustar startY para mover hacia abajo 12 puntos
if (pGameResolutionMode == 0)
{
startY = Fix_DisplayHeightExt + (470.0 - getY(245)) * 2.0 / 3.0 + 12;
}
else if (pGameResolutionMode == 1)
{
startY = Fix_DisplayHeightExt + (470.0 - getY(245)) * 2.0 / 3.0 + 12;
}
else if (pGameResolutionMode == 2)
{
startY = Fix_DisplayHeightExt + (470.0 - getY(325)) * 2.0 / 3.0 + 12;
}
else if (pGameResolutionMode == 3)
{
startY = Fix_DisplayHeightExt + (470.0 - getY(325)) * 2.0 / 3.0 + 12;
}
else if (pGameResolutionMode == 4)
{
startY = Fix_DisplayHeightExt + (470.0 - getY(375)) * 2.0 / 3.0 + 12;
}
else if (pGameResolutionMode == 5)
{
startY = Fix_DisplayHeightExt + (470.0 - getY(375)) * 2.0 / 3.0 + 12;
}
else if (pGameResolutionMode == 6)
{
startY = Fix_DisplayHeightExt + (470.0 - getY(375)) * 2.0 / 3.0 + 12;
}
else if (pGameResolutionMode == 7)
{
startY = Fix_DisplayHeightExt + (470.0 - getY(375)) * 2.0 / 3.0 + 12;
}
else if (pGameResolutionMode == 8)
{
startY = Fix_DisplayHeightExt + (470.0 - getY(375)) * 2.0 / 3.0 + 12;
}
int Struct = _Instance() + 16968;
// Verificar si el cursor está en la zona de la casilla de verificación
if (IsCursorInZone(startX + getX(250.0), startY + getY(135), getX(15), getY(15)))
{
if (pIsKeyRelease(VK_LBUTTON))
{
RenderBitmap(0x7B69, startX + getX(250.0), startY + getY(135) + 12, 15.0, 15.0, 0.0, 0.0, 15.0 / 16.0, 15.0 / 32.0, 0, 1, 0.0);
AutoLogin.savePass = !AutoLogin.savePass;
PlayBuffer(25, 0, 0);
}
}
// Renderizar la casilla de verificación
if (!AutoLogin.savePass)
{
RenderBitmap(0x7B69, startX + getX(250.0), startY + getY(135) + 12, 15.0, 15.0, 0.0, 15.0 / 32.0, 15.0 / 16.0, 15.0 / 32.0, 0, 1, 0.0);
}
else
{
RenderBitmap(0x7B69, startX + getX(250.0), startY + getY(135) + 12, 15.0, 15.0, 0.0, 0.0, 15.0 / 16.0, 15.0 / 32.0, 0, 1, 0.0);
}
// Ajustar la posición del texto hacia abajo 12 puntos
CustomFont.Draw((HFONT)pFontNormal, startX + getX(110), startY + getY(138) + 12, 0xffffffD1, 0x0, getX(138), 0, 4, GlobalText(GlobalLine, 3842)); // Save Account/Password
}