diff --git a/Output/CreditsRessourcesDB.sqlite b/Output/CreditsRessourcesDB.sqlite index c9bc6a2d..39bdfaca 100644 Binary files a/Output/CreditsRessourcesDB.sqlite and b/Output/CreditsRessourcesDB.sqlite differ diff --git a/Vocaluxe/Base/CDataBase.cs b/Vocaluxe/Base/CDataBase.cs index 0a55e41d..4e0f700c 100644 --- a/Vocaluxe/Base/CDataBase.cs +++ b/Vocaluxe/Base/CDataBase.cs @@ -28,6 +28,7 @@ namespace Vocaluxe.Base InitHighscoreDB(); InitCoverDB(); InitCreditsRessourcesDB(); + } #region Highscores @@ -617,12 +618,12 @@ namespace Vocaluxe.Base #endregion Cover #region CreditsRessources - public static bool GetCreditsRessource(string FileName, ref STexture tex, int MaxSize) + public static bool GetCreditsRessource(string FileName, ref STexture tex) { bool result = false; SQLiteConnection connection = new SQLiteConnection(); - connection.ConnectionString = "Data Source=" + _CoverFilePath; + connection.ConnectionString = "Data Source=" + _CreditsRessourcesFilePath; SQLiteCommand command; try { @@ -686,6 +687,7 @@ namespace Vocaluxe.Base return result; } + //If you want to add an image to db, call this method! private static bool AddImageToCreditsDB(String ImagePath) { bool result = false; @@ -751,11 +753,11 @@ namespace Vocaluxe.Base command.CommandText = "INSERT INTO Images (Path, width, height) " + "VALUES (@path, " + w.ToString() + ", " + h.ToString() + ")"; - command.Parameters.Add("@path", System.Data.DbType.String, 0).Value = ImagePath; + command.Parameters.Add("@path", System.Data.DbType.String, 0).Value = Path.GetFileName(ImagePath); command.ExecuteNonQuery(); command.CommandText = "SELECT id FROM Images WHERE [Path] = @path"; - command.Parameters.Add("@path", System.Data.DbType.String, 0).Value = ImagePath; + command.Parameters.Add("@path", System.Data.DbType.String, 0).Value = Path.GetFileName(ImagePath); reader = null; try { @@ -873,7 +875,7 @@ namespace Vocaluxe.Base command.ExecuteNonQuery(); command.CommandText = "CREATE TABLE IF NOT EXISTS ImageData ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " + - "CoverID INTEGER NOT NULL, Data BLOB NOT NULL);"; + "ImageID INTEGER NOT NULL, Data BLOB NOT NULL);"; command.ExecuteNonQuery(); command.Dispose(); diff --git a/Vocaluxe/Screens/CScreenCredits.cs b/Vocaluxe/Screens/CScreenCredits.cs index 097eb952..ae0f0410 100644 --- a/Vocaluxe/Screens/CScreenCredits.cs +++ b/Vocaluxe/Screens/CScreenCredits.cs @@ -16,6 +16,8 @@ namespace Vocaluxe.Screens // Version number for theme files. Increment it, if you've changed something on the theme files! const int ScreenVersion = 1; + private CStatic logo; + public CScreenCredits() { Init(); @@ -27,6 +29,11 @@ namespace Vocaluxe.Screens _ThemeName = "ScreenCredits"; _ScreenVersion = ScreenVersion; + + STexture tex = new STexture(); + CDataBase.GetCreditsRessource("Logo.png", ref tex); + + logo = new CStatic(tex, new SColorF(1,1,1,1), new SRectF(140,140,tex.width, tex.height, -1)); } public override bool HandleInput(KeyEvent KeyEvent) @@ -89,7 +96,8 @@ namespace Vocaluxe.Screens base.Draw(); //Draw white background - CDraw.DrawColor(new SColorF(1, 1, 1, 1), new SRectF(0, 0, 1280, 720, 1)); + CDraw.DrawColor(new SColorF(1, 1, 1, 1), new SRectF(0, 0, 1280, 720, 0)); + logo.Draw(); return true; }