1) Removed unsupported 'fan' and 'high quality' flags.
2) Use multi-line label instead of manually splitting the flags for two separate labels. 3) Translated flags that will be shown to 'normal' users (i.e. with no artist debug defined). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8641 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
ad7cbfae3f
commit
0e589e0db5
@ -13,8 +13,7 @@
|
||||
<label id="name" width="100%" text_align="left"/>
|
||||
<label id="size" width="100%" text=""/>
|
||||
<label id="revision" width="100%" text=""/>
|
||||
<label id="flags1" width="100%" text=""/>
|
||||
<label id="flags2" width="100%" text=""/>
|
||||
<label id="flags" width="100%" text="" word_wrap="true"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -34,8 +34,8 @@ public:
|
||||
AS_ALPHA = 0x0002,
|
||||
AS_BETA = 0x0004,
|
||||
AS_RC = 0x0008,
|
||||
AS_FAN = 0x0010,
|
||||
AS_HQ = 0x0020,
|
||||
//AS_FAN = 0x0010, currently not supported
|
||||
//AS_HQ = 0x0020, currently not supported
|
||||
AS_DFSG = 0x0040,
|
||||
AS_FEATURED = 0x0080,
|
||||
AS_LATEST = 0X0100,
|
||||
|
@ -76,7 +76,8 @@ void AddonsLoading::beforeAddingWidgets()
|
||||
m_back_button = getWidget<ButtonWidget> ("cancel" );
|
||||
|
||||
getWidget<LabelWidget>("name")->setText(m_addon.getName().c_str(), false);
|
||||
getWidget<BubbleWidget>("description")->setText(m_addon.getDescription().c_str());
|
||||
getWidget<BubbleWidget>("description")
|
||||
->setText(m_addon.getDescription().c_str());
|
||||
core::stringw revision = _("Version: %d", m_addon.getRevision());
|
||||
getWidget<LabelWidget>("revision")->setText(revision, false);
|
||||
|
||||
@ -85,44 +86,43 @@ void AddonsLoading::beforeAddingWidgets()
|
||||
std::vector<core::stringw> l;
|
||||
if(UserConfigParams::m_artist_debug_mode)
|
||||
{
|
||||
// In non artist-debug-mode only approved items will be shown anyway,
|
||||
// but give even tester an idea about the status:
|
||||
if(m_addon.testStatus(Addon::AS_APPROVED))
|
||||
l.push_back("approved");
|
||||
|
||||
// Note that an approved addon should never have alpha, beta, or
|
||||
// RC status - and only one of those should be used
|
||||
if(m_addon.testStatus(Addon::AS_ALPHA))
|
||||
l.push_back("alpha");
|
||||
if(m_addon.testStatus(Addon::AS_BETA))
|
||||
else if(m_addon.testStatus(Addon::AS_BETA))
|
||||
l.push_back("beta");
|
||||
if(m_addon.testStatus(Addon::AS_RC))
|
||||
else if(m_addon.testStatus(Addon::AS_RC))
|
||||
l.push_back("RC");
|
||||
|
||||
if(m_addon.testStatus(Addon::AS_BAD_DIM))
|
||||
l.push_back("bad-texture");
|
||||
if(!m_addon.testStatus(Addon::AS_DFSG))
|
||||
l.push_back("non-DFSG");
|
||||
}
|
||||
if(m_addon.testStatus(Addon::AS_FAN))
|
||||
l.push_back("fan-made");
|
||||
else
|
||||
l.push_back("official");
|
||||
if(m_addon.testStatus(Addon::AS_FEATURED))
|
||||
l.push_back("featured");
|
||||
l.push_back(_("featured"));
|
||||
|
||||
GUIEngine::LabelWidget *flags1 = getWidget<LabelWidget>("flags1");
|
||||
GUIEngine::LabelWidget *flags2 = getWidget<LabelWidget>("flags2");
|
||||
core::stringw s1(""), s2("");
|
||||
//
|
||||
GUIEngine::LabelWidget *flags = getWidget<LabelWidget>("flags");
|
||||
if(flags)
|
||||
{
|
||||
core::stringw s1("");
|
||||
for(unsigned int i=0; i<l.size(); i++)
|
||||
{
|
||||
if(i%2==0)
|
||||
{
|
||||
s1+=l[i];
|
||||
if(i+2<l.size())
|
||||
// if it's not the last item, add a ",".
|
||||
// Don't test for l.size()-1 - since this is unsigned!
|
||||
if(i+1<l.size())
|
||||
s1+=", ";
|
||||
}
|
||||
else
|
||||
{
|
||||
s2+=l[i];
|
||||
if(i+2<l.size())
|
||||
s2+=",";
|
||||
flags->setText(s1, false);
|
||||
}
|
||||
}
|
||||
if(flags1) flags1->setText(s1, false);
|
||||
if(flags2) flags2->setText(s2, false);
|
||||
|
||||
// Display the size
|
||||
// ================
|
||||
|
Loading…
Reference in New Issue
Block a user