Implement hover out actions for item loadout window (the tech now exists!!)

pull/28/head
sigonasr2 11 months ago
parent 4c290e81aa
commit d801a41900
  1. 18
      Crawler/ItemLoadoutWindow.cpp
  2. 2
      Crawler/Version.h

@ -55,9 +55,21 @@ void Menu::InitializeItemLoadoutWindow(){
float buttonBorderPadding=64;
itemLoadoutWindow->ADD("Loadout Item 1",MenuItemItemButton)({{64,96},{48,48}},game->GetLoadoutItem(0),INVENTORY_CONSUMABLES,[](MenuFuncData data){Menu::menus.at(INVENTORY_CONSUMABLES)->I(A::LOADOUT_SLOT)=0; return true;},"Item Name Label","Item Description")END;
itemLoadoutWindow->ADD("Loadout Item 2",MenuItemItemButton)({{itemLoadoutWindowWidth/2-24,96},{48,48}},game->GetLoadoutItem(1),INVENTORY_CONSUMABLES,[](MenuFuncData data){Menu::menus.at(INVENTORY_CONSUMABLES)->I(A::LOADOUT_SLOT)=1;return true;},"Item Name Label","Item Description")END;
itemLoadoutWindow->ADD("Loadout Item 3",MenuItemItemButton)({{itemLoadoutWindowWidth-48-64,96},{48,48}},game->GetLoadoutItem(2),INVENTORY_CONSUMABLES,[](MenuFuncData data){Menu::menus.at(INVENTORY_CONSUMABLES)->I(A::LOADOUT_SLOT)=2;return true;},"Item Name Label","Item Description")END;
itemLoadoutWindow->ADD("Loadout Item 1",MenuItemItemButton)({{64,96},{48,48}},game->GetLoadoutItem(0),INVENTORY_CONSUMABLES,[](MenuFuncData data){Menu::menus.at(INVENTORY_CONSUMABLES)->I(A::LOADOUT_SLOT)=0; return true;},[](MenuFuncData data){return true;},[](MenuFuncData data){
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel("");
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel("");
return true;
},"Item Name Label","Item Description")END;
itemLoadoutWindow->ADD("Loadout Item 2",MenuItemItemButton)({{itemLoadoutWindowWidth/2-24,96},{48,48}},game->GetLoadoutItem(1),INVENTORY_CONSUMABLES,[](MenuFuncData data){Menu::menus.at(INVENTORY_CONSUMABLES)->I(A::LOADOUT_SLOT)=1;return true;},[](MenuFuncData data){return true;},[](MenuFuncData data){
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel("");
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel("");
return true;
},"Item Name Label","Item Description")END;
itemLoadoutWindow->ADD("Loadout Item 3",MenuItemItemButton)({{itemLoadoutWindowWidth-48-64,96},{48,48}},game->GetLoadoutItem(2),INVENTORY_CONSUMABLES,[](MenuFuncData data){Menu::menus.at(INVENTORY_CONSUMABLES)->I(A::LOADOUT_SLOT)=2;return true;},[](MenuFuncData data){return true;},[](MenuFuncData data){
Component<MenuLabel>(ITEM_LOADOUT,"Item Name Label")->SetLabel("");
Component<MenuLabel>(ITEM_LOADOUT,"Item Description")->SetLabel("");
return true;
},"Item Name Label","Item Description")END;
itemLoadoutWindow->ADD("Item Name Label",MenuLabel)({{0,158},{itemLoadoutWindowWidth,12}},"",1,ComponentAttr::SHADOW)END;
itemLoadoutWindow->ADD("Item Description",MenuLabel)({{0,170},{itemLoadoutWindowWidth,24}},"",1,ComponentAttr::SHADOW)END;

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 2
#define VERSION_PATCH 1
#define VERSION_BUILD 4462
#define VERSION_BUILD 4463
#define stringify(a) stringify_(a)
#define stringify_(a) #a

Loading…
Cancel
Save