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

pull/29/head
sigonasr2 1 year ago
parent 15ea25fe71
commit 3e1227a899
  1. 3
      .gitignore
  2. 2
      Adventures in Lestoria/BlacksmithCraftingWindow.cpp
  3. 2
      Adventures in Lestoria/ConsumableCraftingWindow.cpp
  4. 2
      Adventures in Lestoria/InventoryWindow.cpp
  5. 2
      Adventures in Lestoria/Item.cpp
  6. 2
      Adventures in Lestoria/MerchantWindow.cpp
  7. 6
      Adventures in Lestoria/Player.h
  8. 2
      Adventures in Lestoria/PlayerMoneyLabel.h
  9. 2
      Adventures in Lestoria/TODO.txt
  10. 2
      Adventures in Lestoria/Version.h
  11. 4
      Adventures in Lestoria/assets/config/configuration.txt
  12. BIN
      x64/Release/Adventures in Lestoria.exe

3
.gitignore vendored

@ -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

@ -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

@ -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()){

@ -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

@ -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{

@ -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;
}

@ -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
============

@ -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

Loading…
Cancel
Save