mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Settings / SettingsWindow
This commit is contained in:
@@ -25,6 +25,8 @@ namespace GlitchyEngine.Content
|
||||
|
||||
interface IContentManager
|
||||
{
|
||||
void GetFilePath(String outFilename, String filename);
|
||||
|
||||
Stream GetFile(String filename);
|
||||
}
|
||||
|
||||
@@ -41,10 +43,15 @@ namespace GlitchyEngine.Content
|
||||
Runtime.Assert(Directory.Exists(contentRoot), "Content root directory doesn't exist.");
|
||||
}
|
||||
|
||||
public void GetFilePath(String outFilename, String filename)
|
||||
{
|
||||
Path.InternalCombine(outFilename, _contentRoot, filename);
|
||||
}
|
||||
|
||||
public Stream GetFile(String filename)
|
||||
{
|
||||
String fullpath = scope .(_contentRoot.Length + 1 + filename.Length);
|
||||
Path.InternalCombine(fullpath, _contentRoot, filename);
|
||||
GetFilePath(fullpath, filename);
|
||||
|
||||
FileStream stream = new FileStream();
|
||||
var result = stream.Open(fullpath, .Read, .Read);
|
||||
|
||||
Reference in New Issue
Block a user