Added wrapping menu macro functionality. Implemented controller compatibility for level complete window. Added right alignment for menu labels. Added ProgressBar component. Added XP-related functions for callbacks to other components in-game. Fix giant normalized vector issue with Wolf AI script. Release Build 7041.
This commit is contained in:
@@ -169,7 +169,6 @@ void Menu::InitializeConsumableInventoryWindow(){
|
||||
int newRowIndex=selectedButton.lock()->inventoryIndex-invWidth; /*Moving up moves the cursor up an entire row.*/ \
|
||||
if(newRowIndex<0){
|
||||
#define DefaultBehavior \
|
||||
return; \
|
||||
} \
|
||||
if(newRowIndex<0||newRowIndex>=itemsList.size())ERR(std::format("New Row Index ended up out-of-bounds! newRowIndex={}. THIS SHOULD NOT BE HAPPENING!",newRowIndex)); \
|
||||
/*Select the component that matches this new number.*/ \
|
||||
@@ -292,7 +291,8 @@ void Menu::InitializeConsumableInventoryWindow(){
|
||||
std::weak_ptr<SUBCLASS>selectedButton=DYNAMIC_POINTER_CAST<SUBCLASS>(*component); \
|
||||
int rowBaseIndex=(selectedButton.lock()->inventoryIndex/invWidth)*invWidth; \
|
||||
int newRowIndex=selectedButton.lock()->inventoryIndex+1; \
|
||||
if(newRowIndex>rowBaseIndex+invWidth-1)
|
||||
int newRowBaseIndex = (newRowIndex / invWidth) * invWidth; \
|
||||
if(rowBaseIndex!=newRowBaseIndex||newRowIndex>=itemsList.size())
|
||||
#define DefaultBehavior \
|
||||
newRowIndex=std::clamp(newRowIndex,0,int(itemsList.size()-1)); \
|
||||
newRowIndex=std::min(int(itemsList.size())-1,newRowIndex); \
|
||||
@@ -303,7 +303,9 @@ void Menu::InitializeConsumableInventoryWindow(){
|
||||
returnData=*component; \
|
||||
} \
|
||||
}else
|
||||
#define DEFAULT_WRAPPING_BEHAVIOR newRowIndex-=invWidth;
|
||||
#define DEFAULT_WRAPPING_BEHAVIOR \
|
||||
int rowBaseIndex=(selectedButton.lock()->inventoryIndex/invWidth)*invWidth; \
|
||||
newRowIndex=rowBaseIndex;
|
||||
#pragma endregion
|
||||
#define SUBCLASS MenuItemButton
|
||||
DetectInventory(InventoryScrollableWindowComponent,type,"inventory")
|
||||
|
||||
Reference in New Issue
Block a user