reconstructed CProfiles (preparing for async profile adding)
This commit is contained in:
1 parent
967e2eb4b1
commit
19339c6888
11 files changed
+353
-225
No files matched your search
@@ -9,28 +9,23 @@ namespace VocaluxeLib.Profile
|
||||
{
|
||||
public class CAvatar
|
||||
{
|
||||
private int _ID;
|
||||
|
||||
public int ID
|
||||
{
|
||||
get { return _ID; }
|
||||
}
|
||||
|
||||
public int ID;
|
||||
public string FileName;
|
||||
public STexture Texture;
|
||||
|
||||
public CAvatar(int ID)
|
||||
{
|
||||
_ID = ID;
|
||||
this.ID = ID;
|
||||
FileName = String.Empty;
|
||||
Texture = new STexture(-1);
|
||||
}
|
||||
|
||||
public void LoadFromFile(string NewFileName)
|
||||
public bool LoadFromFile(string NewFileName)
|
||||
{
|
||||
FileName = NewFileName;
|
||||
CBase.Drawing.RemoveTexture(ref Texture);
|
||||
Texture = CBase.Drawing.AddTexture(FileName);
|
||||
return (Texture.Index != -1);
|
||||
}
|
||||
|
||||
public void Reload()
|
||||
@@ -38,5 +33,10 @@ namespace VocaluxeLib.Profile
|
||||
CBase.Drawing.RemoveTexture(ref Texture);
|
||||
Texture = CBase.Drawing.AddTexture(FileName);
|
||||
}
|
||||
|
||||
public void Unload()
|
||||
{
|
||||
CBase.Drawing.RemoveTexture(ref Texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user