Fix Perspective correction on ViewPort PGEX. Implement windowing system and remove sprite reliance from all menu components.

This commit is contained in:
2023-12-14 04:18:05 -06:00
parent 4bab1397dc
commit 7a46f79f2b
24 changed files with 225 additions and 278 deletions
+2 -4
View File
@@ -62,10 +62,8 @@ protected:
timer-=2*PI;
}
}
virtual inline void Draw(Crawler*game,vf2d parentPos)override{}
virtual inline void DrawDecal(Crawler*game,vf2d parentPos,bool focused)override{
//MenuComponent::DrawDecal(game,parentPos,focused);
game->DrawWarpedDecal(icon,std::array<vf2d,4>{
virtual inline void DrawDecal(ViewPort&window,vf2d parentPos,bool focused)override{
window.DrawWarpedDecal(icon,std::array<vf2d,4>{
Menu::menus[parentMenu]->pos+rect.pos+vf2d{abs(sin(timer)),sin(float(timer+PI))}*vf2d{rotatingFactor,perspectiveFactor},
Menu::menus[parentMenu]->pos+rect.pos+vf2d{0,rect.size.y}+vf2d{abs(sin(timer)),sin(timer)}*vf2d{rotatingFactor,perspectiveFactor},
Menu::menus[parentMenu]->pos+rect.pos+rect.size+vf2d{-abs(sin(float(timer+PI))),sin(float(timer+PI))}*vf2d{rotatingFactor,perspectiveFactor},