Esempio n. 1
0
        private CustomSelfDrawPanel.CSDImage addRow(int index, int buildingType, int amount, int resource)
        {
            int num = GFXLibrary.parishwall_tan_bar_01_short.Height + 3;

            CustomSelfDrawPanel.CSDImage image = new CustomSelfDrawPanel.CSDImage {
                Image    = (Image)GFXLibrary.parishwall_tan_bar_01_short,
                Position = new Point(10, 10 + (num * index))
            };
            CustomSelfDrawPanel.CSDLabel control = new CustomSelfDrawPanel.CSDLabel {
                Text      = VillageBuildingsData.getBuildingName(buildingType),
                Color     = ARGBColors.Black,
                Position  = new Point(10, 0),
                Size      = new Size(image.Width - 20, image.Height),
                Font      = FontManager.GetFont("Arial", 10f, FontStyle.Regular),
                Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_LEFT
            };
            image.addControl(control);
            CustomSelfDrawPanel.CSDLabel label2 = new CustomSelfDrawPanel.CSDLabel {
                Text      = amount.ToString(),
                Color     = ARGBColors.Black,
                Position  = new Point(10, 0),
                Size      = new Size(image.Width - 60, image.Height),
                Font      = FontManager.GetFont("Arial", 10f, FontStyle.Regular),
                Alignment = CustomSelfDrawPanel.CSD_Text_Alignment.CENTER_RIGHT
            };
            image.addControl(label2);
            CustomSelfDrawPanel.CSDImage image2 = new CustomSelfDrawPanel.CSDImage {
                Image    = (Image)GFXLibrary.getCommodity32Image(resource),
                Position = new Point(image.Width - 0x2d, 2)
            };
            image.addControl(image2);
            return(image);
        }
Esempio n. 2
0
 public void init(int buildingType)
 {
     this.lblBuildingType.Text = VillageBuildingsData.getBuildingName(buildingType);
     this.lblHelpText.Text     = VillageBuildingsData.getCapitalBuildingHelpText(buildingType);
 }