Implemented menucomponent depth property. Fixed equipment menu labels interacting with hover events.
This commit is contained in:
@@ -96,7 +96,7 @@ void Menu::InitializeCharacterMenuWindow(){
|
||||
equipSelectionSelectButton->Enable(false);
|
||||
|
||||
characterMenuWindow->AddComponent("Equip Selection Outline",equipSelectionOutline);
|
||||
characterMenuWindow->AddComponent("Equip List",equipmentList);
|
||||
characterMenuWindow->AddComponent("Equip List",equipmentList,-1);
|
||||
characterMenuWindow->AddComponent("Equip Selection Bottom Outline",equipSelectionBottomOutline);
|
||||
characterMenuWindow->AddComponent("Equip Selection Select Button",equipSelectionSelectButton);
|
||||
|
||||
@@ -185,7 +185,7 @@ void Menu::InitializeCharacterMenuWindow(){
|
||||
counter++;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
},"Item Name","Item Description");
|
||||
equip->I(Attribute::EQUIP_TYPE)=int(slot);
|
||||
if(Inventory::GetEquip(slot)==&itemInvRef){
|
||||
equip->SetSelected(true);
|
||||
@@ -200,7 +200,7 @@ void Menu::InitializeCharacterMenuWindow(){
|
||||
Component<MenuComponent>(data.component->parentMenu,"Equip Selection Select Button")->Enable(true);
|
||||
Component<CharacterRotatingDisplay>(data.component->parentMenu,"Character Rotating Display")->Enable(false);
|
||||
return true;
|
||||
},DO_NOTHING,DO_NOTHING);
|
||||
},DO_NOTHING,DO_NOTHING,"Item Name","Item Description");
|
||||
PopupMenuLabel*equipmentLabel=NEW PopupMenuLabel(CHARACTER_MENU,{{labelX,labelY},{29,16}},slotNames[i],{0.5,1},ComponentAttr::SHADOW);
|
||||
equipmentSlot->I(Attribute::EQUIP_TYPE)=int(slot);
|
||||
equipmentSlot->I(Attribute::INDEXED_THEME)=i;
|
||||
@@ -228,4 +228,11 @@ void Menu::InitializeCharacterMenuWindow(){
|
||||
MenuComponent*backButton=NEW MenuComponent(CHARACTER_MENU,{{windowSize.x/2-64,windowSize.y},{128,12}},"Back",[](MenuFuncData data){Menu::stack.pop_back();return true;});
|
||||
backButton->decal=true;
|
||||
characterMenuWindow->AddComponent("Back button",backButton);
|
||||
|
||||
MenuLabel*itemNameDisplay=NEW MenuLabel(CHARACTER_MENU,{{32,windowSize.y-32},{windowSize.x-64,12}},"",1,ComponentAttr::BACKGROUND|ComponentAttr::LEFT_ALIGN|ComponentAttr::OUTLINE|ComponentAttr::SHADOW);
|
||||
itemNameDisplay->decal=true;
|
||||
MenuLabel*itemDescriptionDisplay=NEW MenuLabel(CHARACTER_MENU,{{32,windowSize.y-20},{windowSize.x-64,32}},"",1,ComponentAttr::BACKGROUND|ComponentAttr::LEFT_ALIGN|ComponentAttr::OUTLINE|ComponentAttr::SHADOW);
|
||||
itemDescriptionDisplay->decal=true;
|
||||
characterMenuWindow->AddComponent("Item Name",itemNameDisplay);
|
||||
characterMenuWindow->AddComponent("Item Description",itemDescriptionDisplay);
|
||||
}
|
||||
Reference in New Issue
Block a user