missing help implementation

This commit is contained in:
Geoffray Levasseur committed 2026-11-09 12:02:00 +01:00
1 parent d37a20ce30
commit 8606bf8bcc
1 file changed
+4 -5
+4 -5
View File
@@ -1689,11 +1689,9 @@ void ListDlg::mousePressEvent(QMouseEvent *event)
case ListKind::ChooseEnemyTech: case ListKind::ChooseEnemyTech:
case ListKind::StealTech: case ListKind::StealTech:
if (lix == adMilitary) { if (lix == adMilitary) {
// TODO: needs a live HelpDlg instance's textIndex('MILRES')
// (MainScreen singleton not ported) - opens the text page
// list instead of the exact targeted entry.
if (auto *dlg = Term::mainScreenHelpDlg()) if (auto *dlg = Term::mainScreenHelpDlg())
dlg->showNewContent(WindowMode::Persistent, Help::LinkCategory::Text, 0); dlg->showNewContent(WindowMode::Persistent, Help::LinkCategory::Text,
dlg->textIndex(QStringLiteral("MILRES")));
} else if (lix < adMilitary) { } else if (lix < adMilitary) {
if (auto *dlg = Term::mainScreenHelpDlg()) if (auto *dlg = Term::mainScreenHelpDlg())
dlg->showNewContent(WindowMode::Persistent, Help::LinkCategory::Adv, lix); dlg->showNewContent(WindowMode::Persistent, Help::LinkCategory::Adv, lix);
@@ -1702,7 +1700,8 @@ void ListDlg::mousePressEvent(QMouseEvent *event)
case ListKind::Project: case ListKind::Project:
if (lix == cpImp + imTrGoods) { if (lix == cpImp + imTrGoods) {
if (auto *dlg = Term::mainScreenHelpDlg()) if (auto *dlg = Term::mainScreenHelpDlg())
dlg->showNewContent(WindowMode::Persistent, Help::LinkCategory::Text, 0); dlg->showNewContent(WindowMode::Persistent, Help::LinkCategory::Text,
dlg->textIndex(QStringLiteral("TRADINGGOODS")));
} else if ((lix & (cpImp | cpType)) == 0) { } else if ((lix & (cpImp | cpType)) == 0) {
UnitStat::showNewContentOwnModel(WindowMode::Persistent, lix & cpIndex); UnitStat::showNewContentOwnModel(WindowMode::Persistent, lix & cpIndex);
} else if ((lix & cpType) == 0 && lix != cpImp + imTrGoods) { } else if ((lix & cpType) == 0 && lix != cpImp + imTrGoods) {