diff options
| author | 2014-12-09 22:09:23 +0100 | |
|---|---|---|
| committer | 2014-12-09 22:09:23 +0100 | |
| commit | f8d862bb3066774bb6c3c71f46954a3ef5f96d66 (patch) | |
| tree | c93047fe3bd0c5c45870a2c9fbd5d0f3edd85857 /node/helpnode.cpp | |
| parent | bf1a7ffc6f9e989cae1e34f8bb6ba826dd98d88e (diff) | |
| download | OneRoll-f8d862bb3066774bb6c3c71f46954a3ef5f96d66.tar.gz OneRoll-f8d862bb3066774bb6c3c71f46954a3ef5f96d66.zip | |
-implementation of HelpNode.
Diffstat (limited to 'node/helpnode.cpp')
| -rw-r--r-- | node/helpnode.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/node/helpnode.cpp b/node/helpnode.cpp index a11c2b3..8fc7e93 100644 --- a/node/helpnode.cpp +++ b/node/helpnode.cpp @@ -2,21 +2,24 @@ HelpNode::HelpNode() { + m_result = new StringResult(); } void HelpNode::run(ExecutionNode* previous) { + StringResult* txtResult = dynamic_cast<StringResult*>(m_result); if(NULL != previous) { + txtResult->setText(toString()); } else { - + txtResult->setText(previous->getHelp()); } } QString HelpNode::toString()const { - return QObject::tr("see full documentation at: <a href=\"https://github.com/obiwankennedy/DiceParser/blob/master/HelpMe.md\">https://github.com/obiwankennedy/DiceParser/blob/master/HelpMe.md</a>"); + return QObject::tr("Rolisteam Dice Parser: Full documentation at: <a href=\"https://github.com/obiwankennedy/DiceParser/blob/master/HelpMe.md\">https://github.com/obiwankennedy/DiceParser/blob/master/HelpMe.md</a>"); } qint64 HelpNode::getPriority() const |