diff options
| author | FloppyDiskDrive <[email protected]> | 2017-10-01 09:49:14 -0500 |
|---|---|---|
| committer | FloppyDiskDrive <[email protected]> | 2017-10-01 09:49:14 -0500 |
| commit | c23e42cc396d4fc55799d659bae2149cc183dbf6 (patch) | |
| tree | 42363d4b2085946f4e6f3b38ae9b9334521a2c28 /ShiftOS.Engine/WindowManager/InfoboxTemplate.cs | |
| parent | f2ed0c673c2d3f0e021b0307a22792af66fd217d (diff) | |
| download | shiftos-rewind-c23e42cc396d4fc55799d659bae2149cc183dbf6.tar.gz shiftos-rewind-c23e42cc396d4fc55799d659bae2149cc183dbf6.tar.bz2 shiftos-rewind-c23e42cc396d4fc55799d659bae2149cc183dbf6.zip | |
Added a fuckton of changes
New infobox icons, new WIP port of Snakey, we are getting closer to a
pre-alpha!
Diffstat (limited to 'ShiftOS.Engine/WindowManager/InfoboxTemplate.cs')
| -rw-r--r-- | ShiftOS.Engine/WindowManager/InfoboxTemplate.cs | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs index a5be129..c5e49de 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs @@ -11,7 +11,7 @@ namespace ShiftOS.Engine.WindowManager Stream _str; private int _buttonChoice; private int _buttonSelected; - public InfoboxTemplate(ButtonType type) + public InfoboxTemplate(ButtonType type, ErrorIcon icon) { InitializeComponent(); @@ -34,6 +34,21 @@ namespace ShiftOS.Engine.WindowManager _buttonChoice = 3; break; } + switch (icon) + { + case ErrorIcon.Critical: + SetImage(Properties.Resources.symbolError); + break; + case ErrorIcon.Error: + SetImage(Properties.Resources.symbolWarning); + break; + case ErrorIcon.Info: + SetImage(Properties.Resources.symbolInfo); + break; + case ErrorIcon.Question: + SetImage(Properties.Resources.symbolQuestion); + break; + } } public enum ButtonType @@ -43,6 +58,13 @@ namespace ShiftOS.Engine.WindowManager Ok } + public enum ErrorIcon + { + Info, + Critical, + Error, + Question + } private void btnOpt1_Click(object sender, EventArgs e) { switch (btnOpt1.Text) @@ -82,10 +104,9 @@ namespace ShiftOS.Engine.WindowManager private void InfoboxTemplate_Load(object sender, EventArgs e) => Play(); - private void changeSize_Tick(object sender, EventArgs e) + private void SetImage(Image imageType) { - this.Height += label1.Height; - this.Width += label1.Width; + pictureBox1.Image = imageType; } } } |
