mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 05:07:00 -04:00
Partial support for add multiple cards scripts, not visible to users yet
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1140 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -17,7 +17,9 @@
|
||||
#include <gui/icon_menu.hpp>
|
||||
#include <gui/util.hpp>
|
||||
#include <data/set.hpp>
|
||||
#include <data/game.hpp>
|
||||
#include <data/card.hpp>
|
||||
#include <data/add_cards_script.hpp>
|
||||
#include <data/action/set.hpp>
|
||||
#include <data/settings.hpp>
|
||||
#include <util/find_replace.hpp>
|
||||
@@ -280,6 +282,10 @@ void CardsPanel::onCommand(int id) {
|
||||
if (id >= ID_INSERT_SYMBOL_MENU_MIN && id <= ID_INSERT_SYMBOL_MENU_MAX) {
|
||||
// pass on to editor
|
||||
editor->onCommand(id);
|
||||
} else if (id >= ID_ADD_CARDS_MENU_MIN && id <= ID_ADD_CARDS_MENU_MAX) {
|
||||
// add multiple cards
|
||||
AddCardsScriptP script = set->game->add_cards_scripts.at(id - ID_ADD_CARDS_MENU_MIN);
|
||||
script->perform(*set);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,8 @@ class CardsPanel : public SetWindowPanel {
|
||||
|
||||
// --------------------------------------------------- : Menus & tools
|
||||
IconMenu* menuCard, *menuFormat;
|
||||
wxMenuItem* insertSymbolMenu; // owned by menuFormat, but submenu owned by SymbolFont
|
||||
wxMenuItem* insertSymbolMenu; // owned by menuFormat, but submenu owned by SymbolFont
|
||||
wxMenuItem* insertManyCardsMenu; // owned my menuCard, but submenu can be changed
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------- : EOF
|
||||
|
||||
Reference in New Issue
Block a user