mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
cleanup
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ endif()
|
||||
|
||||
# You will most likely get a message about being unable to open hunspell-1.7.lib because pkgconf forgets to add the actual path to
|
||||
# HUNSPELL_LIBRARIES. If so, uncomment the below line and point it to the correct vcpkg root folder/library.
|
||||
set(HUNSPELL_LIBRARIES "C:\\src\\vcpkg\\installed\\${VCPKG_TARGET_TRIPLET}\\lib\\hunspell-1.7.lib")
|
||||
#set(HUNSPELL_LIBRARIES "C:\\PATH\\TO\\ROOT\\vcpkg\\installed\\${VCPKG_TARGET_TRIPLET}\\lib\\hunspell-1.7.lib")
|
||||
message("-- Does this have a full path? If not, and it's just a file name, it's broken: Found Hunspell at ${HUNSPELL_LIBRARIES}")
|
||||
|
||||
include_directories("${PROJECT_BINARY_DIR}/src")
|
||||
|
||||
@@ -71,7 +71,6 @@ CardsDataObject::CardsDataObject(const SetP& set, const vector<CardP>& cards) {
|
||||
}
|
||||
WrappedCards data = { set->game.get(), set->game->name(), cards };
|
||||
SetText(serialize_for_clipboard(*set, data));
|
||||
queue_message(MESSAGE_WARNING, GetText());
|
||||
// restore cards
|
||||
for (size_t i = 0 ; i < cards.size() ; ++i) {
|
||||
if (has_styling[i]) {
|
||||
@@ -148,9 +147,6 @@ CardsOnClipboard::CardsOnClipboard(const SetP& set, const vector<CardP>& cards)
|
||||
else if (cards.size() < 6) {
|
||||
Add(new wxImageDataObject(export_image(set, cards, true, 0, 1.0, 0.0)));
|
||||
}
|
||||
else if (cards.size() < 6) {
|
||||
Add(new wxBitmapDataObject(export_bitmap(set, cards, true, 0, 1.0, 0.0)));
|
||||
}
|
||||
// Conversion to serialized card format
|
||||
Add(new CardsDataObject(set, cards), true);
|
||||
}
|
||||
|
||||
@@ -98,8 +98,9 @@ Image export_image(const SetP& set, const CardP& card);
|
||||
Image export_image(const SetP& set, const CardP& card, const double zoom, const Radians angle_radians = 0.0);
|
||||
Image export_image(const SetP& set, const vector<CardP>& cards, bool scale_to_lowest_dpi, int padding, const double zoom, const Radians angle_radians = 0.0);
|
||||
|
||||
/// Export the image of a single card to a given filename
|
||||
void export_image(const SetP& set, const CardP& card, const String& filename);
|
||||
/// Export the image of one or more cards to a given filename
|
||||
void export_image(const SetP& set, const CardP& card, const String& filename);
|
||||
void export_image(const SetP& set, const vector<CardP>& cards, const String& path, const String& filename_template, FilenameConflicts conflicts);
|
||||
|
||||
/// Export a set to Magic Workstation format
|
||||
void export_mws(Window* parent, const SetP& set);
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include <render/card/viewer.hpp>
|
||||
#include <wx/filename.h>
|
||||
|
||||
#define wxIMAGE_OPTION_PNG_DESCRIPTION wxString("PngDescription")
|
||||
|
||||
// ----------------------------------------------------------------------------- : Card export
|
||||
|
||||
class UnzoomedDataViewer : public DataViewer {
|
||||
@@ -101,7 +99,6 @@ Bitmap export_bitmap(const SetP& set, const CardP& card, const double zoom, cons
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
// put multiple card images into one bitmap
|
||||
Bitmap export_bitmap(const SetP& set, const vector<CardP>& cards, bool scale_to_lowest_dpi, int padding, const double zoom, const Radians angle_radians) {
|
||||
if (!set) throw Error(_("no set"));
|
||||
vector<Bitmap> bitmaps;
|
||||
@@ -186,7 +183,7 @@ void export_image(const SetP& set, const CardP& card, const String& filename) {
|
||||
// but image.saveFile determines it automagicly
|
||||
}
|
||||
|
||||
void export_images(const SetP& set, const vector<CardP>& cards,
|
||||
void export_image(const SetP& set, const vector<CardP>& cards,
|
||||
const String& path, const String& filename_template, FilenameConflicts conflicts)
|
||||
{
|
||||
wxBusyCursor busy;
|
||||
|
||||
@@ -172,19 +172,6 @@ void AddJSONWindow::onBrowseFiles(wxCommandEvent&) {
|
||||
}
|
||||
|
||||
void AddJSONWindow::onOk(wxCommandEvent&) {
|
||||
|
||||
|
||||
|
||||
// debug test shit
|
||||
export_image(set, set->cards.front(), "C:\\Users\\Oli\\Desktop\\tetest\\test.png");
|
||||
auto extImg = make_intrusive<ExternalImage>("C:/Users/Oli/Desktop/tetest/test.png");
|
||||
Image img = extImg->generate(GeneratedImage::Options(0, 0, set->stylesheet.get(), set.get()));
|
||||
if (img.HasOption(wxIMAGE_OPTION_FILENAME)) queue_message(MESSAGE_ERROR, img.GetOption(wxIMAGE_OPTION_FILENAME));
|
||||
else queue_message(MESSAGE_ERROR, _("no dice"));
|
||||
return;
|
||||
|
||||
|
||||
|
||||
/// Perform the import
|
||||
wxBusyCursor wait;
|
||||
// Read the file
|
||||
|
||||
@@ -65,7 +65,7 @@ void ImagesExportWindow::onOk(wxCommandEvent&) {
|
||||
if (name.empty()) return;
|
||||
settings.default_export_dir = wxPathOnly(name);
|
||||
// Export
|
||||
export_images(set, getSelection(), name, gs.images_export_filename, gs.images_export_conflicts);
|
||||
export_image(set, getSelection(), name, gs.images_export_filename, gs.images_export_conflicts);
|
||||
// Done
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
+1
-1
@@ -253,7 +253,7 @@ int MSE::OnRun() {
|
||||
out = out.substr(pos + 1);
|
||||
}
|
||||
// export
|
||||
export_images(set, set->cards, path, out, CONFLICT_NUMBER_OVERWRITE);
|
||||
export_image(set, set->cards, path, out, CONFLICT_NUMBER_OVERWRITE);
|
||||
return EXIT_SUCCESS;
|
||||
} else if (args[0] == _("--export")) {
|
||||
if (args.size() < 2) {
|
||||
|
||||
Reference in New Issue
Block a user