Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void cInterface::RenderHPUI(int PosX,int PosY,char *Text,int Life,int MaxLife,bool IsLive)
- {
- pSetBlend(true);
- pSetBackGround(pTextThis(),0x00,0x00,0x00,0x00);
- pSetTextColor(pTextThis(),0xFF,0xFF,0xFF,0xFF);
- if(IsLive)
- {
- glColor4f(0.2f,0.f,0.f,0.7f);
- }
- else
- {
- glColor4f(0.f,0.f,0.f,0.7f);
- }
- float PY = (double)(PosY+2);
- float PX = (double)(PosX+2);
- pRenderColor(PX,PY,53.f,13.f);
- pEndRenderColor();
- glColor4f(1.f,1.f,1.f,1.f);
- float BY = (double)PosY;
- float BX = (double)PosX;
- pDrawGUI(0x7B77,BX,BY,57.f,23.f);
- float CurrentLife = ((double)Life/(double)MaxLife)*49.f;
- float LifeY = (double)(PosY+16);
- float LifeX = (double)(PosX+4);
- pDrawGUI(0x7B78,LifeX,LifeY,CurrentLife,3.f);
- pDrawTextHealth(pTextThis(),PosX+28,PosY+5,Text,0,0,(LPINT)8,0);
- }
- void SEASON3B::CNewUIItemEnduranceInfo::RenderHPUI( int iX, int iY, unicode::t_char* pszName,
- int iLife, int iMaxLife/*=255*/, bool bWarning/*=false*/ )
- {
- EnableAlphaTest();
- g_pRenderText->SetBgColor( 0, 0, 0, 0 );
- g_pRenderText->SetTextColor( 255, 255, 255, 255 );
- // HPUI_FRAME
- if( bWarning == false )
- {
- glColor4f( 0.f, 0.f, 0.f, 0.7f );
- }
- else
- {
- glColor4f( 0.2f, 0.f, 0.f, 0.7f );
- }
- RenderColor( iX+2, iY+2, PETHP_FRAME_WIDTH-4, PETHP_FRAME_HEIGHT-10 );
- EndRenderColor();
- #ifdef PJH_FIX_SPRIT
- if(strcmp(pszName,GlobalText[1214]) == 0)
- {
- int iCharisma = CharacterAttribute->Charisma+CharacterAttribute->AddCharisma; // ¸¶À̳ʽº ¿¸Å ÀÛ¾÷
- PET_INFO PetInfo;
- giPetManager::GetPetInfo(PetInfo, 421-PET_TYPE_DARK_SPIRIT);
- int RequireCharisma = (185+(PetInfo.m_wLevel*15));
- if( RequireCharisma > iCharisma )
- glColor4f ( 1.f, 0.5f, 0.5f, 1.f );
- else
- glColor4f ( 1.f, 1.f, 1.f, 1.f );
- }
- else
- #endif //#ifdef PJH_FIX_SPRIT
- glColor4f ( 1.f, 1.f, 1.f, 1.f );
- RenderImage( IMAGE_PETHP_FRAME, iX, iY, PETHP_FRAME_WIDTH, PETHP_FRAME_HEIGHT );
- // HPUI_Bar
- float fLife = ((float)iLife/(float)iMaxLife)*(float)PETHP_BAR_WIDTH;
- RenderImage( IMAGE_PETHP_BAR, iX+4, iY+PETHP_FRAME_HEIGHT-PETHP_BAR_HEIGHT-4, fLife, PETHP_BAR_HEIGHT );
- // À̸§
- g_pRenderText->RenderText( iX+(PETHP_FRAME_WIDTH/2), iY+5, pszName, 0, 0, RT3_WRITE_CENTER );
- DisableAlphaBlend();
- }
Advertisement
Add Comment
Please, Sign In to add comment