Skip to content

Commit

Permalink
Tooltips update.
Browse files Browse the repository at this point in the history
  • Loading branch information
mapron committed Jan 30, 2022
1 parent 0506cfb commit 26c17df
Show file tree
Hide file tree
Showing 6 changed files with 322 additions and 89 deletions.
1 change: 0 additions & 1 deletion src/ConfigPages/ConfigPageAbstract.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class ConfigPageAbstract : public IConfigPage {

// IConfigPage interface
public:
QString pageHelp() const override { return ""; }
bool canBeDisabled() const override;
void readSettings(const QJsonObject& data) override;
void writeSettings(QJsonObject& data) const override;
Expand Down
10 changes: 10 additions & 0 deletions src/ConfigPages/ConfigPageMergeMods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,16 @@ void ConfigPageMergeMods::writeSettings(QJsonObject& data) const
}
}

QString ConfigPageMergeMods::pageHelp() const
{
return tr("You can add aditional steps to mod generation, prior or after the d2modgen work\n"
"Two additional type of sources are supported:\n"
"1. folder with .txt files\n"
"2. another D2R mod\n"
"After selecting source type, you need to specify conflict resolution, \n"
"for the case additional source contains a file which already been generated.");
}

void ConfigPageMergeMods::gatherInfoInternal(ExtraDependencies& output, const GenerationEnvironment& env) const
{
for (auto* item : m_items) {
Expand Down
2 changes: 2 additions & 0 deletions src/ConfigPages/ConfigPageMergeMods.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ class ConfigPageMergeMods : public ConfigPageAbstract {
public:
void readSettings(const QJsonObject& data) override;
void writeSettings(QJsonObject& data) const override;

QString pageHelp() const override;

void generate(DataContext& output, QRandomGenerator& rng, const GenerationEnvironment& env) const override {}

Expand Down
4 changes: 2 additions & 2 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ MainWindow::MainWindow(bool autoSave)
};
increaseFontSize(genButton, 4, false);

m_status = new QLabel("Status label.", this);
m_status = new QLabel(tr("Status label."), this);

m_mainPage = new MainConfigPage(this);
auto* modMergePre = new ConfigPageMergeModsPreload(this);
Expand Down Expand Up @@ -319,7 +319,7 @@ void MainWindow::generate()
return true;
};

m_status->setText("Start...");
m_status->setText(tr("Start..."));
m_status->repaint();

DataContext output;
Expand Down
Loading

0 comments on commit 26c17df

Please sign in to comment.