v1.52 - CvPediaUnit.py class

TheLopez

Deity
Joined
Jan 16, 2006
Messages
2,525
Location
Oregon
Issue:
After adding new promotions to the game and viewing unit information in the civilopedia it is possible that a unit might have too many possible promotions leading to the possible promotion graphics to extend outside of the promotions box.

Root Cause:
I found that there is a problem with the promotions the vanilla version of the CvPediaUnit.py file. Instead of attaching the multi list control to the panel that holds the promotions it is just being added to the screen with hard coded locations and sizes resulting in promotions being placed outside of the promotions box.

Solution:
I propose that line number 313 from the CvPediaUnit.py file be changed from:
Code:
screen.addMultiListControlGFC(rowListName, "", self.X_PROMO_PANE+5, self.Y_PROMO_PANE+35, self.W_PROMO_PANE-20, self.H_PROMO_PANE-46, 1, self.PROMOTION_ICON_SIZE, self.PROMOTION_ICON_SIZE, TableStyles.TABLE_STYLE_STANDARD)

to:
Code:
screen.addMultiListControlGFC(panelName, rowListName, "", 1, self.PROMOTION_ICON_SIZE, self.PROMOTION_ICON_SIZE, TableStyles.TABLE_STYLE_STANDARD)
 
Back
Top Bottom