Re: Panel de cambio de Sprite..

#3
Bueno mil disculpas por responder tiempo después , pasa que no tuve Internet por un tiempo..... bueno empiezo a mostar.....

void CGame::bItemDrop_IconPannel1(short msX, short msY)
{
short sX, sY, sItemIndex;
sX = m_stDialogBoxInfo[56].sX; sY = m_stDialogBoxInfo[56].sY;

if (bIconPannel1 == TRUE)
{
sItemIndex = m_stMCursor.sSelectedObjectID;
if (m_bIsItemDisabled[sItemIndex] == TRUE) return;
if (m_cCommand < 0) return;
if ((453 < msX) && (486 > msX) && (438 < msY) && (473 > msY))
{
bItemDrop_Inventory(m_stDialogBoxInfo[2].sX + (rand() % 148), m_stDialogBoxInfo[2].sY + (rand() % 55));
return;
}
if ((425 < msX) && (448 > msX) && (438 < msY) && (473 > msY))
{
bItemDrop_Character();
return;
}
}

}

luego:
if ((m_cSkillMastery[_iGetWeaponSkillType()] == 100) && (bIconPannel1 == TRUE))
{
if (m_iSuperAttackLeft > 0)
{
{
if (GetAsyncKeyState(VK_MENU) >> 15)
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutTransSprite(526, 432, 13, m_dwCurTime);
wsprintf(G_cTxt, "%d", m_iSuperAttackLeft);
PutString_SprFont2(526, 432, G_cTxt, 220, 200, 200);
}
}
else
{
if (m_iSuperAttackLeft > 0)
{
wsprintf(G_cTxt, "%d", m_iSuperAttackLeft);
PutString_SprFont2(526, 432, G_cTxt, 10, 10, 10);
}
}
}

}

luego:

