diff --git a/Adventures in Lestoria/BlacksmithCraftingWindow.cpp b/Adventures in Lestoria/BlacksmithCraftingWindow.cpp index 24956af4..37f50801 100644 --- a/Adventures in Lestoria/BlacksmithCraftingWindow.cpp +++ b/Adventures in Lestoria/BlacksmithCraftingWindow.cpp @@ -43,6 +43,7 @@ All rights reserved. #include "RowInventoryScrollableWindowComponent.h" #include "EnhancementStatsLabel.h" #include "RequiredMaterialsList.h" +#include "SoundEffect.h" INCLUDE_game INCLUDE_ITEM_CATEGORIES @@ -83,6 +84,7 @@ void Menu::InitializeBlacksmithCraftingWindow(){ }else{ data.menu.SetSelection(std::weak_ptr(Component(data.menu.GetType(),"Leave Button"))); } + SoundEffect::PlaySFX("Button Click",SoundEffect::CENTERED); return true; })END; weaponTab->selected=true; @@ -98,6 +100,7 @@ void Menu::InitializeBlacksmithCraftingWindow(){ }else{ data.menu.SetSelection(std::weak_ptr(Component(data.menu.GetType(),"Leave Button"))); } + SoundEffect::PlaySFX("Button Click",SoundEffect::CENTERED); return true; })END; armorTab->selectionType=SelectionType::HIGHLIGHT; @@ -237,8 +240,8 @@ void Menu::InitializeBlacksmithCraftingWindow(){ {game->KEY_BACK,{"Leave",[](MenuType type){ Menu::CloseMenu(); }}}, + {{game->KEY_SCROLL,Pressed},{"Navigate",[](MenuType type){}}}, {game->KEY_CONFIRM,{"Select",[](MenuType type){}}}, - {{game->KEY_SHOULDER,Pressed},{"Scroll Up/Down",[](MenuType type){}}}, {{game->KEY_FASTSCROLLDOWN,PressedDAS},{"",[&](MenuType type){ if(!Menu::menus[type]->GetSelection().expired()&& !Menu::menus[type]->GetSelection().lock()->parentComponent.expired()){ @@ -264,7 +267,7 @@ void Menu::InitializeBlacksmithCraftingWindow(){ Component(type,"Weapon Tab")->Click(); } }}}, - {{game->KEY_SCROLL,Pressed},{"Navigate",[](MenuType type){}}}, + {{game->KEY_SHOULDER,Pressed},{"Scroll Up/Down",[](MenuType type){}}}, } ,{ //Button Navigation Rules {"Weapon Tab",{ diff --git a/Adventures in Lestoria/BuyItemWindow.cpp b/Adventures in Lestoria/BuyItemWindow.cpp index e9482a86..a1ce23d0 100644 --- a/Adventures in Lestoria/BuyItemWindow.cpp +++ b/Adventures in Lestoria/BuyItemWindow.cpp @@ -134,6 +134,7 @@ void Menu::InitializeBuyItemWindow(){ Component(type,"Increase buy amount Button")->Click(); } }}}, + {{game->KEY_SCROLL,Pressed},{"Navigate",[](MenuType type){}}}, {game->KEY_BACK,{"Back",[](MenuType type){ Menu::CloseMenu(); }}}, diff --git a/Adventures in Lestoria/ConsumableCraftingWindow.cpp b/Adventures in Lestoria/ConsumableCraftingWindow.cpp index 9c52c383..390af7dc 100644 --- a/Adventures in Lestoria/ConsumableCraftingWindow.cpp +++ b/Adventures in Lestoria/ConsumableCraftingWindow.cpp @@ -44,6 +44,7 @@ All rights reserved. #include "RowInventoryScrollableWindowComponent.h" #include "EnhancementStatsLabel.h" #include "RequiredMaterialsList.h" +#include "SoundEffect.h" INCLUDE_game INCLUDE_ITEM_CATEGORIES @@ -52,9 +53,13 @@ INCLUDE_GFX void Menu::InitializeConsumableCraftingWindow(){ Menu*consumableCraftingWindow=CreateMenu(CRAFT_CONSUMABLE,CENTERED,game->GetScreenSize()-vi2d{52,52}); + + float windowWidth=consumableCraftingWindow->size.x; + + consumableCraftingWindow->ADD("Craft Consumables Header",MenuLabel)(geom2d::rect{{0,0},{windowWidth,24}},"Consumable Crafting",2.f,ComponentAttr::BACKGROUND|ComponentAttr::SHADOW|ComponentAttr::OUTLINE)END; #pragma region Craftables Inventory Display - auto craftingItemsDisplay=consumableCraftingWindow->ADD("Crafting Inventory Display",RowInventoryScrollableWindowComponent)(geom2d::rect{{2,28},{220,consumableCraftingWindow->size.y-44}},"Item Name Label","Item Description Label", + auto craftingItemsDisplay=consumableCraftingWindow->ADD("Crafting Inventory Display",RowInventoryScrollableWindowComponent)(geom2d::rect{{0,28},{222,consumableCraftingWindow->size.y-44}},"Item Name Label","Item Description Label", [](MenuFuncData data){ std::weak_ptrcomp=DYNAMIC_POINTER_CAST(data.component.lock()); const std::weak_ptritem=comp.lock()->GetItem(); @@ -65,6 +70,8 @@ void Menu::InitializeConsumableCraftingWindow(){ Component(CONSUMABLE_CRAFT_ITEM,"Craft Button")->SetGrayedOut(!item.lock()->CanEnhanceItem()); if(item.lock()->GetEnhancementInfo()[0].chapterAvailable<=game->GetCurrentChapter()){ Menu::OpenMenu(CONSUMABLE_CRAFT_ITEM); + }else{ + SoundEffect::PlaySFX("Locked Item",SoundEffect::CENTERED); } return true; }, @@ -83,7 +90,7 @@ void Menu::InitializeConsumableCraftingWindow(){ return true; }, InventoryCreator::RowPlayerWeapons_InventoryUpdate, - InventoryWindowOptions{.padding=1,.size={207,28}} + InventoryWindowOptions{.padding=1,.size={209,28}} )END; craftingItemsDisplay->SetCompactDescriptions(CRAFTING_INFO); @@ -134,4 +141,78 @@ void Menu::InitializeConsumableCraftingWindow(){ Menu::CloseMenu(); return true; },vf2d{2.f,2.f})END; + + consumableCraftingWindow->SetupKeyboardNavigation( + [](MenuType type,Data&returnData){ //On Open + auto&craftingList=Component(type,"Crafting Inventory Display")->GetComponents(); + if(craftingList.size()>0){ + returnData=craftingList[0]; + }else{ + returnData="Back Button"; + } + }, + { //Button Key + {{game->KEY_SHOULDER,Pressed},{"Scroll Up/Down",[](MenuType type){}}}, + {{game->KEY_FASTSCROLLDOWN,PressedDAS},{"",[&](MenuType type){ + if(!Menu::menus[type]->GetSelection().expired()&& + !Menu::menus[type]->GetSelection().lock()->parentComponent.expired()){ + Menu::menus[type]->GetSelection().lock()->parentComponent.lock()->IncreaseSelectionIndex(3.f); + } + }}}, + {{game->KEY_FASTSCROLLUP,PressedDAS},{"",[&](MenuType type){ + if(!Menu::menus[type]->GetSelection().expired()&& + !Menu::menus[type]->GetSelection().lock()->parentComponent.expired()){ + Menu::menus[type]->GetSelection().lock()->parentComponent.lock()->IncreaseSelectionIndex(-3.f); + } + }}}, + {{game->KEY_SCROLL,Pressed},{"Navigate",[](MenuType type){}}}, + {game->KEY_BACK,{"Back",[](MenuType type){ + Menu::CloseMenu(); + }}}, + {game->KEY_CONFIRM,{"Select",[](MenuType type){}}}, + } + ,{ //Button Navigation Rules + {"Back Button",{ + .up=[](MenuType type,Data&returnData){ + auto&itemList=Component(type,"Crafting Inventory Display")->GetComponents(); + if(itemList.size()>0){ + returnData=itemList[itemList.size()-1]; + }else{ + returnData="Back Button"; + } + }, + .down=[](MenuType type,Data&returnData){ + auto&itemList=Component(type,"Crafting Inventory Display")->GetComponents(); + if(itemList.size()>0){ + returnData=itemList[0]; + }else{ + returnData="Back Button"; + } + },}}, + {"Crafting Inventory Display",{ + .up=[](MenuType type,Data&returnData){ + auto itemDisplay=Component(type,"Crafting Inventory Display"); + size_t selectedIndex=itemDisplay->GetComponentIndex(Menu::menus[type]->GetSelection()); + if(selectedIndex!=itemDisplay->GetComponents().size()){ + selectedIndex--; + if(selectedIndex>=itemDisplay->GetComponents().size()){ + returnData="Back Button"; + }else{ + returnData=itemDisplay->GetComponents()[selectedIndex]; + } + }else ERR("WARNING! Could not get selected item within crafting inventory display! THIS SHOULD NOT BE HAPPENING!") + }, + .down=[](MenuType type,Data&returnData){ + auto itemDisplay=Component(type,"Crafting Inventory Display"); + size_t selectedIndex=itemDisplay->GetComponentIndex(Menu::menus[type]->GetSelection()); + if(selectedIndex!=itemDisplay->GetComponents().size()){ + selectedIndex++; + if(selectedIndex>=itemDisplay->GetComponents().size()){ + returnData="Back Button"; + }else{ + returnData=itemDisplay->GetComponents()[selectedIndex]; + } + }else ERR("WARNING! Could not get selected item within crafting inventory display! THIS SHOULD NOT BE HAPPENING!") + },}}, + }); } \ No newline at end of file diff --git a/Adventures in Lestoria/EnhancementStatsLabel.h b/Adventures in Lestoria/EnhancementStatsLabel.h index 9c224bd2..19618fef 100644 --- a/Adventures in Lestoria/EnhancementStatsLabel.h +++ b/Adventures in Lestoria/EnhancementStatsLabel.h @@ -55,14 +55,14 @@ protected: inline virtual void DrawDecal(ViewPort&window,bool focused)override final{ MenuComponent::DrawDecal(window,focused); vf2d adjustedScale={scale,scale}; - vf2d labelTextSize=vf2d(game->GetWrappedTextSizeProp(label,rect.size.x,adjustedScale)); + vf2d labelTextSize=vf2d(game->GetWrappedTextSizeProp(GetLabel(),rect.size.x,adjustedScale)); if(fitToLabel){ float sizeRatio=((labelTextSize*adjustedScale).x)/(rect.size.x-2); if(sizeRatio>1){ adjustedScale.x/=sizeRatio; } - labelTextSize=vf2d(game->GetTextSizeProp(label)*adjustedScale); + labelTextSize=vf2d(game->GetTextSizeProp(GetLabel())*adjustedScale); } vf2d drawPos=rect.middle()-vf2d{labelTextSize}/2; //Assume centered. diff --git a/Adventures in Lestoria/MainMenuWindow.cpp b/Adventures in Lestoria/MainMenuWindow.cpp index f090a93e..2473d3ee 100644 --- a/Adventures in Lestoria/MainMenuWindow.cpp +++ b/Adventures in Lestoria/MainMenuWindow.cpp @@ -74,7 +74,6 @@ void Menu::InitializeMainMenuWindow(){ } }, { //Button Key - {game->KEY_BACK,{"Back",[](MenuType type){}}}, {game->KEY_CONFIRM,{"Select",[](MenuType type){}}}, } ,{ //Button Navigation Rules diff --git a/Adventures in Lestoria/MenuComponent.h b/Adventures in Lestoria/MenuComponent.h index b4cc0aa6..245af043 100644 --- a/Adventures in Lestoria/MenuComponent.h +++ b/Adventures in Lestoria/MenuComponent.h @@ -96,13 +96,13 @@ private: SelectionType selectionType=CROSSHAIR; bool disableOutsideWindow=false; //If set to true, this component was automatically set to not be renderable outside the window. bool disable=false; //If set to true, this component will not be rendered or updated. + std::string label=""; protected: int depth=0; float hoverEffect=0; std::string name=""; geom2d::rectrect; vf2d originalPos; - std::string label; bool border=true; bool draggable=false; bool background=true; diff --git a/Adventures in Lestoria/MenuLabel.h b/Adventures in Lestoria/MenuLabel.h index 7bb44ffe..0de76a55 100644 --- a/Adventures in Lestoria/MenuLabel.h +++ b/Adventures in Lestoria/MenuLabel.h @@ -67,7 +67,7 @@ public: fitToLabel=attributes&ComponentAttr::FIT_TO_LABEL; } inline virtual void SetLabel(std::string text)override{ - label=text; + MenuComponent::SetLabel(text); if(runOnLabelChangeFunc)onLabelChangeFunc(text); } protected: @@ -79,14 +79,14 @@ protected: vf2d adjustedScale={scale,scale}; vf2d labelTextSize= proportional? - vf2d(game->GetWrappedTextSizeProp(label,rect.size.x-2,adjustedScale)): - vf2d(game->GetWrappedTextSize(label,rect.size.x-2,adjustedScale)); + vf2d(game->GetWrappedTextSizeProp(GetLabel(),rect.size.x-2,adjustedScale)): + vf2d(game->GetWrappedTextSize(GetLabel(),rect.size.x-2,adjustedScale)); if(fitToLabel){ labelTextSize= proportional? - vf2d(game->GetTextSizeProp(label)*adjustedScale): - vf2d(game->GetTextSize(label)*adjustedScale); + vf2d(game->GetTextSizeProp(GetLabel())*adjustedScale): + vf2d(game->GetTextSize(GetLabel())*adjustedScale); float sizeRatio=(labelTextSize.x)/(rect.size.x-2); if(sizeRatio>1){ adjustedScale.x/=sizeRatio; @@ -105,15 +105,15 @@ protected: if(shadow){ if(proportional){ - window.DrawShadowStringPropDecal(drawPos,label,WHITE,BLACK,adjustedScale,fitToLabel?std::numeric_limits::max():rect.size.x-2,1.0f); + window.DrawShadowStringPropDecal(drawPos,GetLabel(),WHITE,BLACK,adjustedScale,fitToLabel?std::numeric_limits::max():rect.size.x-2,1.0f); }else{ - window.DrawShadowStringDecal(drawPos,label,WHITE,BLACK,adjustedScale,fitToLabel?std::numeric_limits::max():rect.size.x-2,1.0f); + window.DrawShadowStringDecal(drawPos,GetLabel(),WHITE,BLACK,adjustedScale,fitToLabel?std::numeric_limits::max():rect.size.x-2,1.0f); } }else{ if(proportional){ - window.DrawStringPropDecal(drawPos,label,WHITE,adjustedScale,fitToLabel?std::numeric_limits::max():rect.size.x-2,1.0f); + window.DrawStringPropDecal(drawPos,GetLabel(),WHITE,adjustedScale,fitToLabel?std::numeric_limits::max():rect.size.x-2,1.0f); }else{ - window.DrawStringDecal(drawPos,label,WHITE,adjustedScale,fitToLabel?std::numeric_limits::max():rect.size.x-2,1.0f); + window.DrawStringDecal(drawPos,GetLabel(),WHITE,adjustedScale,fitToLabel?std::numeric_limits::max():rect.size.x-2,1.0f); } } } diff --git a/Adventures in Lestoria/MenuType.h b/Adventures in Lestoria/MenuType.h index ee97e306..2f72cbcf 100644 --- a/Adventures in Lestoria/MenuType.h +++ b/Adventures in Lestoria/MenuType.h @@ -41,7 +41,7 @@ enum MenuType{ /////////////////////////////////////////////////////////// /*DO NOT REMOVE!!*/ENUM_START,/////////////////////////////// /////////////////////////////////////////////////////////// - // 60% Controller Compatibility. (100 total items, 4 items per menu * 25 menus) + // 64% Controller Compatibility. (100 total items, 4 items per menu * 25 menus) INVENTORY_CONSUMABLES, //100% Controller Compatibility CLASS_INFO, //100% Controller Compatibility CLASS_SELECTION, //100% Controller Compatibility @@ -57,7 +57,7 @@ enum MenuType{ SELL_ITEM, //100% Controller Compatibility BLACKSMITH, //100% Controller Compatibility CRAFT_ITEM, //100% Controller Compatibility - CRAFT_CONSUMABLE, //0% Controller Compatibility + CRAFT_CONSUMABLE, //100% Controller Compatibility CONSUMABLE_CRAFT_ITEM, //0% Controller Compatibility SAVE_FILE_NAME, //100% Controller Compatibility LOAD_GAME, //75% Controller Compatibility - Online Mode Tab switching diff --git a/Adventures in Lestoria/PopupMenuLabel.h b/Adventures in Lestoria/PopupMenuLabel.h index b50e7bce..b04224a6 100644 --- a/Adventures in Lestoria/PopupMenuLabel.h +++ b/Adventures in Lestoria/PopupMenuLabel.h @@ -58,10 +58,10 @@ protected: MenuLabel::Update(game); } virtual void inline DrawDecal(ViewPort&window,bool focused)override{ - if(label.length()>0){ - vf2d drawPos=rect.middle()-vf2d{game->GetWrappedTextSizeProp(label,int(rect.size.x-1),scale)}*scale/2; //Assume centered. + if(GetLabel().length()>0){ + vf2d drawPos=rect.middle()-vf2d{game->GetWrappedTextSizeProp(GetLabel(),int(rect.size.x-1),scale)}*scale/2; //Assume centered. if(!centered){ - drawPos=vf2d{rect.pos.x+2,rect.middle().y-game->GetWrappedTextSizeProp(label,int(rect.size.x-1),scale).y/2}; //We should at least vertically align here. + drawPos=vf2d{rect.pos.x+2,rect.middle().y-game->GetWrappedTextSizeProp(GetLabel(),int(rect.size.x-1),scale).y/2}; //We should at least vertically align here. } if(background){ window.FillRectDecal(rect.pos,rect.size,PixelLerp(Menu::themes[Menu::themeSelection].GetButtonCol(),Menu::themes[Menu::themeSelection].GetHighlightCol(),hoverEffect/"ThemeGlobal.HighlightTime"_F)); @@ -70,12 +70,12 @@ protected: window.DrawRectDecal(rect.pos,rect.size); } if(showDefaultLabel){ - window.DrawStringPropDecal(rect.pos+rect.size/2-game->GetWrappedTextSizeProp(label,int(rect.size.x-1),scale)/2,label,WHITE,{1,1},int(rect.size.x-1)); + window.DrawStringPropDecal(rect.pos+rect.size/2-game->GetWrappedTextSizeProp(GetLabel(),int(rect.size.x-1),scale)/2,GetLabel(),WHITE,{1,1},int(rect.size.x-1)); } if(shadow){ - window.DrawShadowStringPropDecal(drawPos,label,WHITE,BLACK,scale,int(rect.size.x-1)); + window.DrawShadowStringPropDecal(drawPos,GetLabel(),WHITE,BLACK,scale,int(rect.size.x-1)); }else{ - window.DrawStringPropDecal(drawPos,label,WHITE,scale,int(rect.size.x-1)); + window.DrawStringPropDecal(drawPos,GetLabel(),WHITE,scale,int(rect.size.x-1)); } } } diff --git a/Adventures in Lestoria/RequiredMaterialsList.h b/Adventures in Lestoria/RequiredMaterialsList.h index e41f8f2b..dff7e599 100644 --- a/Adventures in Lestoria/RequiredMaterialsList.h +++ b/Adventures in Lestoria/RequiredMaterialsList.h @@ -59,14 +59,14 @@ protected: inline virtual void DrawDecal(ViewPort&window,bool focused)override final{ MenuComponent::DrawDecal(window,focused); vf2d adjustedScale={scale,scale}; - vf2d labelTextSize=vf2d(game->GetWrappedTextSizeProp(label,rect.size.x,adjustedScale)); + vf2d labelTextSize=vf2d(game->GetWrappedTextSizeProp(GetLabel(),rect.size.x,adjustedScale)); if(fitToLabel){ float sizeRatio=((labelTextSize*adjustedScale).x)/(rect.size.x-2); if(sizeRatio>1){ adjustedScale.x/=sizeRatio; } - labelTextSize=vf2d(game->GetTextSizeProp(label)*adjustedScale); + labelTextSize=vf2d(game->GetTextSizeProp(GetLabel())*adjustedScale); } if(itemRef.lock()->EnhancementIsPossible()){ diff --git a/Adventures in Lestoria/RowItemDisplay.h b/Adventures in Lestoria/RowItemDisplay.h index 7151bc27..8342241d 100644 --- a/Adventures in Lestoria/RowItemDisplay.h +++ b/Adventures in Lestoria/RowItemDisplay.h @@ -80,7 +80,8 @@ public: } if(locked){ - window.FillRectDecal(rect.pos+vf2d{1,1},rect.size-vf2d{1,1},BLACK); + Pixel col=PixelLerp(BLACK,VERY_DARK_GREY,hoverEffect/"ThemeGlobal.HighlightTime"_F); + window.FillRectDecal(rect.pos+vf2d{1,1},rect.size-vf2d{1,1},col); } float scaleFactor=(rect.size.y-4)/24; @@ -214,16 +215,16 @@ public: labelNameText=""; labelDescriptionText=""; } - if(hideLabelWhileLocked&&itemRef.lock()->EnhancementIsPossible()&&itemRef.lock()->CanEnhanceItem()){ + if(hideLabelWhileLocked&&itemRef.lock()->GetEnhancementInfo()[0].chapterAvailable>game->GetCurrentChapter()){ std::for_each(labelNameText.begin(),labelNameText.end(),[](char&c){if(c>='0'&&c<='z'){c='?';}}); std::for_each(labelDescriptionText.begin(),labelDescriptionText.end(),[](char&c){if(c>='0'&&c<='z'){c='?';}}); } if(itemNameLabelName!=""){ - Component(parentMenu,itemNameLabelName)->label=labelNameText; + Component(parentMenu,itemNameLabelName)->SetLabel(labelNameText); Component(parentMenu,itemNameLabelName)->Enable(); } if(itemDescriptionLabelName!=""){ - Component(parentMenu,itemDescriptionLabelName)->label=labelDescriptionText; + Component(parentMenu,itemDescriptionLabelName)->SetLabel(labelDescriptionText); Component(parentMenu,itemDescriptionLabelName)->Enable(); } } diff --git a/Adventures in Lestoria/SaveFileNameButton.h b/Adventures in Lestoria/SaveFileNameButton.h index 29247653..d15aac82 100644 --- a/Adventures in Lestoria/SaveFileNameButton.h +++ b/Adventures in Lestoria/SaveFileNameButton.h @@ -48,6 +48,6 @@ public: inline void Update(AiL*game)override{ MenuComponent::Update(game); - label=SaveFile::GetSaveFileName(); + SetLabel(std::string(SaveFile::GetSaveFileName())); } }; \ No newline at end of file diff --git a/Adventures in Lestoria/Slider.h b/Adventures in Lestoria/Slider.h index 10233435..4cae347c 100644 --- a/Adventures in Lestoria/Slider.h +++ b/Adventures in Lestoria/Slider.h @@ -112,8 +112,8 @@ public: backCol=DARK_GREY; } - vf2d labelSize=game->GetTextSizeProp(label); - window.DrawShadowStringPropDecal(vf2d{rect.pos.x-8-labelSize.x,rect.pos.y+rect.size.y/2-labelSize.y/2},label); + vf2d labelSize=game->GetTextSizeProp(GetLabel()); + window.DrawShadowStringPropDecal(vf2d{rect.pos.x-8-labelSize.x,rect.pos.y+rect.size.y/2-labelSize.y/2},GetLabel()); window.FillRectDecal(vf2d{rect.pos.x+4,rect.pos.y+rect.size.y/2-1}+vf2d{0.f,1.f},{rect.size.x-8,2},BLACK); window.FillRectDecal(vf2d{rect.pos.x+4,rect.pos.y+rect.size.y/2-1},{rect.size.x-8,2}); diff --git a/Adventures in Lestoria/TODO.txt b/Adventures in Lestoria/TODO.txt index c7c542a7..fb80b347 100644 --- a/Adventures in Lestoria/TODO.txt +++ b/Adventures in Lestoria/TODO.txt @@ -35,4 +35,6 @@ January 31st - Fullscreen toggle -- Condense stage track (loading times) \ No newline at end of file +- Condense stage track (loading times) + +- If you enter the keyboard config menu and press a controller button, it cancels the request. If you enter the controller config menu and press a keyboard/mouse button, it also cancels the request. \ No newline at end of file diff --git a/Adventures in Lestoria/TextEntryLabel.h b/Adventures in Lestoria/TextEntryLabel.h index ee8d40b3..30415fba 100644 --- a/Adventures in Lestoria/TextEntryLabel.h +++ b/Adventures in Lestoria/TextEntryLabel.h @@ -79,7 +79,7 @@ public: inline virtual void SetInput(std::string text){ game->TextEntrySetString(text); - label=text; + SetLabel(text); if(runOnLabelChangeFunc)onLabelChangeFunc(text); } diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index f33a05f3..d842ace6 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 0 #define VERSION_MINOR 3 #define VERSION_PATCH 0 -#define VERSION_BUILD 7259 +#define VERSION_BUILD 7291 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/config/audio/events.txt b/Adventures in Lestoria/assets/config/audio/events.txt index 96cf9cba..f187f8be 100644 --- a/Adventures in Lestoria/assets/config/audio/events.txt +++ b/Adventures in Lestoria/assets/config/audio/events.txt @@ -78,6 +78,11 @@ Events # Specify file names, followed by volume %. Optional min and max pitch adjustment (Defaults are 90%,110%) File[0] = item_sell.ogg, 80% } + Locked Item + { + # Specify file names, followed by volume %. Optional min and max pitch adjustment (Defaults are 90%,110%) + File[0] = lock.ogg, 100% + } Enhance Item { # Specify file names, followed by volume %. Optional min and max pitch adjustment (Defaults are 90%,110%) diff --git a/Adventures in Lestoria/assets/sounds/lock.ogg b/Adventures in Lestoria/assets/sounds/lock.ogg new file mode 100644 index 00000000..bfd2ffd4 Binary files /dev/null and b/Adventures in Lestoria/assets/sounds/lock.ogg differ diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 2b172f67..6325d5d6 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