Traveling Merchant Purchase Window and systems implemented.
This commit is contained in:
+3
-3
@@ -158,7 +158,7 @@ void Menu::HoverMenuSelect(Crawler*game){
|
||||
}
|
||||
|
||||
void Menu::MenuSelect(Crawler*game){
|
||||
if(selection==vi2d{-1,-1}||buttons[selection.y][selection.x]->disabled)return;
|
||||
if(selection==vi2d{-1,-1}||(buttons[selection.y][selection.x]->disabled||buttons[selection.y][selection.x]->grayedOut))return;
|
||||
bool buttonStillValid=buttons[selection.y][selection.x]->onClick(MenuFuncData{*this,game,buttons[selection.y][selection.x],(ScrollableWindowComponent*)buttons[selection.y][selection.x]->parentComponent});
|
||||
if(buttonStillValid){
|
||||
if(buttons[selection.y][selection.x]->menuDest!=MenuType::ENUM_END){
|
||||
@@ -200,7 +200,7 @@ void Menu::Update(Crawler*game){
|
||||
for(auto&[key,value]:buttons){
|
||||
int index=0;
|
||||
for(auto&button:value){
|
||||
if(!button->disabled){
|
||||
if(!button->disabled&&!button->grayedOut){
|
||||
if(button->GetHoverState(game)){
|
||||
button->hovered=true;
|
||||
itemHovered=true;
|
||||
@@ -449,7 +449,7 @@ void Menu::KeyboardButtonNavigation(Crawler*game,vf2d menuPos){
|
||||
}
|
||||
}
|
||||
if(prevSelection!=selection){
|
||||
if(selection!=vi2d{-1,-1}&&buttons[selection.y][selection.x]->disabled){
|
||||
if(selection!=vi2d{-1,-1}&&(buttons[selection.y][selection.x]->disabled||buttons[selection.y][selection.x]->grayedOut)){
|
||||
bool handled=false;
|
||||
if(!UsingMouseNavigation()){
|
||||
//Let's transfer some information about our selection being off the screen. Our intention with keyboard controls is that the screen will scroll to the correct location instead.
|
||||
|
||||
Reference in New Issue
Block a user