Minor improvements to add-ons dialog : make flags use a smaller font since they are less important
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@9066 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
aace658b9e
commit
0d5e9c83be
@ -13,6 +13,7 @@
|
||||
<label id="name" width="100%" text_align="left"/>
|
||||
<label id="size" width="100%" text=""/>
|
||||
<label id="revision" width="100%" text=""/>
|
||||
<spacer height="10"/>
|
||||
<label id="flags" width="100%" text="" word_wrap="true"/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -73,6 +73,8 @@ void ModalDialog::loadFromFile(const char* xmlFile)
|
||||
beforeAddingWidgets();
|
||||
|
||||
addWidgetsRecursively(m_widgets);
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -103,6 +103,9 @@ namespace GUIEngine
|
||||
*/
|
||||
virtual void beforeAddingWidgets() {}
|
||||
|
||||
/** \brief Optional callback invoked after widgets have been add()ed */
|
||||
virtual void init() {}
|
||||
|
||||
/**
|
||||
* \brief Implementing callback from AbstractTopLevelContainer
|
||||
*/
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "addons/request.hpp"
|
||||
#include "config/user_config.hpp"
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "guiengine/widgets.hpp"
|
||||
#include "input/input_manager.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
@ -118,7 +119,6 @@ void AddonsLoading::beforeAddingWidgets()
|
||||
if(m_addon.testStatus(Addon::AS_FEATURED))
|
||||
l.push_back(_("featured"));
|
||||
|
||||
//
|
||||
GUIEngine::LabelWidget *flags = getWidget<LabelWidget>("flags");
|
||||
if(flags)
|
||||
{
|
||||
@ -159,6 +159,15 @@ void AddonsLoading::beforeAddingWidgets()
|
||||
getWidget<LabelWidget>("size")->setText(size, false);
|
||||
} // AddonsLoading
|
||||
|
||||
void AddonsLoading::init()
|
||||
{
|
||||
GUIEngine::LabelWidget* flags = getWidget<LabelWidget>("flags");
|
||||
if (flags)
|
||||
{
|
||||
flags->getIrrlichtElement<IGUIStaticText>()->setOverrideFont(GUIEngine::getSmallFont());
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
GUIEngine::EventPropagation
|
||||
|
@ -63,6 +63,8 @@ public:
|
||||
|
||||
virtual void beforeAddingWidgets();
|
||||
|
||||
virtual void init();
|
||||
|
||||
/** This function is called by the GUI, all the frame (or somthing like
|
||||
* that). It checks the flags (m_can_load_icon and
|
||||
* and do the necessary.
|
||||
|
Loading…
x
Reference in New Issue
Block a user