|
|
|
@ -699,6 +699,20 @@ void Crawler::RenderHud(){ |
|
|
|
|
} |
|
|
|
|
offset-=6; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(GetPlayer()->GetCastInfo().castTimer>0){ |
|
|
|
|
FillRectDecal(vf2d{ScreenWidth()/2-92.f,ScreenHeight()-90.f},{184,20},BLACK); |
|
|
|
|
FillRectDecal(vf2d{ScreenWidth()/2-90.f,ScreenHeight()-88.f},{180,16},DARK_GREY); |
|
|
|
|
float timer=GetPlayer()->GetCastInfo().castTimer; |
|
|
|
|
float totalTime=GetPlayer()->GetCastInfo().castTotalTime; |
|
|
|
|
std::string castText=GetPlayer()->GetCastInfo().name; |
|
|
|
|
GradientFillRectDecal(vf2d{ScreenWidth()/2-90.f,ScreenHeight()-88.f},{(timer/totalTime)*180,16},{247,125,37},{247,125,37},{247,184,37},{247,184,37}); |
|
|
|
|
std::stringstream castTimeDisplay;
|
|
|
|
|
castTimeDisplay<<std::fixed<<std::setprecision(1)<<timer; |
|
|
|
|
DrawShadowStringPropDecal(vf2d{ScreenWidth()/2+90.f,ScreenHeight()-88.f}-vf2d{float(GetTextSizeProp(castTimeDisplay.str()).x),0},castTimeDisplay.str(),WHITE,BLACK); |
|
|
|
|
DrawShadowStringPropDecal(vf2d{ScreenWidth()/2.f-GetTextSizeProp(castText).x*2/2,ScreenHeight()-64.f},castText,WHITE,BLACK,{2,3},2.f); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
DrawDecal({2,2},GFX_Heart.Decal()); |
|
|
|
|
DrawDecal({2,20},GFX_Mana.Decal()); |
|
|
|
|
std::string text=player->GetHealth()>0?std::to_string(player->GetHealth()):"X"; |
|
|
|
|