diff options
| author | lempamo <[email protected]> | 2017-02-27 16:31:55 -0500 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-02-27 16:32:29 -0500 |
| commit | 7525f0a0d08479043ab467cacd3fd18cbc2a9259 (patch) | |
| tree | 8b7f9a914f695b27f0e4d7a64a5e8d1da6a54cb2 /ShiftOS.WinForms/Applications/Snakey.cs | |
| parent | 4dbe7bd2c66394128fd9336cccf9438492fd461b (diff) | |
| download | shiftos_thereturn-7525f0a0d08479043ab467cacd3fd18cbc2a9259.tar.gz shiftos_thereturn-7525f0a0d08479043ab467cacd3fd18cbc2a9259.tar.bz2 shiftos_thereturn-7525f0a0d08479043ab467cacd3fd18cbc2a9259.zip | |
Set up grid system for snakey
Diffstat (limited to 'ShiftOS.WinForms/Applications/Snakey.cs')
| -rw-r--r-- | ShiftOS.WinForms/Applications/Snakey.cs | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/ShiftOS.WinForms/Applications/Snakey.cs b/ShiftOS.WinForms/Applications/Snakey.cs index 789a5b7..855e25e 100644 --- a/ShiftOS.WinForms/Applications/Snakey.cs +++ b/ShiftOS.WinForms/Applications/Snakey.cs @@ -17,6 +17,8 @@ namespace ShiftOS.WinForms.Applications [DefaultIcon("iconSnakey")] public partial class Snakey : UserControl, IShiftOSWindow { + private int[,] snakemap; + public Snakey() { InitializeComponent(); @@ -24,22 +26,35 @@ namespace ShiftOS.WinForms.Applications public void OnLoad() { - throw new NotImplementedException(); + makeGrid(); } - public void OnSkinLoad() + private void makeGrid() { - throw new NotImplementedException(); + for (int x = 0; x < 10; x++) + { + for (int y = 0; y < 10; y++) + { + tableLayoutPanel1.Controls.Add(newPicBox(x, y), x, y); + } + } } - public bool OnUnload() + private PictureBox newPicBox(int x, int y) { - return true; - } + PictureBox picBox = new PictureBox(); - public void OnUpgrade() - { - throw new NotImplementedException(); + picBox.Size = new System.Drawing.Size(20, 20); + picBox.Image = Properties.Resources.SnakeyBG; + picBox.Name = "pb" + x.ToString() + "b" + y.ToString(); + + return picBox; } + + public void OnSkinLoad() { } + + public bool OnUnload() { return true; } + + public void OnUpgrade() { } } } |
