Moved settings related to the game itself into its own settings save file. Emscripten build also saves a separate system settings file in indexeddb. Added checks to prevent menu sounds from playing when the menu is not currently open, but adjusted in a different location in the game. Implemented different button icon sets and a setting to toggle between them. Removed the double button display (caused more confusion and took up more room). Fixed a bug with iterating through navigation groups when a button was removed/disabled from the list. Removed iconscaling dependency based on MenuIconButton sizes.

This commit is contained in:
2024-02-20 03:47:12 -06:00
parent 0d295021b6
commit 66b0648a59
45 changed files with 459 additions and 155 deletions
+9 -3
View File
@@ -78,7 +78,9 @@ void Menu::InitializeMerchantWindow(){
Component<RowInventoryScrollableWindowComponent>(data.menu.GetType(),"Inventory Display - "+data.menu.S(A::LAST_INVENTORY_TYPE_OPENED))->Disable();
Component<MenuComponent>(data.menu.GetType(),data.menu.S(A::LAST_INVENTORY_TYPE_OPENED)+" Inventory Tab")->Disable();
data.component.lock()->selected=true;
SoundEffect::PlaySFX("Button Click",SoundEffect::CENTERED);
if(Menu::IsCurrentlyActive(data.menu.GetType())){
SoundEffect::PlaySFX("Button Click",SoundEffect::CENTERED);
}
return true;
})END;
buyTab->selected=true;
@@ -95,7 +97,9 @@ void Menu::InitializeMerchantWindow(){
Component<RowInventoryScrollableWindowComponent>(data.menu.GetType(),"Inventory Display - "+data.menu.S(A::LAST_INVENTORY_TYPE_OPENED))->Enable();
Component<MenuComponent>(data.menu.GetType(),data.menu.S(A::LAST_INVENTORY_TYPE_OPENED)+" Inventory Tab")->Enable();
data.component.lock()->selected=true;
SoundEffect::PlaySFX("Button Click",SoundEffect::CENTERED);
if(Menu::IsCurrentlyActive(data.menu.GetType())){
SoundEffect::PlaySFX("Button Click",SoundEffect::CENTERED);
}
return true;
})END;
sellTab->selectionType=SelectionType::HIGHLIGHT;
@@ -162,7 +166,9 @@ void Menu::InitializeMerchantWindow(){
if(data.menu.I(A::ITEM_SLOT)>=0){
data.menu.SetSelection(Component<RowInventoryScrollableWindowComponent>(data.menu.GetType(),"Inventory Display - "+data.component.lock()->S(A::CATEGORY_NAME))->GetComponents()[0],true);
}
SoundEffect::PlaySFX("Button Click",SoundEffect::CENTERED);
if(Menu::IsCurrentlyActive(data.menu.GetType())){
SoundEffect::PlaySFX("Button Click",SoundEffect::CENTERED);
}
return true;
},vf2d{textScaling,1.f})END;
button->SetSelectionType(HIGHLIGHT);