31 #include "gui/viewport.h"
70 const std::string &prefix)
75 const std::string cmdStr = link.substr(prefix.size());
91 strprintf(
"/%s %s", cmd.c_str(), args.c_str()),
112 if (event ==
nullptr)
114 std::string
url = link;
139 if ((
itemPopup ==
nullptr) || link.empty())
142 const char ch = link[0];
143 if (ch < '0' || ch >
'9')
151 const int id = str[0];
155 str.erase(str.begin());
195 else if (link[0] ==
'?')
211 else if (link ==
"news")
216 else if (link ==
"copyright")
220 else if (link[0] ==
'q')
void search(const std::string &text)
void loadHelp(const std::string &helpFile)
void loadHelpSimple(const std::string &helpFile)
static ItemColor getColorFromCards(const int *const cards)
static void handleHttpLink(const std::string &link, const MouseEvent *const event)
void handleCommandLink(const std::string &link, const std::string &prefix)
static void handleItemLink(const std::string &link)
static void handleSearchLink(const std::string &link)
static void handleHelpLink(const std::string &link)
void handleLink(const std::string &link, MouseEvent *event)
void selectQuest(const int varId)
std::string linkCommandSymbol
bool itemInfo(InputEvent &event)
bool url(InputEvent &event)
const ItemInfo & get(const int id)
QuestsWindow * questsWindow
ConfirmDialog * confirmDlg
static const std::string SOUND_REQUEST
std::string & replaceAll(std::string &context, const std::string &from, const std::string &to)
void splitToIntVector(std::vector< int > &tokens, const std::string &text, const char separator)
std::string strprintf(const char *const format,...)
bool parse2Str(const std::string &args, std::string &str1, std::string &str2)
bool strStartWith(const std::string &str1, const std::string &str2)