improve help implementation
This commit is contained in:
1 parent
2dcc63875d
commit
9ef24e3a9e
10 files changed
+52
-26
No files matched your search
@@ -487,14 +487,17 @@ QString cityEventName(int i)
|
||||
|
||||
void helpOnTerrain(int loc, WindowMode newMode)
|
||||
{
|
||||
auto *dlg = mainScreenHelpDlg();
|
||||
if (!dlg)
|
||||
return;
|
||||
if (ClientTools::myMap[loc] & fDeadLands) {
|
||||
Help::showNewContent(newMode, Help::LinkCategory::Ter, 3 * 12);
|
||||
dlg->showNewContent(newMode, Help::LinkCategory::Ter, 3 * 12);
|
||||
} else if ((ClientTools::myMap[loc] & fTerrain) == fForest &&
|
||||
IsoEngine::isJungle(loc / ClientTools::g.lx)) {
|
||||
Help::showNewContent(newMode, Help::LinkCategory::Ter, fJungle + (ClientTools::myMap[loc] >> 5 & 3) * 12);
|
||||
dlg->showNewContent(newMode, Help::LinkCategory::Ter, fJungle + (ClientTools::myMap[loc] >> 5 & 3) * 12);
|
||||
} else {
|
||||
Help::showNewContent(newMode, Help::LinkCategory::Ter,
|
||||
(ClientTools::myMap[loc] & fTerrain) + (ClientTools::myMap[loc] >> 5 & 3) * 12);
|
||||
dlg->showNewContent(newMode, Help::LinkCategory::Ter,
|
||||
(ClientTools::myMap[loc] & fTerrain) + (ClientTools::myMap[loc] >> 5 & 3) * 12);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,6 +510,7 @@ std::function<bool(int)> listDlgRenameCity = [](int) { return false; };
|
||||
std::function<MessgEx::MessgExDlg *()> mainScreenMessgExDlg = [] { return static_cast<MessgEx::MessgExDlg *>(nullptr); };
|
||||
std::function<Select::ListDlg *()> mainScreenModalSelectDlg = [] { return static_cast<Select::ListDlg *>(nullptr); };
|
||||
std::function<NatStat::NatStatDlg *()> mainScreenNatStatDlg = [] { return static_cast<NatStat::NatStatDlg *>(nullptr); };
|
||||
std::function<Help::HelpDlg *()> mainScreenHelpDlg = [] { return static_cast<Help::HelpDlg *>(nullptr); };
|
||||
std::function<int(const TOffer &)> mainScreenOfferCall = [](const TOffer &) { return eInvalid; };
|
||||
TOffer receivedOffer{};
|
||||
|
||||
|
||||
Reference in new issue
Block a user