From 8606bf8bcc5149283969107d1703d6b63d4cab36 Mon Sep 17 00:00:00 2001 From: Geoffray Levasseur Date: Mon, 9 Nov 2026 12:02:00 +0100 Subject: [PATCH] missing help implementation --- game/localplayer/Select.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/game/localplayer/Select.cpp b/game/localplayer/Select.cpp index 83d5fe9..f39a987 100644 --- a/game/localplayer/Select.cpp +++ b/game/localplayer/Select.cpp @@ -1689,11 +1689,9 @@ void ListDlg::mousePressEvent(QMouseEvent *event) case ListKind::ChooseEnemyTech: case ListKind::StealTech: 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()) - dlg->showNewContent(WindowMode::Persistent, Help::LinkCategory::Text, 0); + dlg->showNewContent(WindowMode::Persistent, Help::LinkCategory::Text, + dlg->textIndex(QStringLiteral("MILRES"))); } else if (lix < adMilitary) { if (auto *dlg = Term::mainScreenHelpDlg()) dlg->showNewContent(WindowMode::Persistent, Help::LinkCategory::Adv, lix); @@ -1702,7 +1700,8 @@ void ListDlg::mousePressEvent(QMouseEvent *event) case ListKind::Project: if (lix == cpImp + imTrGoods) { 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) { UnitStat::showNewContentOwnModel(WindowMode::Persistent, lix & cpIndex); } else if ((lix & cpType) == 0 && lix != cpImp + imTrGoods) {