1
0
forked from 0ad/0ad

Apparently GUI should be able to try and set a setting, without it actually being defined, see comments in IGUIObject::LoadStyle.

Removing invalid access to setting in progress bar.
closes #314

This was SVN commit r7155.
This commit is contained in:
sluzky 2009-10-13 22:59:21 +00:00
parent 85179afa0d
commit d63acc604f
2 changed files with 1 additions and 2 deletions

View File

@ -79,7 +79,6 @@ void CProgressBar::Draw()
float value = 0;
GUI<CGUISpriteInstance>::GetSettingPointer(this, "sprite_background", sprite_background);
GUI<CGUISpriteInstance>::GetSettingPointer(this, "sprite_bar", sprite_bar);
GUI<int>::GetSetting(this, "cell_id", cell_id);
GUI<float>::GetSetting(this, "caption", value);
GetGUI()->DrawSprite(*sprite_background, cell_id, bz, m_CachedActualSize);

View File

@ -261,7 +261,7 @@ PSRETURN IGUIObject::SetSetting(const CStr& Setting, const CStr& Value, const bo
{
if (!SettingExists(Setting))
{
return LogInvalidSettings(Setting);
return PSRETURN_GUI_InvalidSetting;
}
// Get setting