Sorting of AddIns implemented.
This commit is contained in:
parent
571ae26707
commit
95b2968294
@ -8,6 +8,7 @@ using ANX.Framework.Input;
|
||||
using NLog;
|
||||
using System.Collections;
|
||||
using System.Resources;
|
||||
using System.Xml.Linq;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
@ -152,9 +153,7 @@ namespace ANX.Framework.NonXNA
|
||||
}
|
||||
}
|
||||
|
||||
this.inputSystems.Sort();
|
||||
this.renderSystems.Sort();
|
||||
this.soundSystems.Sort();
|
||||
SortAddIns();
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,6 +290,15 @@ namespace ANX.Framework.NonXNA
|
||||
throw new AddInLoadingException(String.Format("couldn't find a DefaultCreator of type '{0}'", type.FullName));
|
||||
}
|
||||
|
||||
public void SortAddIns()
|
||||
{
|
||||
this.inputSystems.Sort();
|
||||
this.renderSystems.Sort();
|
||||
this.soundSystems.Sort();
|
||||
|
||||
this.creators = this.creators.OrderBy(x => x.Value.Priority).ToDictionary(x => x.Key, x => x.Value);
|
||||
}
|
||||
|
||||
public OperatingSystem OperatingSystem
|
||||
{
|
||||
get
|
||||
|
@ -71,7 +71,7 @@ namespace ANX.RenderSystem.Windows.DX11
|
||||
|
||||
public int Priority
|
||||
{
|
||||
get { return 5; }
|
||||
get { return 15; }
|
||||
}
|
||||
|
||||
public bool IsSupported
|
||||
|
@ -22,6 +22,8 @@ namespace WindowsGame1
|
||||
|
||||
private void AddInSelector_Load(object sender, EventArgs e)
|
||||
{
|
||||
AddInSystemFactory.Instance.SortAddIns();
|
||||
|
||||
foreach (IRenderSystemCreator renderSystemCreator in AddInSystemFactory.Instance.GetCreators<IRenderSystemCreator>())
|
||||
{
|
||||
cbRenderSystem.Items.Add(renderSystemCreator.Name);
|
||||
|
@ -73,7 +73,7 @@ namespace ANX.SoundSystem.OpenAL
|
||||
|
||||
public int Priority
|
||||
{
|
||||
get { return 10; }
|
||||
get { return 100; }
|
||||
}
|
||||
|
||||
public bool IsSupported
|
||||
|
Loading…
x
Reference in New Issue
Block a user