Add main menu window interface outlines. Fixed menu labels not being centered properly.
This commit is contained in:
+9
-2
@@ -30,6 +30,9 @@ void Menu::InitializeMenus(){
|
||||
InitializeTestMenu();
|
||||
InitializeTestSubMenu();
|
||||
InitializeInventoryWindow();
|
||||
InitializeClassInfoWindow();
|
||||
InitializeClassSelectionWindow();
|
||||
InitializeMainMenuWindow();
|
||||
|
||||
for(MenuType type=TEST;type<MenuType::ENUM_END;type=MenuType(int(type+1))){
|
||||
if(menus.count(type)==0){
|
||||
@@ -236,13 +239,13 @@ void Menu::Draw(Crawler*game){
|
||||
game->Clear(BLANK);
|
||||
for(auto&component:displayComponents){
|
||||
if(component->renderInMain){
|
||||
component->_Draw(game,{0,0},this==Menu::stack.back());
|
||||
component->_Draw(game,pos,this==Menu::stack.back());
|
||||
}
|
||||
}
|
||||
for(auto&key:buttons){
|
||||
for(auto&button:key.second){
|
||||
if(button->renderInMain){
|
||||
button->_Draw(game,{0,0},this==Menu::stack.back());
|
||||
button->_Draw(game,pos,this==Menu::stack.back());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -582,4 +585,8 @@ void Menu::AddInventoryListener(MenuComponent*component,ITCategory category){
|
||||
std::cout<<"WARNING! Inventory category "<<category<<" does not exist!"<<std::endl;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
vf2d Menu::center(){
|
||||
return pos+size/2;
|
||||
}
|
||||
Reference in New Issue
Block a user