Fix up warnings (mostly loss of data cast warnings). When an ability gets interrupted, the key is required to be depressed before another cast attempt can be made. Added collision layer tiles to a few tiles in 1-1 due to ability to walk out-of-bounds.
This commit is contained in:
@@ -71,8 +71,8 @@ public:
|
||||
protected:
|
||||
virtual inline void RemoveButton(MenuComponent*button){
|
||||
if(button->selectable){
|
||||
std::vector<MenuComponent*>&buttonList=Menu::menus[button->parentMenu]->buttons.at(button->GetPos().y);
|
||||
std::vector<MenuComponent*>&keyboardButtonList=Menu::menus[button->parentMenu]->keyboardButtons.at(button->GetPos().y);
|
||||
std::vector<MenuComponent*>&buttonList=Menu::menus[button->parentMenu]->buttons.at(int(button->GetPos().y));
|
||||
std::vector<MenuComponent*>&keyboardButtonList=Menu::menus[button->parentMenu]->keyboardButtons.at(int(button->GetPos().y));
|
||||
size_t removedCount=0;
|
||||
removedCount+=std::erase(buttonList,button);
|
||||
removedCount+=std::erase(keyboardButtonList,button);
|
||||
@@ -80,12 +80,12 @@ protected:
|
||||
std::cout<<"WARNING! Attempted to remove buttons from button listing, but not found!";
|
||||
}
|
||||
if(buttonList.size()==0){
|
||||
if(!Menu::menus[button->parentMenu]->buttons.erase(button->GetPos().y)){
|
||||
if(!Menu::menus[button->parentMenu]->buttons.erase(int(button->GetPos().y))){
|
||||
ERR("WARNING! Attempted to erase key "<<button->GetPos().y<<" from button map, but the list still exists!")
|
||||
}
|
||||
}
|
||||
if(keyboardButtonList.size()==0){
|
||||
if(!Menu::menus[button->parentMenu]->keyboardButtons.erase(button->GetPos().y)){
|
||||
if(!Menu::menus[button->parentMenu]->keyboardButtons.erase(int(button->GetPos().y))){
|
||||
ERR("WARNING! Attempted to erase key "<<button->GetPos().y<<" from button map, but the list still exists!")
|
||||
}
|
||||
}
|
||||
@@ -100,8 +100,8 @@ protected:
|
||||
if(!button->valid){
|
||||
for(int j=i;j<components.size()-1;j++){
|
||||
//Take the item in the next slot and move it to this slot.
|
||||
Menu::menus[components[j]->parentMenu]->components.at(components[j]->name)=components[j+1];
|
||||
components[j]=components[j+1];
|
||||
Menu::menus[components[j]->parentMenu]->components.at(components[j]->name)=components[size_t(j+1)];
|
||||
components[j]=components[size_t(j+1)];
|
||||
}
|
||||
MenuComponent*lastButton=Menu::menus[components[components.size()-1]->parentMenu]->components.at(components[components.size()-1]->name);
|
||||
//Now we have to fix up the keyboard button list.
|
||||
@@ -120,8 +120,8 @@ protected:
|
||||
//We only want to refresh the inventory slots if the component count no longer matches what's actually in our inventory.
|
||||
if(components.size()<invSize){//We need more space to display our items.
|
||||
int invWidth="ThemeGlobal.InventoryWidth"_I;
|
||||
int x=(invSize-1)%invWidth;
|
||||
int y=(invSize-1)/invWidth;
|
||||
int x=int((invSize-1)%invWidth);
|
||||
int y=int((invSize-1)/invWidth);
|
||||
int itemIndex=y*invWidth+x;
|
||||
|
||||
int buttonSize="ThemeGlobal.InventoryButtonSize"_I;
|
||||
|
||||
Reference in New Issue
Block a user