Initial changes to GUI sprite code. (There shouldn't be any visible effects - if there are, they're bugs)

This was SVN commit r1507.
This commit is contained in:
Ykkrosh
2004-12-15 21:24:46 +00:00
parent cb5759c737
commit c19f3608a5
27 changed files with 499 additions and 376 deletions
+6 -6
View File
@@ -17,9 +17,9 @@ using namespace std;
//-------------------------------------------------------------------
CProgressBar::CProgressBar()
{
AddSetting(GUIST_CStr, "sprite-background");
AddSetting(GUIST_CStr, "sprite-bar");
AddSetting(GUIST_float, "caption"); // aka value from 0 to 100
AddSetting(GUIST_CGUISpriteInstance, "sprite-background");
AddSetting(GUIST_CGUISpriteInstance, "sprite-bar");
AddSetting(GUIST_float, "caption"); // aka value from 0 to 100
}
CProgressBar::~CProgressBar()
@@ -58,10 +58,10 @@ void CProgressBar::Draw()
{
float bz = GetBufferedZ();
CStr sprite_background, sprite_bar;
CGUISpriteInstance sprite_background, sprite_bar;
float value;
GUI<CStr>::GetSetting(this, "sprite-background", sprite_background);
GUI<CStr>::GetSetting(this, "sprite-bar", sprite_bar);
GUI<CGUISpriteInstance>::GetSetting(this, "sprite-background", sprite_background);
GUI<CGUISpriteInstance>::GetSetting(this, "sprite-bar", sprite_bar);
GUI<float>::GetSetting(this, "caption", value);
GetGUI()->DrawSprite(sprite_background, bz, m_CachedActualSize);