mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-01-22 18:02:16 +00:00
Fix some crashes and UI bugs
Audio manager crashed after loading a second song Color Picker and ArtPad palette entries were not appearing properly. Fonts in Shifter could not have decimal sizes.
This commit is contained in:
parent
11f838ea23
commit
90802ccb55
4 changed files with 25 additions and 5 deletions
|
@ -54,6 +54,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
try
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1851,7 +1852,11 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
public void OnLoad()
|
||||
{
|
||||
|
||||
foreach (Control ctrl in flowcolours.Controls)
|
||||
{
|
||||
ctrl.Tag = "keepbg";
|
||||
ctrl.BackColor = Color.Black;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnSkinLoad()
|
||||
|
|
|
@ -62,54 +62,65 @@ namespace ShiftOS.WinForms.Applications
|
|||
foreach (Control ctrl in pnlanycolours.Controls)
|
||||
{
|
||||
ctrl.MouseDown += new MouseEventHandler(this.colourselctionany);
|
||||
ctrl.Tag = "keepbg";
|
||||
}
|
||||
foreach (Control ctrl in pnlgraycolours.Controls)
|
||||
{
|
||||
ctrl.Tag = "keepbg";
|
||||
ctrl.MouseDown += new MouseEventHandler(this.colourselctiongray);
|
||||
}
|
||||
|
||||
foreach (Control ctrl in pnlredcolours.Controls)
|
||||
{
|
||||
ctrl.Tag = "keepbg";
|
||||
ctrl.MouseDown += new MouseEventHandler(this.colourselctionred);
|
||||
}
|
||||
|
||||
foreach (Control ctrl in pnlgreencolours.Controls)
|
||||
{
|
||||
ctrl.Tag = "keepbg";
|
||||
ctrl.MouseDown += new MouseEventHandler(this.colourselctiongreen);
|
||||
}
|
||||
|
||||
foreach (Control ctrl in pnlbluecolours.Controls)
|
||||
{
|
||||
ctrl.Tag = "keepbg";
|
||||
ctrl.MouseDown += new MouseEventHandler(this.colourselctionblue);
|
||||
}
|
||||
|
||||
foreach (Control ctrl in pnlorangecolours.Controls)
|
||||
{
|
||||
ctrl.Tag = "keepbg";
|
||||
ctrl.MouseDown += new MouseEventHandler(this.colourselctionorange);
|
||||
}
|
||||
|
||||
foreach (Control ctrl in pnlyellowcolours.Controls)
|
||||
{
|
||||
ctrl.Tag = "keepbg";
|
||||
ctrl.MouseDown += new MouseEventHandler(this.colourselctionyellow);
|
||||
}
|
||||
|
||||
foreach (Control ctrl in pnlbrowncolours.Controls)
|
||||
{
|
||||
ctrl.Tag = "keepbg";
|
||||
ctrl.MouseDown += new MouseEventHandler(this.colourselctionbrown);
|
||||
}
|
||||
|
||||
foreach (Control ctrl in pnlpurplecolours.Controls)
|
||||
{
|
||||
ctrl.Tag = "keepbg";
|
||||
ctrl.MouseDown += new MouseEventHandler(this.colourselctionpurple);
|
||||
}
|
||||
|
||||
foreach (Control ctrl in pnlpinkcolours.Controls)
|
||||
{
|
||||
ctrl.Tag = "keepbg";
|
||||
ctrl.MouseDown += new MouseEventHandler(this.colourselctionpink);
|
||||
}
|
||||
|
||||
pnloldcolour.Tag = "keepbg";
|
||||
pnloldcolour.Click += new EventHandler(pnloldcolour_Click);
|
||||
pnlnewcolour.Click += new EventHandler(pnlnewcolour_Click);
|
||||
pnlnewcolour.Tag = "keepbg";
|
||||
}
|
||||
|
||||
public int anylevel = 0;
|
||||
|
|
|
@ -379,7 +379,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
var f = en[style.SelectedIndex];
|
||||
|
||||
c.Field.SetValue(LoadedSkin, new Font(name.Text, (float)Convert.ToInt32(size.Text), f));
|
||||
c.Field.SetValue(LoadedSkin, new Font(name.Text, (float)Convert.ToDouble(size.Text), f));
|
||||
CodepointValue += 100;
|
||||
};
|
||||
|
||||
|
@ -389,7 +389,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
var f = en[style.SelectedIndex];
|
||||
|
||||
c.Field.SetValue(LoadedSkin, new Font(name.Text, (float)Convert.ToInt32(size.Text), f));
|
||||
c.Field.SetValue(LoadedSkin, new Font(name.Text, (float)Convert.ToDouble(size.Text), f));
|
||||
CodepointValue += 50;
|
||||
};
|
||||
|
||||
|
@ -401,7 +401,7 @@ namespace ShiftOS.WinForms.Applications
|
|||
|
||||
var f = en[style.SelectedIndex];
|
||||
|
||||
c.Field.SetValue(LoadedSkin, new Font(name.Text, (float)Convert.ToInt32(size.Text), f));
|
||||
c.Field.SetValue(LoadedSkin, new Font(name.Text, (float)Convert.ToDouble(size.Text), f));
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
@ -45,6 +45,8 @@ namespace ShiftOS.Engine
|
|||
{
|
||||
Thread.Sleep(5000); //even when the player isn't playing, this will give a good delay between songs.
|
||||
}
|
||||
_reader.Dispose();
|
||||
_out.Dispose();
|
||||
}
|
||||
});
|
||||
t.IsBackground = true;
|
||||
|
@ -56,6 +58,8 @@ namespace ShiftOS.Engine
|
|||
_provider.Volume = volume; //persist between songs
|
||||
_out.Volume = volume;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public interface IAudioProvider
|
||||
|
|
Loading…
Reference in a new issue