Esempio n. 1
0
        public void resize_gameplay()
        {
            double s = ControlForm.sizePercent;

            for (int i = 0; i < 8; i++)
            {
                buttons[i].Height   = Convert.ToInt32((s / 100) * (game_panel.Height / 2));
                buttons[i].Width    = Convert.ToInt32((s / 100) * (game_panel.Height / 2));
                buttons[i].Location = ControlForm.calc_position(i + 1, buttons[i].Size, ControlForm.distancePercent, game_panel.Height, new Point(game_panel.Width / 2, game_panel.Height / 2));
                buttons[i].Image    = ControlForm.tiles[i].get_image(buttons[i].Size);
            }
        }
Esempio n. 2
0
 private void saveBtn_Click(object sender, EventArgs e)
 {
     if (!ControlForm.uniqueName(nameTxtBox.Text))
     {
         MessageBox.Show("Please choose a unique level name.");
     }
     else
     {
         ControlForm.saveFormName = nameTxtBox.Text;
         this.Close();
     }
 }