mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
87fbc0e80e
- add csv/tsv importer - add `make_map` script function - add `alt name` field property - add `construction script` field property - add `construction script` game property
51 lines
1.3 KiB
C++
51 lines
1.3 KiB
C++
//+----------------------------------------------------------------------------+
|
|
//| Description: Magic Set Editor - Program to make Magic (tm) cards |
|
|
//| Copyright: (C) Twan van Laarhoven and the other MSE developers |
|
|
//| License: GNU General Public License 2 or later (see file COPYING) |
|
|
//+----------------------------------------------------------------------------+
|
|
|
|
#pragma once
|
|
|
|
// ----------------------------------------------------------------------------- : Includes
|
|
|
|
#include <util/prec.hpp>
|
|
|
|
DECLARE_POINTER_TYPE(Set);
|
|
|
|
// ----------------------------------------------------------------------------- : AddCSVWindow
|
|
|
|
/// A window for selecting a subset of the cards from a set,
|
|
/** and selecting a link relation type.
|
|
/** this is used when linking cards
|
|
*/
|
|
class AddCSVWindow : public wxDialog {
|
|
public:
|
|
AddCSVWindow(Window* parent, const SetP& set, bool sizer);
|
|
|
|
protected:
|
|
DECLARE_EVENT_TABLE();
|
|
|
|
wxChoice* separator_type;
|
|
wxTextCtrl* file_path;
|
|
wxButton* file_browse;
|
|
SetP set;
|
|
char separator;
|
|
|
|
std::vector<std::string> readCSVRow(const std::string& row);
|
|
|
|
void setSeparatorType();
|
|
|
|
void onSeparatorTypeChange(wxCommandEvent&);
|
|
|
|
void onBrowseFiles(wxCommandEvent&);
|
|
|
|
void onOk(wxCommandEvent&);
|
|
|
|
};
|
|
|
|
enum class CSVState {
|
|
UnquotedField,
|
|
QuotedField,
|
|
QuotedQuote
|
|
};
|