Settings / SettingsWindow

This commit is contained in:
Simon Lübeß
2022-04-10 13:12:09 +02:00
parent bca72cf0d4
commit bec202e23a
12 changed files with 438 additions and 6 deletions
+8 -1
View File
@@ -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);