}; //help menu text private void Form1_Load(object sender, EventArgs e) { trinity.name = name;//sets username #region "ch" //Cheat part if (new string[] { "ChuckNorris", "chucknorris", "Chuck Norris" }.Contains(trinity.name)) { trinity.bonus = 32000; trinity.name = "☠☠☠"; } #endregion #region "Fullscreen" //Full screen setup this.FormBorderStyle = FormBorderStyle.None; //Form Has no borders this.Location = Screen.PrimaryScreen.WorkingArea.Location; //Full screen this.Size = Screen.PrimaryScreen.WorkingArea.Size; //Position of windows(fullscreen fix) #endregion #region "Calculations" c_size = Convert.ToInt16((((this.Height - menu_height) * 0.1) / 2)); //5% of screen size grad = (short)((((this.Height - menu_height) / 2) / (decimal)this.Width) * 100000); //gradient of 50%height tfow = (short)((this.Width / 5) * 3); //Three Fifth of Width main_radius = (Int16)((this.Height - menu_height) / 2); #endregion this.KeyDown += new KeyEventHandler(keypress); //handler for keydown this.FormClosed += new FormClosedEventHandler(formclosed); //handler for form close. Bug fix, with closing form but not app #region "close_button" //setting closing button in the right top corner Label close_btn = new Label { Name = "close_button", Text = "X", Visible = true, ForeColor = Color.White, Font = new Font(Font.FontFamily, 10), Location = new Point(this.Width - 15, 0) }; this.Controls.Add(close_btn); close_btn.Click += new EventHandler(this.close_button); #endregion #region "GUI Init" //Initializing GUI, and sets variables trinity.delta_coord = new Point(this.Width - trinity.trioRec.Width - 10, trinity.delta_coord.Y);//position player. for (short i = 0; i < 3; i++) { menus_ell[i] = new Menu_Ell(); menus_ell[i].delta_txt = menus[Convert.ToInt32(i)]; menus_ell[i].delta_loc = new Point(get_coords((short)(2 * i + 1)).X + this.Width / 5, get_coords((short)(2 * i + 1)).Y); } for (short i = 0; i < 5; i++) { levels_ell[i] = new Menu_Ell(); levels_ell[i].delta_font_size = 40; levels_ell[i].delta_txt = Convert.ToString(i + 1); levels_ell[i].delta_loc = get_coords((short)(i + 1)); levels_ell[i].gen_colour(i); } wt_draw = "menu"; #endregion }
private void Form1_Load(object sender, EventArgs e) { trinity.name = name;//sets username #region "ch" //Cheat part if (new string[] { "ChuckNorris", "chucknorris", "Chuck Norris" }.Contains(trinity.name)) { trinity.bonus = 32000; trinity.name = "☠☠☠"; } #endregion #region "Fullscreen" //Full screen setup this.FormBorderStyle = FormBorderStyle.None;//Form Has no borders this.Location = Screen.PrimaryScreen.WorkingArea.Location;//Full screen this.Size = Screen.PrimaryScreen.WorkingArea.Size;//Position of windows(fullscreen fix) #endregion #region "Calculations" c_size = Convert.ToInt16((((this.Height - menu_height) * 0.1)/2));//5% of screen size grad = (short)((((this.Height - menu_height) / 2) / (decimal)this.Width) * 100000); //gradient of 50%height tfow = (short)((this.Width / 5) * 3);//Three Fifth of Width main_radius = (Int16)((this.Height - menu_height) / 2); #endregion this.KeyDown += new KeyEventHandler(keypress);//handler for keydown this.FormClosed += new FormClosedEventHandler(formclosed);//handler for form close. Bug fix, with closing form but not app #region "close_button" //setting closing button in the right top corner Label close_btn = new Label { Name = "close_button", Text = "X", Visible = true, ForeColor = Color.White, Font = new Font(Font.FontFamily, 10), Location = new Point(this.Width - 15, 0) }; this.Controls.Add(close_btn); close_btn.Click += new EventHandler(this.close_button); #endregion #region "GUI Init" //Initializing GUI, and sets variables trinity.delta_coord = new Point(this.Width - trinity.trioRec.Width - 10, trinity.delta_coord.Y);//position player. for (short i = 0; i < 3; i++) { menus_ell[i] = new Menu_Ell(); menus_ell[i].delta_txt = menus[Convert.ToInt32(i)]; menus_ell[i].delta_loc = new Point(get_coords((short)(2 * i + 1)).X + this.Width / 5, get_coords((short)(2 * i + 1)).Y); } for (short i = 0; i < 5; i++){ levels_ell[i] = new Menu_Ell(); levels_ell[i].delta_font_size = 40; levels_ell[i].delta_txt = Convert.ToString(i + 1); levels_ell[i].delta_loc = get_coords((short)(i + 1)); levels_ell[i].gen_colour(i); } wt_draw = "menu"; #endregion }