@ -53,12 +53,12 @@ INCLUDE_GFX
void Menu : : InitializeCharacterMenuWindow ( ) {
static bool equipmentWindowOpened = false ;
vf2d windowSize = game - > GetScreenSize ( ) - vf2d { 52 , 52 } ;
vf2d windowSize = game - > GetScreenSize ( ) - vf2d { 52 , 0 } ;
Menu * characterMenuWindow = CreateMenu ( CHARACTER_MENU , CENTERED , windowSize ) ;
characterMenuWindow - > ADD ( " Character Label " , MenuLabel ) ( { { 0 , - 4 } , { float ( windowSize . x ) - 1 , 24 } } , " Character " , 2 , ComponentAttr : : SHADOW | ComponentAttr : : OUTLINE | ComponentAttr : : BACKGROUND ) END ;
characterMenuWindow - > ADD ( " Equip Slot Outline " , MenuComponent ) ( { { 0 , 28 } , { 120 , windowSize . y - 37 } } , " " , DO_NOTHING , ButtonAttr : : UNSELECTABLE ) END ;
characterMenuWindow - > ADD ( " Character Rotating Display " , CharacterRotatingDisplay ) ( { { 135 , 28 } , { 90 , windowSize . y - 37 } } , GFX [ classutils : : GetClassInfo ( game - > GetPlayer ( ) - > GetClassName ( ) ) . classFullImgName ] . Decal ( ) ) END ;
characterMenuWindow - > ADD ( " Character Label " , MenuLabel ) ( { { 0 , 2 } , { float ( windowSize . x ) - 1 , 24 } } , " Character " , 2 , ComponentAttr : : SHADOW | ComponentAttr : : OUTLINE | ComponentAttr : : BACKGROUND ) END ;
characterMenuWindow - > ADD ( " Equip Slot Outline " , MenuComponent ) ( { { 0 , 28 } , { 120 , windowSize . y - 48 } } , " " , DO_NOTHING , ButtonAttr : : UNSELECTABLE ) END ;
characterMenuWindow - > ADD ( " Character Rotating Display " , CharacterRotatingDisplay ) ( { { 135 , 28 } , { 90 , windowSize . y - 48 } } , GFX [ classutils : : GetClassInfo ( game - > GetPlayer ( ) - > GetClassName ( ) ) . classFullImgName ] . Decal ( ) ) END ;
const static std : : array < ItemAttribute , 7 > displayAttrs {
ItemAttribute : : health ,
@ -71,13 +71,13 @@ void Menu::InitializeCharacterMenuWindow(){
} ;
characterMenuWindow - > ADD ( " Equip Selection Outline " , MenuComponent ) ( { { 123 , 28 } , { 120 , windowSize . y - 37 } } , " " , DO_NOTHING , ButtonAttr : : UNSELECTABLE ) END
characterMenuWindow - > ADD ( " Equip Selection Outline " , MenuComponent ) ( { { 123 , 28 } , { 120 , windowSize . y - 48 } } , " " , DO_NOTHING , ButtonAttr : : UNSELECTABLE ) END
- > Enable ( false ) ;
characterMenuWindow - > ADD ( " Equip List " , ScrollableWindowComponent ) ( { { 123 , 28 } , { 120 , windowSize . y - 37 - 24 } } ) DEPTH - 1 END
characterMenuWindow - > ADD ( " Equip List " , ScrollableWindowComponent ) ( { { 123 , 28 } , { 120 , windowSize . y - 48 - 24 } } ) DEPTH - 1 END
- > Enable ( false ) ;
characterMenuWindow - > ADD ( " Equip Selection Bottom Outline " , MenuComponent ) ( { { 123 , 28 + ( windowSize . y - 37 - 24 ) } , { 120 , 24 } } , " " , DO_NOTHING , ButtonAttr : : UNSELECTABLE ) END
characterMenuWindow - > ADD ( " Equip Selection Bottom Outline " , MenuComponent ) ( { { 123 , 28 + ( windowSize . y - 48 - 24 ) } , { 120 , 24 } } , " " , DO_NOTHING , ButtonAttr : : UNSELECTABLE ) END
- > Enable ( false ) ;
auto equipSelectionSelectButton = characterMenuWindow - > ADD ( " Equip Selection Select Button " , MenuComponent ) ( { { 123 + 12 , 28 + ( windowSize . y - 37 - 24 ) + 6 } , { 96 , 12 } } , " Select " ,
auto equipSelectionSelectButton = characterMenuWindow - > ADD ( " Equip Selection Select Button " , MenuComponent ) ( { { 123 + 12 , 28 + ( windowSize . y - 48 - 24 ) + 6 } , { 96 , 12 } } , " Select " ,
[ ] ( MenuFuncData data ) {
Component < MenuComponent > ( data . component - > parentMenu , " Equip Selection Outline " ) - > Enable ( false ) ;
Component < ScrollableWindowComponent > ( data . component - > parentMenu , " Equip List " ) - > Enable ( false ) ;
@ -218,7 +218,7 @@ void Menu::InitializeCharacterMenuWindow(){
Menu : : AddEquipStatListener ( equipmentSlot ) ;
}
characterMenuWindow - > ADD ( " Stat Display Outline " , MenuComponent ) ( { { 245 , 28 } , { 62 , windowSize . y - 37 } } , " " , DO_NOTHING , ButtonAttr : : UNSELECTABLE ) END ;
characterMenuWindow - > ADD ( " Stat Display Outline " , MenuComponent ) ( { { 245 , 28 } , { 62 , windowSize . y - 48 } } , " " , DO_NOTHING , ButtonAttr : : UNSELECTABLE ) END ;
int yOffset = 0 ;
for ( ItemAttribute attribute : displayAttrs ) {
@ -229,13 +229,15 @@ void Menu::InitializeCharacterMenuWindow(){
yOffset + = 20 ;
}
characterMenuWindow - > ADD ( " Back button " , MenuComponent ) ( { { windowSize . x / 2 - 64 , windowSize . y } , { 128 , 12 } } , " Back " , [ ] ( MenuFuncData data ) { Menu : : stack . pop_back ( ) ; return true ; } ) END ;
characterMenuWindow - > ADD ( " Back button " , MenuComponent ) ( { { windowSize . x / 2 - 64 , windowSize . y - 16 } , { 128 , 12 } } , " Back " , [ ] ( MenuFuncData data ) { Menu : : stack . pop_back ( ) ; return true ; } ) END ;
auto itemNameDisplay = characterMenuWindow - > ADD ( " Item Name " , MenuLabel ) ( { { 0 , 28 } , { 120 , 12 } } , " " , 1 , ComponentAttr : : BACKGROUND | ComponentAttr : : LEFT_ALIGN | ComponentAttr : : OUTLINE | ComponentAttr : : SHADOW ) END ;
auto itemDescriptionDisplay = characterMenuWindow - > ADD ( " Item Description " , MenuLabel ) ( { { 0 , 40 } , { 120 , windowSize . y - 49 } } , " " , 1 , ComponentAttr : : BACKGROUND | ComponentAttr : : LEFT_ALIGN | ComponentAttr : : OUTLINE | ComponentAttr : : SHADOW ) END ;
characterMenuWindow - > ADD ( " Item Equip Name " , MenuLabel ) ( { { 123 , 28 } , { 120 , 12 } } , " " , 1 , ComponentAttr : : BACKGROUND | ComponentAttr : : LEFT_ALIGN | ComponentAttr : : OUTLINE | ComponentAttr : : SHADOW ) END ;
characterMenuWindow - > ADD ( " Item Equip Description " , MenuLabel ) ( { { 123 , 40 } , { 120 , windowSize . y - 49 } } , " " , 1 , ComponentAttr : : BACKGROUND | ComponentAttr : : LEFT_ALIGN | ComponentAttr : : OUTLINE | ComponentAttr : : SHADOW ) END ;
auto itemDescriptionDisplay = characterMenuWindow - > ADD ( " Item Description " , MenuLabel ) ( { { 0 , 40 } , { 120 , windowSize . y - 60 } } , " " , 1 , ComponentAttr : : BACKGROUND | ComponentAttr : : LEFT_ALIGN | ComponentAttr : : OUTLINE | ComponentAttr : : SHADOW ) END ;
auto itemEquipNameDisplay = characterMenuWindow - > ADD ( " Item Equip Name " , MenuLabel ) ( { { 123 , 28 } , { 120 , 12 } } , " " , 1 , ComponentAttr : : BACKGROUND | ComponentAttr : : LEFT_ALIGN | ComponentAttr : : OUTLINE | ComponentAttr : : SHADOW ) END ;
auto itemEquipDescriptionDisplay = characterMenuWindow - > ADD ( " Item Equip Description " , MenuLabel ) ( { { 123 , 40 } , { 120 , windowSize . y - 60 } } , " " , 1 , ComponentAttr : : BACKGROUND | ComponentAttr : : LEFT_ALIGN | ComponentAttr : : OUTLINE | ComponentAttr : : SHADOW ) END ;
itemNameDisplay - > Enable ( false ) ;
itemDescriptionDisplay - > Enable ( false ) ;
itemEquipNameDisplay - > Enable ( false ) ;
itemEquipDescriptionDisplay - > Enable ( false ) ;
}