summaryrefslogtreecommitdiffstats
path: root/pokemodr/commands/JumpCommand.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-05-22 20:21:23 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-05-22 20:21:23 +0000
commitd8973a8ed86925ea5611520c3b7b989ccc238bb4 (patch)
tree62750320998f804891eaa10393f2f85fe9813a70 /pokemodr/commands/JumpCommand.cpp
parentff959ab192499da1c3f66c238ca6c29a76d4b871 (diff)
[FIX] Dialog commands now use "Species" instead of "Pokemon"
[ADD] More Dialog Command widgets git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@165 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemodr/commands/JumpCommand.cpp')
-rw-r--r--pokemodr/commands/JumpCommand.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/pokemodr/commands/JumpCommand.cpp b/pokemodr/commands/JumpCommand.cpp
new file mode 100644
index 00000000..aa9df52d
--- /dev/null
+++ b/pokemodr/commands/JumpCommand.cpp
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Header include
+#include "JumpCommand.h"
+
+// Pokemod includes
+#include "../../pokemod/Dialog.h"
+#include "../../pokemod/Pokemod.h"
+
+JumpCommand::JumpCommand(const Pokemod* pokemod, const int command) :
+ CommandWidget(pokemod, command)
+{
+ setupUi(this);
+ varJump->addItem("Call");
+ varJump->addItem("Goto");
+ for (int i = 0; i < m_pokemod->dialogCount(); ++i)
+ {
+ const Dialog* dialog = m_pokemod->dialog(i);
+ varDialog->addItem(dialog->dialog().mid(0, 25), dialog->id());
+ }
+}
+
+QString JumpCommand::commandString() const
+{
+ return QString("@%1#%2#%3@").arg(Dialog::CommandAbbrStr[m_command]).arg(varJump->currentIndex()).arg(varDialog->itemData(varDialog->currentIndex()).toInt());
+}