void CGame::DlgBoxClick_IconPannel1(short msX, short msY)
{
short sX, sY;
sX = m_stDialogBoxInfo[56].sX;
sY = m_stDialogBoxInfo[56].sY;

if (bIconPannel1 == TRUE)
{

if ((msX > 480) && (msX < 503) && (432 < msY) && (453 > msY)) {
// Crusade
if (m_bIsCrusadeMode == FALSE) return;
switch (m_iCrusadeDuty) {
case 1: // Fighter
EnableDialogBox(38, NULL, NULL, NULL);
break;

case 2: // Constructor
EnableDialogBox(37, NULL, NULL, NULL);
break;

case 3: // Commander
EnableDialogBox(36, NULL, NULL, NULL);
break;

default: break;
}
PlaySound('E', 14, 5);
}

if ((526 < msX) && (548 > msX) && (432 < msY) && (453 > msY)) {
// Combat Mode Toggle
bSendCommand(MSGID_COMMAND_COMMON, DEF_COMMONTYPE_TOGGLECOMBATMODE, NULL, NULL, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// Character
if ((571 <= msX) && (593 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[1] == TRUE)
DisableDialogBox(1);
else EnableDialogBox(1, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// Inventory
if ((613 <= msX) && (639 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[2] == TRUE)
DisableDialogBox(2);
else EnableDialogBox(2, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// Magic
if ((662 <= msX) && (685 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[3] == TRUE)
DisableDialogBox(3);
else EnableDialogBox(3, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// Skill
if ((708 <= msX) && (731 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[15] == TRUE)
DisableDialogBox(15);
else EnableDialogBox(15, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// Chat
if ((754 <= msX) && (777 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[10] == TRUE)
DisableDialogBox(10);
else EnableDialogBox(10, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// System Menu
if ((800 <= msX) && (823 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[19] == TRUE)
DisableDialogBox(19);
else EnableDialogBox(19, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}
}
}

luego:

void CGame::DrawDialogBox_IconPannel1(short msX, short msY)
{
short sX, sY;
DWORD dwTime = m_dwCurTime;
int i;

sX = m_stDialogBoxInfo[56].sX;
sY = m_stDialogBoxInfo[56].sY;

if (bIconPannel1 == TRUE)
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(sX, sY, 0, dwTime);//panel completo

if ((526 < msX) && (548 > msX) && (432 < msY) && (453 > msY)){
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(526, 432, 12, dwTime);//cuadrado vacio
}

if (m_bIsCombatMode) {
if (m_bIsSafeAttackMode)
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(526, 432, 14, dwTime);//Modo paz //amarillo
else m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(526, 432, 15, dwTime);//Modo ataque//rojo
}

if ((m_bIsCrusadeMode) && (m_iCrusadeDuty != 0)) {
if (m_bAresden == TRUE) {
if ((480 <= msX) && (503 >= msX) && (432 < msY) && (453 > msY))
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(480, 432, 9, dwTime);//ares crusade activo
else m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(480, 432, 10, dwTime);//ares crusade desactivo
}
else if (m_bAresden == FALSE) {
if ((480 <= msX) && (503 >= msX) && (432 < msY) && (453 > msY))
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(480, 432, 8, dwTime);//elvine crusade activo
else m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(480, 432, 11, dwTime);//elvine crusade desactivo
}
}

// CLEROTH - LU
if (m_iLU_Point > 0) {
if ((322 <= msX) && (355 >= msX) && (434 < msY) && (475 > msY))
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(322, 310, 16, dwTime);
else m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(322, 310, 17, dwTime);
}
if ((msY > 432) && (msY < 453))
{
if ((msX > 571) && (msX < 593))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(571, 432, 2, dwTime);// Character
}
if ((msX > 616) && (msX < 639))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(616, 432, 3, dwTime);// Inventory
}
if ((msX > 662) && (msX < 685))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(662, 432, 4, dwTime);// Magic
}
if ((msX > 708) && (msX < 731))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(708, 432, 5, dwTime);// Skill
}
if ((msX > 754) && (msX < 777))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(754, 432, 6, dwTime);// History
}
if ((msX > 800) && (msX < 823))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(800, 432, 7, dwTime);// System Menu
}
}

// Experience Gauge - MORLA - Fixed
if ((msX > 480) && (msX < 823) && (msY > 433) && (msY < 440)) {
wsprintf(G_cTxt, DEF_MSG_EXP "%d / %d", m_iExp, iGetLevelExp(m_iLevel + 1));
PutString(msX - 10, msY - 20, G_cTxt, RGB(250, 250, 220));
}
}
}


luego:

if (bIconPannel1 == TRUE)
{
// HP bar
if (m_iAngelicStr != 0) iMaxPoint = m_iVit * 3 + m_iLevel * 2 + (m_iStr + m_iAngelicStr) / 2;
else iMaxPoint = m_iVit * 3 + m_iLevel * 2 + m_iStr / 2;
if (m_iHP > iMaxPoint) m_iHP = iMaxPoint;
iBarWidth = 101 - (m_iHP * 101) / iMaxPoint;
if (iBarWidth < 0) iBarWidth = 0;
if (iBarWidth > 101) iBarWidth = 101; //101 original
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFastWidth(390, 434, 1, iBarWidth, m_dwCurTime);//Nuevo panel de icono1 Fdr1.0 28/08/2018
//120
wsprintf(G_cTxt, "%d", (short)m_iHP);
if (m_bIsPoisoned)
{
PutString_SprNum(390, 435, G_cTxt, m_wR[5] * 11, m_wG[5] * 11, m_wB[5] * 11);
// PutString_SprFont3(62, 558, "Poisoned", m_wR[5]*8, m_wG[5]*8, m_wB[5]*8, TRUE, 2);//Full_hd
PutString_SprFont3(340, 433, "Poisoned", m_wR[5] * 8, m_wG[5] * 8, m_wB[5] * 8, TRUE, 2);
}
else PutString_SprNum(390, 435, G_cTxt, 200, 100, 100);

//MP bar
iMaxPoint = (m_iMag + m_iAngelicMag) * 2 + m_iLevel * 2 + (m_iInt + m_iAngelicInt) / 2;
if (m_iMP > iMaxPoint) m_iMP = iMaxPoint;
iBarWidth = 101 - (m_iMP * 101) / iMaxPoint;
if (iBarWidth < 0) iBarWidth = 0;
if (iBarWidth > 101) iBarWidth = 101;
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFastWidth(390, 451, 1, iBarWidth, m_dwCurTime);//Nuevo panel de icono1 Fdr1.0 28/08/2018
wsprintf(G_cTxt, "%d", (short)m_iMP);
PutString_SprNum(390, 450, G_cTxt, 100, 100, 200);

// SP bar
if (m_iAngelicStr != 0) iMaxPoint = m_iLevel * 2 + (m_iStr + m_iAngelicStr) * 2;
else iMaxPoint = m_iLevel * 2 + m_iStr * 2;
if (m_iSP > iMaxPoint) m_iSP = iMaxPoint;
iBarWidth = 101 - (m_iSP * 101) / iMaxPoint;
if (iBarWidth < 0) iBarWidth = 0;
if (iBarWidth > 101) iBarWidth = 101;
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFastWidth(390, 467, 12, iBarWidth, m_dwCurTime);//Nuevo panel de icono1 Fdr1.0 28/08/2018
}

}

luego:

iNext += 1;
if ((msX >= sX + 20) && (msX <= sX + 220) && (msY >= sY + iNext * 17 + 45) && (msY <= sY + iNext * 17 + 59))
{
PutString2(sX + 25, sY + iNext * 17 + 45, "Icono Panel", 255, 255, 255);
}
else PutString2(sX + 25, sY + iNext * 17 + 45, "Icono Pane", 128, 128, 128);

if (bIconPannel1) PutString2(sX + 180, sY + iNext * 17 + 45, "ON", 64, 255, 64);
else PutString2(sX + 180, sY + iNext * 17 + 45, "OFF", 255, 64, 64);

luego:

iNext += 1; //este no funciona aun ver mas luego ahora no hay ganas
if ((msX >= sX + 20) && (msX <= sX + 220) && (msY >= sY + iNext * 17 + 45) && (msY <= sY + iNext * 17 + 59))
{
if (bIconPannel1)
{
AddEventList("The appearance of the Icon Panel has been changed to original size.", 10);
bIconPannel1 = FALSE;
}
else
{
AddEventList("The appearance of the Icon Panel has been minimized.", 10);
bIconPannel1 = TRUE;
}
return;
}


estuve pensando que el problema de que no aparezca podría ser las dimensiones que aun no comprendo de esta parte

m_stDialogBoxInfo[56].sX = 0; ///estas cordenadas aun no tengo idea de que manejan
m_stDialogBoxInfo[56].sY = 427; //estas menos

las otras dos si se que hacen...
m_stDialogBoxInfo[56].sSizeX = 254;//dimension de ancho 254
m_stDialogBoxInfo[56].sSizeY = 43;//dimension de altura43

bueno el tema anterior ya lo pude solucionar solo me falta que me aparezca la imagen para poder ordenar las cordenadas...

aqui dejo una imagen...

https://ibb.co/irdhMp

Re: Panel de cambio de Sprite..

#4
ociredef wrote:
Fri Sep 28, 2018 11:49 pm
Bueno mil disculpas por responder tiempo después , pasa que no tuve Internet por un tiempo..... bueno empiezo a mostar.....

void CGame::bItemDrop_IconPannel1(short msX, short msY)
{
short sX, sY, sItemIndex;
sX = m_stDialogBoxInfo[56].sX; sY = m_stDialogBoxInfo[56].sY;

if (bIconPannel1 == TRUE)
{
sItemIndex = m_stMCursor.sSelectedObjectID;
if (m_bIsItemDisabled[sItemIndex] == TRUE) return;
if (m_cCommand < 0) return;
if ((453 < msX) && (486 > msX) && (438 < msY) && (473 > msY))
{
bItemDrop_Inventory(m_stDialogBoxInfo[2].sX + (rand() % 148), m_stDialogBoxInfo[2].sY + (rand() % 55));
return;
}
if ((425 < msX) && (448 > msX) && (438 < msY) && (473 > msY))
{
bItemDrop_Character();
return;
}
}

}

luego:
if ((m_cSkillMastery[_iGetWeaponSkillType()] == 100) && (bIconPannel1 == TRUE))
{
if (m_iSuperAttackLeft > 0)
{
{
if (GetAsyncKeyState(VK_MENU) >> 15)
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutTransSprite(526, 432, 13, m_dwCurTime);
wsprintf(G_cTxt, "%d", m_iSuperAttackLeft);
PutString_SprFont2(526, 432, G_cTxt, 220, 200, 200);
}
}
else
{
if (m_iSuperAttackLeft > 0)
{
wsprintf(G_cTxt, "%d", m_iSuperAttackLeft);
PutString_SprFont2(526, 432, G_cTxt, 10, 10, 10);
}
}
}

}

luego:

void CGame::DlgBoxClick_IconPannel1(short msX, short msY)
{
short sX, sY;
sX = m_stDialogBoxInfo[56].sX;
sY = m_stDialogBoxInfo[56].sY;

if (bIconPannel1 == TRUE)
{

if ((msX > 480) && (msX < 503) && (432 < msY) && (453 > msY)) {
// Crusade
if (m_bIsCrusadeMode == FALSE) return;
switch (m_iCrusadeDuty) {
case 1: // Fighter
EnableDialogBox(38, NULL, NULL, NULL);
break;

case 2: // Constructor
EnableDialogBox(37, NULL, NULL, NULL);
break;

case 3: // Commander
EnableDialogBox(36, NULL, NULL, NULL);
break;

default: break;
}
PlaySound('E', 14, 5);
}

if ((526 < msX) && (548 > msX) && (432 < msY) && (453 > msY)) {
// Combat Mode Toggle
bSendCommand(MSGID_COMMAND_COMMON, DEF_COMMONTYPE_TOGGLECOMBATMODE, NULL, NULL, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// Character
if ((571 <= msX) && (593 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[1] == TRUE)
DisableDialogBox(1);
else EnableDialogBox(1, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// Inventory
if ((613 <= msX) && (639 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[2] == TRUE)
DisableDialogBox(2);
else EnableDialogBox(2, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// Magic
if ((662 <= msX) && (685 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[3] == TRUE)
DisableDialogBox(3);
else EnableDialogBox(3, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// Skill
if ((708 <= msX) && (731 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[15] == TRUE)
DisableDialogBox(15);
else EnableDialogBox(15, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// Chat
if ((754 <= msX) && (777 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[10] == TRUE)
DisableDialogBox(10);
else EnableDialogBox(10, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}

// System Menu
if ((800 <= msX) && (823 >= msX) && (432 < msY) && (453 > msY)) {
if (m_bIsDialogEnabled[19] == TRUE)
DisableDialogBox(19);
else EnableDialogBox(19, NULL, NULL, NULL);
PlaySound('E', 14, 5);
}
}
}

luego:

void CGame::DrawDialogBox_IconPannel1(short msX, short msY)
{
short sX, sY;
DWORD dwTime = m_dwCurTime;
int i;

sX = m_stDialogBoxInfo[56].sX;
sY = m_stDialogBoxInfo[56].sY;

if (bIconPannel1 == TRUE)
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(sX, sY, 0, dwTime);//panel completo

if ((526 < msX) && (548 > msX) && (432 < msY) && (453 > msY)){
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(526, 432, 12, dwTime);//cuadrado vacio
}

if (m_bIsCombatMode) {
if (m_bIsSafeAttackMode)
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(526, 432, 14, dwTime);//Modo paz //amarillo
else m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(526, 432, 15, dwTime);//Modo ataque//rojo
}

if ((m_bIsCrusadeMode) && (m_iCrusadeDuty != 0)) {
if (m_bAresden == TRUE) {
if ((480 <= msX) && (503 >= msX) && (432 < msY) && (453 > msY))
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(480, 432, 9, dwTime);//ares crusade activo
else m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(480, 432, 10, dwTime);//ares crusade desactivo
}
else if (m_bAresden == FALSE) {
if ((480 <= msX) && (503 >= msX) && (432 < msY) && (453 > msY))
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(480, 432, 8, dwTime);//elvine crusade activo
else m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(480, 432, 11, dwTime);//elvine crusade desactivo
}
}

// CLEROTH - LU
if (m_iLU_Point > 0) {
if ((322 <= msX) && (355 >= msX) && (434 < msY) && (475 > msY))
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(322, 310, 16, dwTime);
else m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(322, 310, 17, dwTime);
}
if ((msY > 432) && (msY < 453))
{
if ((msX > 571) && (msX < 593))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(571, 432, 2, dwTime);// Character
}
if ((msX > 616) && (msX < 639))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(616, 432, 3, dwTime);// Inventory
}
if ((msX > 662) && (msX < 685))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(662, 432, 4, dwTime);// Magic
}
if ((msX > 708) && (msX < 731))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(708, 432, 5, dwTime);// Skill
}
if ((msX > 754) && (msX < 777))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(754, 432, 6, dwTime);// History
}
if ((msX > 800) && (msX < 823))
{
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFast(800, 432, 7, dwTime);// System Menu
}
}

// Experience Gauge - MORLA - Fixed
if ((msX > 480) && (msX < 823) && (msY > 433) && (msY < 440)) {
wsprintf(G_cTxt, DEF_MSG_EXP "%d / %d", m_iExp, iGetLevelExp(m_iLevel + 1));
PutString(msX - 10, msY - 20, G_cTxt, RGB(250, 250, 220));
}
}
}


luego:

if (bIconPannel1 == TRUE)
{
// HP bar
if (m_iAngelicStr != 0) iMaxPoint = m_iVit * 3 + m_iLevel * 2 + (m_iStr + m_iAngelicStr) / 2;
else iMaxPoint = m_iVit * 3 + m_iLevel * 2 + m_iStr / 2;
if (m_iHP > iMaxPoint) m_iHP = iMaxPoint;
iBarWidth = 101 - (m_iHP * 101) / iMaxPoint;
if (iBarWidth < 0) iBarWidth = 0;
if (iBarWidth > 101) iBarWidth = 101; //101 original
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFastWidth(390, 434, 1, iBarWidth, m_dwCurTime);//Nuevo panel de icono1 Fdr1.0 28/08/2018
//120
wsprintf(G_cTxt, "%d", (short)m_iHP);
if (m_bIsPoisoned)
{
PutString_SprNum(390, 435, G_cTxt, m_wR[5] * 11, m_wG[5] * 11, m_wB[5] * 11);
// PutString_SprFont3(62, 558, "Poisoned", m_wR[5]*8, m_wG[5]*8, m_wB[5]*8, TRUE, 2);//Full_hd
PutString_SprFont3(340, 433, "Poisoned", m_wR[5] * 8, m_wG[5] * 8, m_wB[5] * 8, TRUE, 2);
}
else PutString_SprNum(390, 435, G_cTxt, 200, 100, 100);

//MP bar
iMaxPoint = (m_iMag + m_iAngelicMag) * 2 + m_iLevel * 2 + (m_iInt + m_iAngelicInt) / 2;
if (m_iMP > iMaxPoint) m_iMP = iMaxPoint;
iBarWidth = 101 - (m_iMP * 101) / iMaxPoint;
if (iBarWidth < 0) iBarWidth = 0;
if (iBarWidth > 101) iBarWidth = 101;
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFastWidth(390, 451, 1, iBarWidth, m_dwCurTime);//Nuevo panel de icono1 Fdr1.0 28/08/2018
wsprintf(G_cTxt, "%d", (short)m_iMP);
PutString_SprNum(390, 450, G_cTxt, 100, 100, 200);

// SP bar
if (m_iAngelicStr != 0) iMaxPoint = m_iLevel * 2 + (m_iStr + m_iAngelicStr) * 2;
else iMaxPoint = m_iLevel * 2 + m_iStr * 2;
if (m_iSP > iMaxPoint) m_iSP = iMaxPoint;
iBarWidth = 101 - (m_iSP * 101) / iMaxPoint;
if (iBarWidth < 0) iBarWidth = 0;
if (iBarWidth > 101) iBarWidth = 101;
m_pSprite[DEF_SPRID_INTERFACE_ND_ICONPANNEL1]->PutSpriteFastWidth(390, 467, 12, iBarWidth, m_dwCurTime);//Nuevo panel de icono1 Fdr1.0 28/08/2018
}

}

luego:

iNext += 1;
if ((msX >= sX + 20) && (msX <= sX + 220) && (msY >= sY + iNext * 17 + 45) && (msY <= sY + iNext * 17 + 59))
{
PutString2(sX + 25, sY + iNext * 17 + 45, "Icono Panel", 255, 255, 255);
}
else PutString2(sX + 25, sY + iNext * 17 + 45, "Icono Pane", 128, 128, 128);

if (bIconPannel1) PutString2(sX + 180, sY + iNext * 17 + 45, "ON", 64, 255, 64);
else PutString2(sX + 180, sY + iNext * 17 + 45, "OFF", 255, 64, 64);

luego:

iNext += 1; //este no funciona aun ver mas luego ahora no hay ganas
if ((msX >= sX + 20) && (msX <= sX + 220) && (msY >= sY + iNext * 17 + 45) && (msY <= sY + iNext * 17 + 59))
{
if (bIconPannel1)
{
AddEventList("The appearance of the Icon Panel has been changed to original size.", 10);
bIconPannel1 = FALSE;
}
else
{
AddEventList("The appearance of the Icon Panel has been minimized.", 10);
bIconPannel1 = TRUE;
}
return;
}


estuve pensando que el problema de que no aparezca podría ser las dimensiones que aun no comprendo de esta parte

m_stDialogBoxInfo[56].sX = 0; ///estas cordenadas aun no tengo idea de que manejan
m_stDialogBoxInfo[56].sY = 427; //estas menos

las otras dos si se que hacen...
m_stDialogBoxInfo[56].sSizeX = 254;//dimension de ancho 254
m_stDialogBoxInfo[56].sSizeY = 43;//dimension de altura43

bueno el tema anterior ya lo pude solucionar solo me falta que me aparezca la imagen para poder ordenar las cordenadas...

aqui dejo una imagen...

https://ibb.co/irdhMp
Al iniciar el cliente cargas el sprite nuevo ?
Centuu.-

Sol Lucet Omnibus.-

Re: Panel de cambio de Sprite..

#5
De que manera me daria cuenta si carga o no? la mayoria de sprite que agrege los tomo, parte de ese sprite lo probé si lo tomaba y si lo hizo...
Donde creo questa el problema es aqui:

m_stDialogBoxInfo[56].sX = 0; ???
m_stDialogBoxInfo[56].sY = 427;??
las otras dos si se que hacen...
m_stDialogBoxInfo[56].sSizeX = 254;
m_stDialogBoxInfo[56].sSizeY = 43;

se que sizeX e Y manejan la dimensió de la imagen y sx e sy no se si manejan las cordenadas a las que. Lo tengo que dibujar en el cliente, de ser asi que cordenadas tendria que poner o como la conseguiría?

Re: Panel de cambio de Sprite..

#6
m_stDialogBoxInfo[56].sX = 0; ??? <- This is the X cords on where you want the image of the sprite to be first loaded.
m_stDialogBoxInfo[56].sY = 427;?? <- This is the Y cords on where you want the image of the sprite to be first loaded.
m_stDialogBoxInfo[56].sSizeX = 254; <- This is the size of the whole sprite image of dialog box 56, X axis.
m_stDialogBoxInfo[56].sSizeY = 43; <- This is the size of the whole sprite image of dialog box 56, Y axis.

You can check the size of X and Y inside pak builder.
LifeX

Re: Panel de cambio de Sprite..

#7
ociredef wrote:
Thu Oct 04, 2018 8:00 pm
De que manera me daria cuenta si carga o no? la mayoria de sprite que agrege los tomo, parte de ese sprite lo probé si lo tomaba y si lo hizo...
Donde creo questa el problema es aqui:

m_stDialogBoxInfo[56].sX = 0; ???
m_stDialogBoxInfo[56].sY = 427;??
las otras dos si se que hacen...
m_stDialogBoxInfo[56].sSizeX = 254;
m_stDialogBoxInfo[56].sSizeY = 43;

se que sizeX e Y manejan la dimensió de la imagen y sx e sy no se si manejan las cordenadas a las que. Lo tengo que dibujar en el cliente, de ser asi que cordenadas tendria que poner o como la conseguiría?
Dadas las coordenadas puede ser que se muestre fuera de la pantalla al cargar el sprite, creo que uno es Posicion (x,y) en pantalla y el otro es Posicion en el mapa en general...
Centuu.-

Sol Lucet Omnibus.-

Who is online

Users browsing this forum: No registered users and 0 guests

cron