Added XP bar animations and steady increasing progress bar. Added level up animation text on stage completion screen. Refactor enable and disable functions for menu components. Differentiated between disabling due to being outside the window, and manual enable/disabling of components. Fix infinite loop bug with components outside of a scrollable window component not being iterated over. Fix bug with hovering over non-navigational components causing the default component for a menu to be selected while in mouse navigation mode. Release Build 7095.

This commit is contained in:
2024-02-11 18:31:30 -06:00
parent 22b1557c05
commit 8afd66632a
29 changed files with 244 additions and 104 deletions
@@ -92,7 +92,7 @@ void Menu::InitializeClassSelectionWindow(){
#endif
return true;
})END
->disabled=true;
->Disable();
vf2d buttonPadding={2,2};
vf2d buttonSize={floor(outlineSize.y/3-buttonPadding.y*3),outlineSize.y/9-buttonPadding.y*3}; //The floor is for fixing a small pixel rounding bug.
@@ -146,7 +146,7 @@ void Menu::InitializeClassSelectionWindow(){
classSelectionWindow->ADD(className+" Label",MenuLabel)(geom2d::rect<float>{backgroundOffsetPos,buttonSize},className,1,ComponentAttr::SHADOW)END;
auto classSprite=classSelectionWindow->ADD(className+" Icon",MenuAnimatedIconToggleButton)(geom2d::rect<float>{backgroundOffsetPos+vf2d{0,12},backgroundSize+vf2d{0,-buttonSize.y-12}},classAnimationName,[](MenuFuncData data){
data.menu.components["Confirm"]->Enable(true);
data.menu.components["Confirm"]->Enable();
data.menu.components["Confirm"]->S(A::CLASS_SELECTION)=data.component.lock()->S(A::CLASS_SELECTION);
return true;
})END;