Fix bugs with money display in menus. Fix cooldown time value not being set properly while items are being loaded. Release Build 5395.

This commit is contained in:
2024-01-06 05:47:04 -06:00
parent 15ea25fe71
commit 3e1227a899
12 changed files with 16 additions and 13 deletions
+2 -1
View File
@@ -381,4 +381,5 @@ Crawler/out
/Adventures in Lestoria/.vscode
/Adventures in Lestoria/.vscode/settings.json
/Adventures in Lestoria/x64
/Adventures in Lestoria/saves
/Adventures in Lestoria/saves
/Adventures in Lestoria/assets/tmpsaves
@@ -172,7 +172,7 @@ void Menu::InitializeBlacksmithCraftingWindow(){
auto moneyIcon=blacksmithWindow->ADD("Money Icon",MenuIconButton)({moneyIconPos,{24,24}},GFX["money.png"].Decal(),DO_NOTHING,IconButtonAttr::NOT_SELECTABLE|IconButtonAttr::NO_OUTLINE|IconButtonAttr::NO_BACKGROUND)END;
std::string moneyText=std::to_string(game->GetPlayer()->GetMoney());
vf2d moneyTextSize=game->GetTextSizeProp(moneyText)*2;
auto moneyDisplay=blacksmithWindow->ADD("Money Label",PlayerMoneyLabel)({moneyIconPos-vf2d{2+moneyTextSize.x,-2},moneyTextSize},2,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN)END;
auto moneyDisplay=blacksmithWindow->ADD("Money Label",PlayerMoneyLabel)({moneyIconPos-vf2d{2+moneyTextSize.x,-2},moneyTextSize},2,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN|ComponentAttr::FIT_TO_LABEL)END;
moneyDisplay->SetRightAlignment(true);
Player::AddMoneyListener(moneyDisplay);
#pragma endregion
@@ -123,7 +123,7 @@ void Menu::InitializeConsumableCraftingWindow(){
auto moneyIcon=consumableCraftingWindow->ADD("Money Icon",MenuIconButton)({moneyIconPos,{24,24}},GFX["money.png"].Decal(),DO_NOTHING,IconButtonAttr::NOT_SELECTABLE|IconButtonAttr::NO_OUTLINE|IconButtonAttr::NO_BACKGROUND)END;
std::string moneyText=std::to_string(game->GetPlayer()->GetMoney());
vf2d moneyTextSize=game->GetTextSizeProp(moneyText)*2;
auto moneyDisplay=consumableCraftingWindow->ADD("Money Label",PlayerMoneyLabel)({moneyIconPos-vf2d{2+moneyTextSize.x,-2},moneyTextSize},2,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN)END;
auto moneyDisplay=consumableCraftingWindow->ADD("Money Label",PlayerMoneyLabel)({moneyIconPos-vf2d{2+moneyTextSize.x,-2},moneyTextSize},2,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN|ComponentAttr::FIT_TO_LABEL)END;
moneyDisplay->SetRightAlignment(true);
Player::AddMoneyListener(moneyDisplay);
#pragma endregion
+1 -1
View File
@@ -127,7 +127,7 @@ void Menu::InitializeInventoryWindow(){
auto moneyIcon=inventoryWindow->ADD("Money Icon",MenuIconButton)({moneyIconPos,{24,24}},GFX["money.png"].Decal(),DO_NOTHING,IconButtonAttr::NOT_SELECTABLE|IconButtonAttr::NO_OUTLINE|IconButtonAttr::NO_BACKGROUND)END;
std::string moneyText=std::to_string(game->GetPlayer()->GetMoney());
vf2d moneyTextSize=game->GetTextSizeProp(moneyText)*2;
auto moneyDisplay=inventoryWindow->ADD("Money Label",PlayerMoneyLabel)({moneyIconPos-vf2d{2+moneyTextSize.x,-2},moneyTextSize},2,SHADOW|LEFT_ALIGN)END;
auto moneyDisplay=inventoryWindow->ADD("Money Label",PlayerMoneyLabel)({moneyIconPos-vf2d{2+moneyTextSize.x,-2},moneyTextSize},2,SHADOW|LEFT_ALIGN|FIT_TO_LABEL)END;
moneyDisplay->SetRightAlignment(true);
Player::AddMoneyListener(moneyDisplay);
#pragma endregion
+1 -1
View File
@@ -124,7 +124,7 @@ void ItemInfo::InitializeItems(){
castTime=float(data[key][keyName].GetReal());
}else
if(keyName=="Cooldown Time"){
castTime=float(data[key][keyName].GetReal());
cooldownTime=float(data[key][keyName].GetReal());
}else
if(keyName=="Slot"){
for(auto&val:data[key][keyName].GetValues()){
+1 -1
View File
@@ -209,7 +209,7 @@ void Menu::InitializeMerchantWindow(){
auto moneyIcon=merchantWindow->ADD("Money Icon",MenuIconButton)({moneyIconPos,{24,24}},GFX["money.png"].Decal(),DO_NOTHING,IconButtonAttr::NOT_SELECTABLE|IconButtonAttr::NO_OUTLINE|IconButtonAttr::NO_BACKGROUND)END;
std::string moneyText=std::to_string(game->GetPlayer()->GetMoney());
vf2d moneyTextSize=game->GetTextSizeProp(moneyText)*2;
auto moneyDisplay=merchantWindow->ADD("Money Label",PlayerMoneyLabel)({moneyIconPos-vf2d{2+moneyTextSize.x,-2},moneyTextSize},2,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN)END;
auto moneyDisplay=merchantWindow->ADD("Money Label",PlayerMoneyLabel)({moneyIconPos-vf2d{2+moneyTextSize.x,-2},moneyTextSize},2,ComponentAttr::SHADOW|ComponentAttr::LEFT_ALIGN|ComponentAttr::FIT_TO_LABEL)END;
moneyDisplay->SetRightAlignment(true);
Player::AddMoneyListener(moneyDisplay);
#pragma endregion
+3 -3
View File
@@ -56,9 +56,9 @@ class MenuComponent;
struct CastInfo{
std::string name="???";
float castTimer;
float castTotalTime;
vf2d castPos;
float castTimer=0.f;
float castTotalTime=0.f;
vf2d castPos{};
};
class EntityStats{
+1 -1
View File
@@ -51,7 +51,7 @@ public:
inline virtual void OnPlayerMoneyUpdate(uint32_t newMoney)final{
SetLabel(std::to_string(newMoney));
std::string moneyText=std::to_string(newMoney);
vf2d moneyTextSize=game->GetTextSizeProp(moneyText)*scale;
vf2d moneyTextSize=game->GetTextSizeProp(moneyText)*scale;
rect.pos.x=anchorPointX-moneyTextSize.x;
rect.size=moneyTextSize;
}
+2
View File
@@ -20,6 +20,8 @@ Settings Menu
remove that bind from the list. Up to two keys may be binded per action.
-We have to save keybinds to the save file.
-Smooth Movement
-Click on title screen should not process as input immediately.
-Investigate why frame rate matters for intro screen.
January 31st
============
+1 -1
View File
@@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 2
#define VERSION_PATCH 1
#define VERSION_BUILD 5389
#define VERSION_BUILD 5395
#define stringify(a) stringify_(a)
#define stringify_(a) #a
@@ -14,8 +14,8 @@ Interface
9PatchSize = 24,24
}
# Save File Server Name
save_server = http://projectdivar.com/AiL
# Save File Server Name
save_server = https://projectdivar.com:4505/AiL
# Map Files Loading Config
map_config = levels.txt
Binary file not shown.