Resized renders to fit class info window. Class info window controller compatibility added. Release Build 6961.

This commit is contained in:
2024-02-10 03:20:33 -06:00
parent 0a9136e6c4
commit f5bcd4f869
8 changed files with 19 additions and 8 deletions
+15 -1
View File
@@ -55,7 +55,7 @@ void Menu::InitializeClassInfoWindow(){
auto label=classInfoWindow->ADD("Class Name",MenuLabel)(geom2d::rect<float>{{0,0},{classInfoWindow->size.x-1,24}},data.className,2,ComponentAttr::SHADOW|ComponentAttr::OUTLINE|ComponentAttr::BACKGROUND)END;
classInfoWindow->ADD("Rotating Character Display",CharacterRotatingDisplay)(geom2d::rect<float>{{15,48},{72,120}},GFX[data.classFullImgName].Decal())END;
classInfoWindow->ADD("Rotating Character Display",CharacterRotatingDisplay)(geom2d::rect<float>{{-20,30},{144,180}},GFX[data.classFullImgName].Decal())END;
vf2d healthDisplayLabelPos={classInfoWindow->size.x/3,label->GetPos().y+24};
vf2d labelSize={2*classInfoWindow->size.x/3-1,16};
@@ -72,4 +72,18 @@ void Menu::InitializeClassInfoWindow(){
classInfoWindow->ADD("Right Click Ability Display",CharacterAbilityPreviewComponent)(geom2d::rect<float>{healthDisplayLabelPos+vf2d{0,32*3}+abilityIconOffsets,labelSize*vf2d{1,2}},data.rightClickAbility)END;
classInfoWindow->ADD("Back Button",MenuComponent)(geom2d::rect<float>{{classInfoWindow->center().x/2,healthDisplayLabelPos.y+32*4+abilityIconOffsets.y+12},{classInfoWindow->size.x/2,16}},"Back",[](MenuFuncData data){Menu::CloseMenu();return true;})END;
classInfoWindow->SetupKeyboardNavigation(
[](MenuType type,Data&returnData){ //On Open
returnData="Back Button";
},
{ //Button Key
{game->KEY_BACK,{"Back",[](MenuType type){
Component<MenuComponent>(type,"Back Button")->Click();
}}},
}
,{ //Button Navigation Rules
});
}