public GamePanelWidget(WidgetGroup parentGroup, GamePanelStyle gamePanelStyle, float x, float y) : base(parentGroup, gamePanelStyle.Width, gamePanelStyle.Height, x, y) { float statsX = BORDER_WIDTH; float statsY = BORDER_WIDTH; // Background for the character info m_background = new ImageWidget(this, gamePanelStyle.Width, gamePanelStyle.Height, gamePanelStyle.Background, 0, 0); // Game name m_nameLabel = new LabelWidget(this, STATS_LABEL_WIDTH, STATS_LABEL_HEIGHT, statsX, statsY, "Name:"); m_nameLabel.Visible = false; m_nameText = new LabelWidget(this, STATS_LABEL_WIDTH, STATS_LABEL_HEIGHT, statsX + STATS_LABEL_WIDTH, statsY, ""); m_nameText.Visible = false; // Game Owner statsY += STATS_LABEL_HEIGHT; m_ownerLabel = new LabelWidget(this, STATS_LABEL_WIDTH, STATS_LABEL_HEIGHT, statsX, statsY, "Owner:"); m_ownerLabel.Visible = false; m_ownerText = new LabelWidget(this, STATS_LABEL_WIDTH, STATS_LABEL_HEIGHT, statsX + STATS_LABEL_WIDTH, statsY, ""); m_ownerText.Visible = false; // Characters statsY += STATS_LABEL_HEIGHT; m_charactersLabel = new LabelWidget(this, STATS_LABEL_WIDTH, STATS_LABEL_HEIGHT, statsX, statsY, "Characters:"); m_charactersLabel.Visible = false; statsY += STATS_LABEL_HEIGHT; m_charactersText = new LabelWidget(this, m_background.Width - 2 * BORDER_WIDTH, STATS_LABEL_HEIGHT, statsX, statsY, ""); m_charactersText.Visible = false; }
public GamePanelWidget(WidgetGroup parentGroup, GamePanelStyle gamePanelStyle, float x, float y) : base(parentGroup, gamePanelStyle.Width, gamePanelStyle.Height, x, y) { float statsX = BORDER_WIDTH; float statsY = BORDER_WIDTH; // Background for the character info m_background = new ImageWidget(this, gamePanelStyle.Width, gamePanelStyle.Height, gamePanelStyle.Background, 0, 0); // Game name m_nameLabel = new LabelWidget(this, STATS_LABEL_WIDTH, STATS_LABEL_HEIGHT, statsX, statsY, "Name:"); m_nameLabel.Visible = false; m_nameText = new LabelWidget(this, STATS_LABEL_WIDTH, STATS_LABEL_HEIGHT, statsX + STATS_LABEL_WIDTH, statsY, ""); m_nameText.Visible = false; // Game Owner statsY += STATS_LABEL_HEIGHT; m_ownerLabel = new LabelWidget(this, STATS_LABEL_WIDTH, STATS_LABEL_HEIGHT, statsX, statsY, "Owner:"); m_ownerLabel.Visible = false; m_ownerText = new LabelWidget(this, STATS_LABEL_WIDTH, STATS_LABEL_HEIGHT, statsX + STATS_LABEL_WIDTH, statsY, ""); m_ownerText.Visible = false; // Characters statsY += STATS_LABEL_HEIGHT; m_charactersLabel = new LabelWidget(this, STATS_LABEL_WIDTH, STATS_LABEL_HEIGHT, statsX, statsY, "Characters:"); m_charactersLabel.Visible = false; statsY += STATS_LABEL_HEIGHT; m_charactersText = new LabelWidget(this, m_background.Width - 2*BORDER_WIDTH, STATS_LABEL_HEIGHT, statsX, statsY, ""); m_charactersText.Visible = false; }