parent
b35cd18eb0
commit
3928a49d5e
@ -18,10 +18,12 @@
|
||||
|
||||
#include "states_screens/dialogs/addons_loading.hpp"
|
||||
|
||||
#include "audio/sfx_manager.hpp"
|
||||
#include "addons/addons_manager.hpp"
|
||||
#include "config/player_manager.hpp"
|
||||
#include "config/user_config.hpp"
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "guiengine/message_queue.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "guiengine/widgets.hpp"
|
||||
#include "input/input_manager.hpp"
|
||||
@ -55,7 +57,7 @@ AddonsLoading::AddonsLoading(const std::string &id)
|
||||
, m_addon(*(addons_manager->getAddon(id)) )
|
||||
#endif
|
||||
{
|
||||
|
||||
m_message_shown = false;
|
||||
m_icon_shown = false;
|
||||
#ifdef SERVER_ONLY
|
||||
m_icon_downloaded = std::make_shared<bool>(false);
|
||||
@ -279,6 +281,16 @@ void AddonsLoading::voteClicked()
|
||||
dismiss();
|
||||
new VoteDialog(addon_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
SFXManager::get()->quickSound("anvil");
|
||||
if (!m_message_shown)
|
||||
{
|
||||
MessageQueue::add(MessageQueue::MT_ERROR,
|
||||
_("You must be logged in to rate this addon."));
|
||||
m_message_shown = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} // voteClicked
|
||||
|
||||
|
@ -51,6 +51,8 @@ private:
|
||||
|
||||
/** True if the icon is being displayed. */
|
||||
bool m_icon_shown;
|
||||
/** True if the error message has shown once. */
|
||||
bool m_message_shown;
|
||||
|
||||
std::shared_ptr<bool> m_icon_downloaded;
|
||||
/** A pointer to the download request, which gives access
|
||||
|
Loading…
Reference in New Issue
Block a user